When that same script is executed via cron, you do not get your session's environment variables. So your shell...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
script needs to have the environment variables it needs coded in the script.
To run the shell script just like cron would run it, use the "sh -x" command. For instance, to run your backup script like cron would, do the following:
sh -x /backup_script/backup_rman_full.shIf there is an error in your script, you will find it when it is run in this manner. Fix any and all errors and then cron should have no problems running this script.
Related Q&A from Brian Peasland
Oracle expert Brian Peasland answers one reader's question about common pitfalls when connecting Oracle to outside programs.continue reading
One reader asks expert Brian Peasland a question about datafile sizes with the Oracle RMAN duplicate 10g command.continue reading
Managing parent table-child table relations in Oracle SQL environments is key to efficient programming.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.