Saturday, August 16, 2008

Run a script across multiple databases

for dbservername in `cat /tmp/ora_server.lst`
do
echo `date '+%b %d %Y %T'` Checking $dbservername for something for Robert
$ORACLE_HOME/bin/sqlplus -s username/password@$dbservername @scanner.sql >> /tmp/robert_$dbservername
done