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.

    Requires Free Membership to View

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.

This was first published in February 2006

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: