environment or sql*plus issue
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: environment or sql*plus issue

  1. #1
    Join Date
    Oct 2008
    Posts
    69

    environment or sql*plus issue

    Hi Folks,
    Having trouble getting sqlplus to run on unix for a 10g version of the database i am running. Works fine for the training 9i version and i cannot see any environment issues.

    9i environment
    Code:
    #TRAIN
    alias TRAIN='ORACLE_SID=TRAIN ; export ORACLE_SID; \
    ORACLE_BASE=/app/oracle ; export ORACLE_BASE
    ORACLE_HOME=/app/oracle/general/9.2.0; export ORACLE_HOME \
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/ucblib
    export LD_LIBRARY_PATH ; PATH=/app/oracle/general/9.2.0/bin:$PATH'
    10g environment
    Code:
    #TEST
    alias TEST='ORACLE_SID=TEST ; export ORACLE_SID; \
    ORACLE_BASE=/app/oracle ; export ORACLE_BASE
    ORACLE_HOME=/app/oracle/test/10.2.0; export ORACLE_HOME \
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/ucblib
    export LD_LIBRARY_PATH ; PATH=/app/oracle/test/10.2.0/bin:$PATH'
    If i run the TRAIN environment i can connect to sqlplus but if i run the TEST environment i get the following
    Code:
    Error 6 initializing SQL*Plus
    Message file sp1.msb not found
    SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
    ORACLE_HOME is set.
    This is the same environment settings i have for the oracle unix user and it works fine for that user. This is for a different unix user that i get these problems, same .profile.

    Any idea?

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,331
    what does env return right before you run sqlplus

  3. #3
    Join Date
    Oct 2008
    Posts
    69
    Quote Originally Posted by davey23uk View Post
    what does env return right before you run sqlplus
    Code:
    _=/usr/bin/env
    ODBCSYSINI=/home/oracle/norad30/surveillance/cfg
    SQLPATH=/home/oracle
    SSH_TTY=/dev/pts/3
    PATH=/app/oracle/test/10.2.0/bin:/app/oracle/general/9.2.0/bin:/usr/ccs/bin:/usr/local/bin:/usr/bin:/usr/sbin:/usr/openwin/bin:::/home/oracle/norad30/bin
    ORACLE_BASE=/app/oracle
    DBGENERAL_HOME=/home/oracle/norad30
    EDITOR=vi
    LOGNAME=phild
    MAIL=/usr/mail/phild
    ORACLE_SID=TEST
    USER=phild
    TNS_ADMIN=/var/opt/oracle
    SHELL=/bin/ksh
    ORACLE_TERM=vt220
    ODBCINI=/home/oracle/norad30/surveillance/cfg/odbc.ini
    HOME=/home/phild
    SSH_CONNECTION=*******************
    SSH_CLIENT=****************
    LD_LIBRARY_PATH=/app/oracle/test/10.2.0/lib:/usr/lib:/usr/ucblib
    BRADMARK_HOME=/home/oracle/norad30
    TERM=vt220
    ORACLE_HOME=/app/oracle/test/10.2.0
    PWD=/home/phild
    TZ=GB

  4. #4
    Join Date
    Oct 2008
    Posts
    69
    i've now tested the .profile with other unix users. I get the same error with them for the TEST environment but TRAIN works. TEST only works if i am the oracle unix user.
    Could this have something to do with permissions on the 10g binaries? Surely that would give a cannot execute: permissions error.
    Baffled

  5. #5
    Join Date
    Mar 2006
    Location
    Charlotte, NC
    Posts
    865
    I guess TEST & TRAIN are on different servers. Make sure that "other" user is added to the correct group in OS and that group have proper permissions to access oracle binaries.


    Thanks,
    Vijay Tummala

    Try hard to get what you like OR you will be forced to like what you get.

  6. #6
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,331
    hmm yes default 10g doesnt allow other users to access it - there is a fix on metalink for it

    look for chperm (i think) in the install directory and look at running then

  7. #7
    Join Date
    Oct 2008
    Posts
    69
    Quote Originally Posted by vnktummala View Post
    I guess TEST & TRAIN are on different servers. Make sure that "other" user is added to the correct group in OS and that group have proper permissions to access oracle binaries.


    Thanks,
    TEST and TRAIN on same server. The user can access TRAIN but not TEST.
    I was thinking could be what DAvey said to do with Permissions on default 10g

  8. #8
    Join Date
    Oct 2008
    Posts
    69
    Quote Originally Posted by davey23uk View Post
    hmm yes default 10g doesnt allow other users to access it - there is a fix on metalink for it

    look for chperm (i think) in the install directory and look at running then
    I have been thinking about this. I think the chperm comes with 10.2.0.3 patch whereas we are sitting on 10.2.0.1.

    If i patch the oracle i take it this should not affect the database in any way. I don't have to upgrade the database as such, just bring down the database, patch the oracle and bring database back up?
    Is that right?

  9. #9
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,331
    you have to upgrade the database as well

  10. #10
    Join Date
    Oct 2008
    Posts
    69
    Quote Originally Posted by davey23uk View Post
    you have to upgrade the database as well
    Oh well,
    I copied over the changePerm.sh from one of our 10.2.0.3.0 installations (and restrict.lst) and ran it.
    Has fixed my sqlplus issues, woohoo!
    Cheers for the tip

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