Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: ORA-12545 When running the job from Crontab ...(Solved)

Re: ORA-12545 When running the job from Crontab ...(Solved)

From: Janardhana Babu <jbdonga_at_ucdavis.edu>
Date: Thu, 04 May 2000 10:22:53 -0700
Message-Id: <10487.104948@fatcity.com>


Thanks a lot for all who replied. After getting the clue from all of you, I verified all the environment variables, .profiles etc. I found that the "oraenv" file exists at two locations, one in /usr/local/oracle/804/bin and /usr/local/oracle/bin. We actually use the one in /usr/local/oracle/bin as we made some modifications such as executing "oraenv_local" within "oraenv". The PATH variable does not have "/usr/local/oracle/bin" set. When the PATH variable is set properly (Or this PATH included in "oraenv"), it worked fine.

Thanks again to all of you who helped me to solve the problem.

At 05:51 PM 5/3/00 -0800, Jared Still wrote:

>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
>jkstill_at_teleport.com - private
>
>
>--
>Author: Jared Still
> INET: jkstill_at_bcbso.com
>
>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
Received on Thu May 04 2000 - 12:22:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US