6th
June
2009
One-liner database script
To run a script on all database instances currently running on an Oracle RAC cluster node I have used the following:
for sid in `ps -ef |grep pmon|grep -v grep|grep -v ASM|cut -d_ -f3-|sort -u|grep ^dw`; do export ORACLE_SID=$sid; sqlplus “/ as sysdba” @security_audit.sql; done
posted in One-liners, Systems Administration | 0 Comments