I have a shell script that checks for freespaces for three databases on the same machine. The cron entry and actual shell script are attached below. My problem is: if I run the script from prompt line, I will get different results for all three databases. But if I schedule it from cron, the run will give identical results, i.e. the results from MPTRAIN for all three databases. I can't figure out why. Please help. Thanks.
----------------------------------------------------
hi, jt. i'm not the best person to answer this, but i'll try. the difference is probably in your environment variables. in particular, see if TWO_TASK is set. maybe run a cron job to capture all your variables, if you can't track down the defaults for the server.
when you use
ORACLE_SID=MPTRAIN;export ORACLE_SID
$ORACLE_HOME/bin/sqlplus -s < username/pwd@mptrain
it shouldn't matter what the ORACLE_SID is. the "@string" will override it by connecting you via Net8. if these databases are all on this server, trying running the script with
Bookmarks