LISTING 3: This script, analyzeSchema.ksh, calls an Oracle analyzer that can be used instead of the conditional analyzer installed in Listing 4, in cases where the database is fairly small. #!/bin/ksh # Filename : analyzeSchema.ksh KSH script for analyze data in a schema # Purpose : in order to make this long process run in the background, extract this # section from dbAdmCron.sh # ================================================================= if (( $# < 1 )) ; then echo "Usage : $0 schema" echo " eg.: $0 rams41" exit fi typeset -u USR=$1 echo "analyze_schema of user $USR @$ORACLE_SID start at `date`" . ./setOraEnv.sh -d -w -a # estimate : not based on rows (0), but based on 40% of all rows # Replace $(systpswd "open seasame") with hardcoded password if you don't use systpswd sqlplus -s system/$(systpswd "open seasame") <