# # Name : dbc_audit_rpt.shl # Purpose : Create and print the audit report for a data range and user. # Revisions # Date Modified by Reason # 23-Jan-96 Daniel Booth Initial Creation # 24-Oct-97 Stephen Rea Generalized for CES to a single report # 25-Jan-00 Stephen Rea Y2K Fixes. Also, added table name report set. # CLEAR="/usr/bin/clear" $CLEAR echo " Create and Print or Review the Database Change Audit Report" echo for a user making changes and the date range on `date +"%I:%M %p %m/%d/%Y"` echo echo " Enter start date being audited (mm/dd/yy[yy]): \c" read START_DT; export START_DT echo echo " Enter end date being audited (mm/dd/yy[yy]): \c" read END_DT; export END_DT echo echo " Enter user making changes, unless all (optional): \c" read USER; echo $USER | head -c 10 | read USER; export USER echo echo "Enter field report set name ([audit], all, or ): \c" read RPT; export RPT if [ "$RPT" = "" ] then echo "audit" | read RPT; export RPT fi echo echo " Enter report detail level (full or [brief]): \c" read DTLLEV; export DTLLEV if [ "$DTLLEV" = "" ] then echo "brief" | read DTLLEV; export DTLLEV fi echo echo " Enter Your Banner User ID: \c" read UID; export UID echo echo " Enter Your Banner User Password: \c" stty -echo read PWD; export PWD stty echo echo echo echo "Please wait while the report is created..." echo if [ "$USER" != "" ] then if [ "$DTLLEV" = "full" -o "$DTLLEV" = "FULL" ] then sqlplus -s $UID/$PWD @/home/common/dbc_audit_user_rpt.sql $START_DT $END_DT $RPT $USER else sqlplus -s $UID/$PWD @/home/common/dbc_audit_userb_rpt.sql $START_DT $END_DT $RPT $USER fi else if [ "$DTLLEV" = "full" -o "$DTLLEV" = "FULL" ] then sqlplus -s $UID/$PWD @/home/common/dbc_audit_all_rpt.sql $START_DT $END_DT $RPT else sqlplus -s $UID/$PWD @/home/common/dbc_audit_allb_rpt.sql $START_DT $END_DT $RPT fi fi if [ -s "/home/common/dbc_audit_rpt.lst" ] then chmod 777 /home/common/dbc_audit_rpt.lst echo "Do you want to review the audit report (y/n): \c" read ANS if [ "$ANS" = "Y" -o "$ANS" = "y" ] then pg /home/common/dbc_audit_rpt.lst fi echo "Do you want a printout of the audit report (y/n): \c" read ANS if [ "$ANS" = "Y" -o "$ANS" = "y" ] then echo "Enter printer name: \c"; read QUEUE qprt -P $QUEUE -z 1 /home/common/dbc_audit_rpt.lst fi else echo "No audit report created for this user and/or date range." fi