Process all databases in Sybase


#!/usr/bin/ksh
echo "Started..."

print -u2 -n "Enter password:"
stty -echo
read PASS
stty echo
print

rm -f databases.lst
isql -U sa -S $DSQUERY -w 999< databases.lst
$PASS
select 'DBLABEL' "XXX", name from master..sysdatabases
go
exit
EOF

for DB in $(cat databases.lst) ; do

print -u2 "Processing $DB ..."
isql -U sa -S $DSQUERY -w 999 -D $DB <

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.