Q

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.
This was last published in February 2006

Dig Deeper on Oracle database backup and recovery

PRO+

Content

Find more PRO+ content and other member only offers, here.

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.

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

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close