2010-07-21

Message file sp1.msb not found on windows

Several ORACLE_HOMEs in MS Windows - Error 6 Initializing SQL*Plus. Sp1.Msb Not Found And SP2-750 [metalink ID 466554.1]


Applies to:

SQL*Plus - Version: 9.2.0.1 to 10.2.0.1
Microsoft Windows (32-bit)
Checked for relevance on 28-Oct-2009

Symptoms

New installation of SQL*Plus 10.1.0.4.2 in MS Windows platform.
This MS Windows box has several ORACLE_HOMEs, and each of them include different SQL*Plus from different versions (since SQL*Plus 8.1.7.X to 10.2.X).

c:\oracle\oms10g\bin\sqlplusw.exe display the following error messages:

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.

SQLPLUS environment variable is not setup in registry.
ORACLE_HOME is setup in registry and is pointing to the correct path
NLS_LANG is using the default value AMERICAN_AMERICA.WE8MSWIN1252.
You are connected at operating system level as the owner of the installation, then, these error messages are not related to permissions to access msb files.

Cause

1) The environment variables from other ORACLE_HOMES are causing unexpected issues.

SP1US.MSB exist in different ORACLE_HOMES:

c:\orant\PLUS33
c:\orant\PLUS80
c:\Oracle\client10g\sqlplus\mesg
c:\oracle\db10g\sqlplus\mesg
c:\oracle\oms\10g\sqlplus\mesg

Each ORACLE_HOME has a different SQL*Plus version.
2) FileMon utility from  http://www.microsoft.com/technet/sysinternals/FileAndDisk/Filemon.mspx indicates sqlplusw.exe is looking for sp1us.msb in %ORACLE_HOME%\BIN\SQLPlus\mesg instead of %ORACLE_HOME%\SQLPlus\mesg:


587 7:41:51 AM sqlplusw.exe:700 OPEN C:\Oracle\oms10g\BIN\SQLPlus\mesg\sp1us.msb PATH NOT FOUND
588 7:41:51 AM sqlplusw.exe:700 OPEN C:\Oracle\oms10g\BIN\SQLPlus\mesg\sp1us.msb PATH NOT FOUND

It displays "PATH NOT FOUND", and continue researching in different PATHs. After a while, it found the msb files in a different ORACLE_HOME ( C:\Oracle\db10g\RDBMS instead of C:\Oracle\oms10g):
734 7:41:53 AM oracle.exe:1204 OPEN C:\Oracle\db10g\RDBMS\mesg\oraus.msb SUCCESS 
735 7:41:53 AM oracle.exe:1204 READ C:\Oracle\db10g\RDBMS\mesg\oraus.msb SUCCESS

Solution

1) Copy all the .msb files
FROM %ORACLE_HOME%\sqlplus\mesg
TO       %ORACLE_HOME\BIN\sqlplus\mesg

sqlplusw.exe should work now.
We are forcing to use the msb files from the first path SQL*Plus is using(%ORACLE_HOME%\bin).

Workarounds
---------------------

A) Use sqlplus.exe instead of sqlplusw.exe. Execute sqlplus.exe from command prompt setting ORACLE_HOME and PATH explicitly in the session, without including any path related to other ORACLE_HOMEs.
Example: c:> set oracle_home=c:\oracle\oms\10g
c:> set PATH=C:\oracle\oms\10g\bin;C:\oracle\oms\10g\jre\1.4.2\bin\client;C:\oracle\jre\1.4.2bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
c:> cd %oracle_home%\bin
c:> sqlplus.exe

B) Create a batch file to setup the environment variables pointing just to your SQL*Plus ORACLE_HOME, and then, call the SQL*Plus executable for Windows (sqlplusw.exe). Example:

pluswin.bat
------------------

set ORACLE_HOME=C:\oracle\oms\10g

set PATH=C:\oracle\oms\10g\bin;C:\oracle\oms\10g\jre\1.4.2\bin\client;C:\oracle
\jre\1.4.2bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem

set NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252

%ORACLE_HOME%\bin\sqlplusw.exe

Niciun comentariu:

Trimiteți un comentariu