Scripts

A listing of shell and sql scripts I find useful, these have been written by me or gathered from various sources over 2 decades. Test first!

 

runall_dbs.sh – Used to query or modify all databases on server. Be sure to change the grep string, it can of course be removed.  Very handy.

#!/bin/ksh

spool runall.out
for SID in `grep cod /etc/oratab | awk -F: ‘{print $1}’`
do
echo $SID
export ORACLE_SID=$SID
sqlplus -s / as sysdba << EOF

alter user dbsnmp account unlock profile sysuser identified by password;

exit
EOF

done