4 Replies Latest reply on Aug 18, 2011 3:13 PM by wolfeet

    SQLPLUS Error 6 Initializing SQL*PLUS

      ok, so up front, let me tell you I have been charged with becoming well versed in Oracle, which I have not used since college (6+ yrs)...

      I have installed Oracle Enterprise Linux 5.2 on a VM, and installed Oracle 11g. Whenever I go to command line and invoke ./sqlplus hr, it comes back with the following error:

      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

      Any help in what this means would be great!
        • 1. Re: SQLPLUS Error 6 Initializing SQL*PLUS
          Peter Gjelstrup

          That looks a lot like [problem in this thread|http://forums.oracle.com/forums/thread.jspa?threadID=104162&tstart=0]

          • 2. Re: SQLPLUS Error 6 Initializing SQL*PLUS
            You normally get this message if your ORACLE_HOME is not set. Please make sure your ORACLE_HOME variable is set.

            • 3. Re: SQLPLUS Error 6 Initializing SQL*PLUS
              Hi friends,

              But in which file we need to set ORACLE_HOME variable. I have installed oracle in CentOS 4.8 . I installed oracle as a user named oracle, so I tried putting the variable in /home/oracle/.bash_profile .
              But when do mysqlpus, I get the following error
              # sqlplus
              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
              When I type #echo $ORACLE_HOME, I get just a blank message

              May I have a help on this guys...
              • 4. Re: SQLPLUS Error 6 Initializing SQL*PLUS
                I've had to deal with this a number of times in the last couple weeks. Background first. Numerous servers running Oracle 10gr2 on Windows and 10gr2 RAC on Linux4. We have to migrate to 11gr2 for all environments and due to Gov't IA restrictions, we cannot have passwords in our load processing scripts, ETL scripts, any script basically. So we use OS_AUTHENTICATION and all of our scripts login to sqlplus as "sqlplus /". In order to have this work, SQLNET.AUTHENTICATION_SERVICE = (NTS) needs to be in the sqlnet.ora file. Now throw in the fact you need to have two oracle_homes, the existing 10gr2 home and now a new 11gr2 home so the dev team can test their ETL scripts against 11g. This works for me in Windows:

                1. Pull up OUI from either home and select the environment tab. Use the up/down arrow to move the 10gr2 home to the top, putting the 11gr2 database on the bottom. This is because they need to continue their own processes as they always have, so the 10g database needs to have priority. When they want to test against 11g, they will change their envirionment within the command prompt.

                2. Pull up command prompt: echo %PATH%
                You want the path to your 10g bin as the very first thing in PATH. It should be, since that is what the result is from step #1.

                3. From same command prompt: echo %ORACLE_HOME%
                This should return %ORACLE_HOME%, meaning it's just echoing what you typed in and there is not set value for ORACLE_HOME. If there is a value for ORACLE_HOME, then: setx ORACLE_HOME ""
                That will set ORACLE_HOME to nothing. Remember you need to close the command prompt and open a new one to have it read the change you just made.

                4. From command prompt: echo %ORACLE_SID%
                Same as above, you don't want anything as a value. If there is, then: setx ORACLE_SID ""
                Close command prompt and open a new one, double-check that %ORACLE_HOME% and %ORACLE_SID" are unset.

                5. Use the 11g listener! Copy whatever you have in your 10g listener over to the 11g listener, same with 10g tnsnames.ora to 11g tnsnames.ora.

                6. Now pull up command prompt: sqlplus <username>/<password> (should log you into the 10g database)

                7. If you want to login to the 11g database (from command prompt): set PATH=<path to 11g bin directory>;%PATH%
                echo %PATH% ==> This should now have the path to the 11g BIN ahead of the 10g BIN.

                8. From SAME comand prompt: sqlplus <username>/<password>
                You will be logged into the 11g database as <username>

                Note: once you close that command prompt, you're back to the default path of 10g BIN, which is what you want.