Database – Crontab Oracle problem in Linux

Crontab Oracle problem in Linux… here is a solution to the problem.

Crontab Oracle problem in Linux

I created an application that needed to run in Linux, started by crontab. An error occurred while trying to connect to the Oracle database: it returned SQLO_INVALID_DB_HANDLE. But if you start it manually, everything is fine.

I bet there are no path-related errors here, as everything works fine except for the connection to the Oracle database. Oracle8 functions are used in my code.

Thanks

Solution

Oracle uses several environment variables, such as ORACLE_HOME, TNS_HOME, ORACLE_SID. They may be missing in your crontab environment.

Related Problems and Solutions