#!/bin/ksh
#
isql -Uname -Ppasswd <creattemptlb.sql> out1
isql -Uname -Ppasswd <notprint.sql> out2
isql -Uname -Ppasswd <droptemptbl.sql> out3
cat out1 | mailx -s "create table" d...@mgh.org
cat out2 | mailx -s "not printed" d...@mgh.org
cat out3 | mailx -s "drop table" d...@mgh.org
- provide some info/details as to how they're failing?
- make sure the script soures the appropriate resource file in the $SYBASE directory (usually SYBASE.sh or SYBASE.csh)
How do I find what the resource file should be?
Thanks very much!
Depends. If you want to execute isql without specifying a
full path name then you'll have to have a PATH variable that
includes your OCS../bin directory. If you don't want to
specify the -S option in your isql command then you'll have
to set DSQUERY. And so on.
Probably the easiest thing to do is log in as sybase, do an
env and see what variables are set that you think you might
want.
At the very least I would probably set the SYBASE variable.
> What environment variables does a cron job need set to run a
> sql script using isql?
The easiest is to source the SYBASE.sh file from the root of the Sybase
installation directory.
Michael
--
Michael Peppler - Peppler Consulting SaRL
mpep...@peppler.org - http://www.peppler.org
Sybase DBA/Developer - TeamSybase: http://www.teamsybase.com
Sybase on Linux FAQ - http://www.peppler.org/FAQ/linux.html