2.1 run_de.sh Shell Script
+1DataDictionary can be run as a standalone script or as a cron job.
A cron job allows you to schedule how often the +1DataDictionary HTML output should be updated.
Below is the run_de.sh script which generates HTML output for three Oracle databases.
By using the "set echo off" and "set term off" in sqlplus and by using the "-w" silent option
when calling +1DataDictionary, there is no stdout output generated when this script runs as a
standalone shell script or as a cron job.
To run this script as a Unix command, type:
% run_de.sh
To run this script as a cron job, two sample crontab entries are:
* 8,10,12,2,4,6 * * * /oracle/run_de.sh
* 4 * * * /oracle/run_de.sh
The first cron job entry runs run_de.sh at 8 AM, 10 AM, noon, 2 PM, 4 PM, and 6 PM everyday.
The second cron job entry runs run_de.sh at 4 AM every morning.
#!/bin/sh
#
# Name: run_de.sh
#
# Description: This script generates +1DataDictionary output for three databases
# whose ORACLE_SIDs are: TEST10, TEST, and MY9204.
#
# The /www/docs/databases/index.txt file looks like:
#
# TITLE Production Databases
# TEST10 SoftwareEngineering.info's Database On Oracle 10g
# TEST SoftwareEngineering.info's Database On Oracle 9.0.1
# MY9204 Scott's Database On Oracle 9.2.0.4
# HEADER +1 Software Engineering LLC Documentation
# LINK <a href=http://plus-one.com/de_users_guide.html>
# +1DataDictionary User's Guide</a>
#
# To Run On A
# Command Line: Type:
# % run_de.sh
#
# To Run On A
# Command Line
# In Debug Mode: Type:
# % sh -x run_de.sh
#
# To Run As A
# Cron Job: To add crontab entry, type:
# % crontab -e
# Using the vi editor, add the following line:
# 00 8,12,16,20 * * * /oracle/run_de.sh
# In this example, the above entry updates the +1DataDictionary HTML files
# at 8 AM, noon, 4 PM, and 10 PM. You can run run_de.sh at any
# time intervals you like.
# Exit vi editor. This enables the cron job.
# To see new crontab entry, type:
# % crontab -l
#
# Output: Updates HTML files found in the /www/docs/databases directory.
#
# Version: Version A
#
# Copyright: (C) Copyright 2016 +1 Software Engineering LLC - All Rights Reserved
#
# Create the HTML outputs in /www/docs/databases.
#
cd /www/docs/databases
#
# Oracle 10g Database
#
. /oracle/set10
sqlplus -s plusone/password << EOF
set echo off
set term off
@/oracle/10g/t.sql
@/oracle/10g/i.sql
@/oracle/10g/v.sql
EOF
grep -v "rows selected" tables.txt > temp; mv temp tables.txt
grep -v "rows selected" indexes.txt > temp; mv temp indexes.txt
grep -v "rows selected" views.txt > temp; mv temp views.txt
cp database_id.TEST10 database_id.txt
de -w
#
# Oracle 9.0.1 Database
#
. /oracle/set901
sqlplus -s plusone/password << EOF
set echo off
set term off
@/oracle/9i/t.sql
@/oracle/9i/i.sql
@/oracle/9i/v.sql
EOF
grep -v "rows selected" tables.txt > temp; mv temp tables.txt
grep -v "rows selected" indexes.txt > temp; mv temp indexes.txt
grep -v "rows selected" views.txt > temp; mv temp views.txt
cp database_id.TEST database_id.txt
de -w
#
# Oracle 9.2.0.4 Database
#
. /oracle/set9204
sqlplus -s scott/java123 << EOF
set echo off
set term off
@/oracle/9i/t.sql
@/oracle/9i/i.sql
@/oracle/9i/v.sql
EOF
grep -v "rows selected" tables.txt > temp; mv temp tables.txt
grep -v "rows selected" indexes.txt > temp; mv temp indexes.txt
grep -v "rows selected" views.txt > temp; mv temp views.txt
cp database_id.MY9204 database_id.txt
de -w
run_de.sh Shell Script
2.2 Generated index.html
The /www/docs/databases/html/index.html file generated by running run_de.sh follows:
Production Databases
Last Updated: 18-MAY-2016
SoftwareEngineering.info's Database On Oracle 10g
- TEST10 Tables
- TEST10 Indexes
- TEST10 Views
SoftwareEngineering.info's Database On Oracle 9.0.1
- TEST Tables
- TEST Indexes
- TEST Views
Scott's Database On Oracle 9.2.0.4
- MY9204 Tables
- MY9204 Indexes
- MY9204 Views
+1 Software Engineering LLC Documentation
- +1DataDictionary User's Guide
Output Generated By +1DataDictionary From +1 Software Engineering LLC.
Created on: 18-MAY-2016 4:00 AM
/www/docs/databases/html/index.html File
3. +1 Software Engineering LLC Support
For technical support, call:
805-586-3445
Monday-Friday
8 AM-5 PM PST
Using technical support, you can:
- Discuss problems or ask questions to knowledgeable support personnel.
- Receive updates and releases for products originally purchased.
- Access customer-only documentation, such product presentations, white papers, and user manuals, on our web site.
All products include one year of free technical support. Extended support hours can be arranged.
To Top