How to correctly set the ORACLE_HOME variable on Ubuntu 9.x?

后端 未结 9 1866
春和景丽
春和景丽 2020-12-23 13:34

I have the same problem as listed here: How to recover or change Oracle sysdba password although I did not lose the password, I entered it twice in the configure script orig

相关标签:
9条回答
  • 2020-12-23 14:28

    I had the same issue. In my home folder I've got a script named sqlplus.sh that takes care of this for me, containing:

    ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
    export ORACLE_HOME
    ORACLE_SID=XE
    export ORACLE_SID
    NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
    export NLS_LANG
    PATH=$ORACLE_HOME/bin:$PATH
    export PATH
    sqlplus /nolog
    
    0 讨论(0)
  • 2020-12-23 14:30

    ORACLE_HOME needs to be at the top level of the Oracle directory structure for the database installation. From that point, Oracle knows how to find all the other files it needs. For example, the error message you get is because Oracle can't locate the message files to report errors with (should be in the various mesg directories below the oracle home. Instead of the above value you give, I would try

    export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0
    
    0 讨论(0)
  • 2020-12-23 14:32

    This is the right way to clear this error.

    export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 sqlplus / as sysdba

    0 讨论(0)
提交回复
热议问题