Error ORA-12154 [message #94573] |
Tue, 15 February 2005 19:26 |
Hafizzul
Messages: 2 Registered: February 2005
|
Junior Member |
|
|
Hi..
I have a program written in Pro*C. It running well if I just type the program name.
But I want to schedule so that it will run on 15th day every month using crontab.
But..problem arise when I use crontab, I got error ORA-12154.
Can anybody help me?
TQ
|
|
|
Re: Error ORA-12154 [message #94574 is a reply to message #94573] |
Tue, 15 February 2005 21:13 |
Hafizzul
Messages: 2 Registered: February 2005
|
Junior Member |
|
|
Additional info:
I also try tnsping HOST_NAME, and the result is OK.
But when i try tnsping HOST_NAME using crontab, i got error:
TNS Ping Utility for Solaris: Version 8.1.7.0.0 - Production on 16-FEB-2005 12:43:00
(c) Copyright 1997 Oracle Corporation. All rights reserved.
TNS-03505: Message 3505 not found; No message file for product=network, facility=TNS
|
|
|
|
Re: Error ORA-12154 [message #121962 is a reply to message #94573] |
Thu, 02 June 2005 00:37 |
bobbie_ch
Messages: 2 Registered: June 2005
|
Junior Member |
|
|
i think it is because when you are calling it from a cronjob, it is not gettting the oracle environment variables. try to call the pro*c from a shell script. in the shell script, set the oracle environment variables, and call the shell script in the crontab.
|
|
|
Re: Error ORA-12154 [message #122186 is a reply to message #121962] |
Fri, 03 June 2005 10:59 |
Michael Hartley
Messages: 110 Registered: December 2004 Location: West Yorkshire, United Ki...
|
Senior Member |
|
|
For example
--cut
if [ OSTYPE="linux-gnu" ]
then
. ~/.bash_profile
else
. ~/.profile
fi
# which database to use
export ORACLE_SID=$1
export ORAENV_ASK=NO
. oraenv
export ORAENV_ASK=YES
sqlplus un/pw @script.sql
--cut
|
|
|