views:

718

answers:

3

I have the same problem as listed here: http://stackoverflow.com/questions/52239/oracle-lost-sysdba-password although I did not lose the password, I entered it twice in the configure script originally, and then when I went to login (localhost:8080/apex, password not accepted.

I don't have anything in the database, I just want to install and use Oracle-XE. I have tried apt-get removing it twice and reinstalling, but if I try to run /etc/init.d/oracle-xe configure again and I get "Oracle Database 10g Express Edition is already configured" despite the second time removing any folders I could find for Oracle XE.

I tried running sqlplus "/ as sysdba" but all I get is:

Error 6 initializing SQL*Plus
Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

I tried setting the variable via export. (also tried set).

Tried: export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlplus and all the subdirectories of that. Same error every time.

What is the ORACLE_HOME supposed to be set to? The only reference I have seen either just say general or say the above up to the version number then "/db_1". I do no thave a db_1.

Let me know if you need any clarification. I don't understand what I did wrong in this process.

A: 

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
DCookie
Thanks, however I had already tried that as mentioned above, I tried all of the subdirectories. k@k:/$ export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0k@k:/$ echo $ORACLE_HOME/usr/lib/oracle/xe/app/oracle/product/10.2.0k@k:/$ /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlplus "/ as sysdba"Error 6 initializing SQL*PlusMessage file sp1<lang>.msb not foundSP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
nowarninglabel
+2  A: 

Usually the msb file not found problems are the result of an environment setting problem, but in your case I'm a little suspicious of the installation (I've never used the apt-get + configure method).

To check the sanity of the installation:

  • ORACLE_HOME should be set to a directory path one level above the bin directory where your sqlplus executable file is found
  • There should be a couple of .msb files under $ORACLE_HOME/sqlplus/msg
  • There should be hundreds (not sure of the number with XE) of .msb files under $ORACLE_HOME (find $ORACLE_HOME -name "*.msb" -print ...should show them)
  • Your PATH should include $ORACLE_HOME/bin
  • All files under ORACLE_HOME should be owned by user:group oracle:dba
dpbradley
Thanks, this is exactly the kind of answer I was looking for. I will mark it as accepted if it works when I try it out on Monday.
nowarninglabel
+1  A: 

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
Jeffrey Kemp
Thanks for your answer, however setting NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh` caused a problem as that file doesn't exist. The other answered seemed to work.
nowarninglabel