Q
Problem solve Get help with specific problems with your technologies, process and projects.

Error while loading shared library

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 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

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close