AIX Example

A quickie script that can be run by Cron to take a StatsPack snapshot:

snap.sh:

#!/bin/ksh

export ORACLE_HOME=/u01/app/oracle/product/8.1.7
export ORACLE_SID=dbsid
export PATH=/u01/app/oracle/product/8.1.7/bin

sqlplus -s /nolog <<EOF
connect perfstat/perfstat
exec statspack.snap();
exit
EOF