Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: ORA-12545 When running the job from Crontab ...
The problem is the environment, or rather the lack of one.
When you execute your program at the command line, you already have all of your environment variables setup. ORACLE_HOME, LD_LIBRARY_PATH, PATH, etc. are all set correctly.
When you submit a job via cron, you have to ensure the all of these environment variables are set up. In your case, you are calling a compiled program, so you can't call it directly from cron.
The easiest thing to do is write a shell script that sets up all of the environment variables and then calls your Pro*C program.
This script is then called from cron.
HTH Jared
On Wed, 3 May 2000, Janardhana Babu wrote:
> Dear List,
>
> When Running a Pro*C job manually, it runs ok. If the same job is run thru
> crontab, it generates an error ORA-12545. The DB is 8.0.4.2.1 on HP-UX 10.20.
> I need to help my developers as soon as possible. I could simulate their
> problem by slightly modifying sample1.pc as follows.
>
> 1. username "scott" changed to "/"
>
> 2. EXEC SQL CONNECT :username IDENTIFIED BY :password; ---> changed to
> EXEC SQL CONNECT :username;
>
> 3. Commented out interactive question as follows:
> /* printf("\nEnter employee number (0 to quit): ");
> gets(temp_char);
> emp_number = atoi(temp_char); */
>
> The reason for changing the username and password is: This is how my
> developers are using to login from pro*c programs on all the boxes which is
> working fine except on this box.
>
> If run this program manually, it runs ok. Gets into the DB and gets out.
> When run thru crontab, it generates ora-12545 error. Any clues?
>
> Any help is appreciated.
>
> Thanks,
> -- Janardhana Babu
>
> --
> Author: Janardhana Babu
> INET: jbdonga_at_ucdavis.edu
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>
Jared Still
Certified Oracle DBA and Part Time Perl Evangelist ;-)
Regence BlueCross BlueShield of Oregon
jkstill_at_bcbso.com - Work - preferred address
Received on Wed May 03 2000 - 19:44:15 CDT
![]() |
![]() |