UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 2374 - July 2, 2005
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
CONNECTING DATABASE THROUGH SHELl
isql utility of Sybase can be
efficiently used through shell
scripts as follows:
---------------------------------------------------
#!/bin/sh
cat /dev/null>/tmp/qry.sql
cat << SQL >> /tmp/qry.sql
select name from sysobjects where type = 'T'
SQL
isql -U <login> -P <pass> -S <server> -D <database> -i
/tmp/qry.sql
#remove the query file
rm /tmp/qry.sql
Tidak ada komentar:
Posting Komentar