-
I'm trying to execute a script that starts/stops LSNRCTL, but the following error is shown:
LSNRCTL for Linux: Version 8.1.6.0.0 - Production on 27-MAR-2001 13:15:02
(c) Copyright 1998, 1999, Oracle Corporation. All rights reserved.
Message 850 not found; No message file for product=network, facility=NL
LSNRCTL> help
Message 866 not found; No message file for product=network, facility=NL
Message 861 not found; No message file for product=network, facility=NL
Variables like $ORACLE_HOME, $ORACLE_SID etc are assigned to 'oracle' user according to /etc/oratab, but the script has to be executed by another user (with the same or even more grants than 'oracle'). What environment variables has to be set to that user so the task can be done?
If I'm going the wrong way, how can I solve that problem?
thanks
Adriano.
-
Did you check the contents of listener.ora??
-
Yes, it's alright. LSNRCTL works fine when executed by 'oracle' user, the error appears when I try with another user.
-
Inside your script, call oraenv with the correct environment variables set and it will setup your environment automatically. For example:
#!/bin/ksh
export ORACLE_SID=test
export ORAENV_ASK=NO
. /usr/local/oracle/bin/oraenv
echo $ORACLE_SID
echo $ORACLE_HOME
echo $LD_LIBRARY_PATH
Or, if you are running the script as root, just su to the oracle user:
su -c oracle /bin/yourscript
Jeff Hunter
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|