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

Home -> Community -> Usenet -> c.d.o.server -> Re: cron scripting of sql*plus

Re: cron scripting of sql*plus

From: Madhavi <moorthy_at_pop.mindspring.com>
Date: Tue, 23 Jan 2001 23:15:33 -0500
Message-ID: <94lk5o$n7f$1@slb7.atl.mindspring.net>

Matt,

When you schedule a job from cron, it won't invoke the .profile (assuming that your
login shell is /bin/ksh). As you said, if the script is working fine from command line
and not working from cron means, you are not getting your environment variables
properly.

You can try two things.

  1. Source your .profile. #!/bin/ksh . ${HOME}/.profile

OR

2) Explicitly export all the environment variables in your shell script.

Hope this helps.

Matt Collins wrote in message <3A6E18F0.6377E618_at_bay.csuhayward.edu>...
>I am wondering if anyone can help me troubleshoot a sqlplus script.
>
>I have some sqlplus commands in a script file that is run by a cron
>job. I am getting an error message from the cron run as follows:
>
>Message file sp1<lang>.msb not found
>Error 6 initializing SQL*Plus
>Message 2100 not found; No message file for product=RDBMS,
>facility=ULMessage 2100 not found; No message file for product=RDBMS,
>facility
>=ULMessage 2100 not found; No message file for product=RDBMS,
>facility=ULMessage 2100 not found; No message file for product=RDBMS,
>facil
>ity=ULMessage 2100 not found; No message file for product=RDBMS,
>facility=ULMessage 2100 not found; No message file for product=RDBMS, fa
>cility=ULMessage file sp1<lang>.msb not found
>Error 6 initializing SQL*Plus
>
>If I run the same script from the command line (as the same user) then
>it works fine. Any suggestions would be helpful.
>
>Thanks,
>-Matt-
Received on Tue Jan 23 2001 - 22:15:33 CST

Original text of this message

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