I created my backup scripts. When I set the script in the cron it does not execute, but it can be done at the shell command. The error message is as follows: "error while loading shared library:libclntsh.so.9.0:cannot open shared object file: no such file or directory." I checked the link in ORACLE_HOME/lib and it exists. I need help.
When a shell script executes, it knows nothing of the environment variables you have set up for your session. So you'll have to code your $ORACLE_HOME and $LD_LIBRARY_PATH environment variables in your script as well. The script works in your session because you have these env vars defined. But running in cron runs without these env vars. A good way to test your cron scripts is to run them in your session with the "sh -x" command similar to the following:
sh -x scriptname
This comes the closest to mimicing how cron runs your script.
Dig Deeper on Oracle database backup and recovery
Oracle expert Brian Peasland answers one reader's question about common pitfalls when connecting Oracle to outside programs.
One reader asks expert Brian Peasland a question about datafile sizes with the Oracle RMAN duplicate 10g command.
Managing parent table-child table relations in Oracle SQL environments is key to efficient programming.
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.