Environment variables - LSNRCTL
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Environment variables - LSNRCTL

Hybrid View

  1. #1
    Join Date
    Feb 2001
    Posts
    295
    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.

  2. #2
    Join Date
    Apr 2000
    Location
    Edison, NJ
    Posts
    759
    Did you check the contents of listener.ora??

  3. #3
    Join Date
    Feb 2001
    Posts
    295
    Yes, it's alright. LSNRCTL works fine when executed by 'oracle' user, the error appears when I try with another user.






  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    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
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width