4 Replies Latest reply: Jul 3, 2012 11:33 AM by 319528 RSS

    SQL*Plus won't start: Instant client 10.1 on Solaris 10

    507714
      Hi folks-
      My instantclient sqlplus program has stopped working suddenly. It has been working without a problem. Any attempt at running it returns 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

      Here's what I've set up for Oracle-related env. variables:

      LD_LIBRARY_PATH=/usr/local/oracle/instantclient10_1:/usr/lib:/usr/local/lib
      TNS_ADMIN=/usr/local/oracle/instantclient10_1

      Performing an ldd against the binary shows that all the necessary libs are found for sqlplus:

      -bash-3.00$ ldd sqlplus
      libsqlplus.so => /usr/local/oracle/instantclient10_1/libsqlplus.so
      libclntsh.so.10.1 => /usr/local/oracle/instantclient10_1/libclntsh.so.10.1
      libnnz10.so => /usr/local/oracle/instantclient10_1/libnnz10.so
      libnsl.so.1 => /usr/lib/libnsl.so.1
      libsocket.so.1 => /usr/lib/libsocket.so.1
      libgen.so.1 => /usr/lib/libgen.so.1
      libdl.so.1 => /usr/lib/libdl.so.1
      libkstat.so.1 => /usr/lib/libkstat.so.1
      libc.so.1 => /usr/lib/libc.so.1
      libaio.so.1 => /usr/lib/libaio.so.1
      libm.so.1 => /usr/lib/libm.so.1
      libthread.so.1 => /usr/lib/libthread.so.1
      librt.so.1 => /usr/lib/librt.so.1
      libmp.so.2 => /usr/lib/libmp.so.2
      libmd5.so.1 => /usr/lib/libmd5.so.1
      libscf.so.1 => /usr/lib/libscf.so.1
      libdoor.so.1 => /usr/lib/libdoor.so.1
      libuutil.so.1 => /usr/lib/libuutil.so.1
      libm.so.2 => /usr/lib/libm.so.2

      I even attempted a truss of the program. Here's a tail of the output:
      xstat(2, "/usr/lib/libociei.so", 0x08044F90)    Err#2 ENOENT
      xstat(2, "/usr/local/lib/libociei.so", 0x08044F90) Err#2 ENOENT
      xstat(2, "/usr/local/oracle/instantclient10_1/libociei.so", 0x08044F90) = 0
      resolvepath("/usr/local/oracle/instantclient10_1/libociei.so", "/usr/local/oracle/instantclient10_1/libociei.so", 1023) = 47
      open("/usr/local/oracle/instantclient10_1/libociei.so", O_RDONLY) = 3
      mmap(0x00010000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0) = 0xD18F0000
      mmap(0x00010000, 66220032, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xCD800000
      mmap(0xCD800000, 66154002, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xCD800000
      mmap(0xD1726000, 3988, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 66150400) = 0xD1726000
      munmap(0xD1717000, 61440)                       = 0
      memcntl(0xCD800000, 1756, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
      close(3)                                        = 0
      xstat(2, "/usr/lib/libclntsh.so.10.1", 0x08044F20) Err#2 ENOENT
      xstat(2, "/usr/local/lib/libclntsh.so.10.1", 0x08044F20) Err#2 ENOENT
      mprotect(0xCD800000, 66154002, PROT_READ|PROT_WRITE|PROT_EXEC) Err#11 EAGAIN
      munmap(0xCD800000, 66154002)                    = 0
      munmap(0xD1726000, 3988)                        = 0
      munmap(0xD18F0000, 4096)                        = 0
      brk(0x08092968)                                 = 0
      brk(0x08094968)                                 = 0
      sysconfig(_CONFIG_PAGESIZE)                     = 4096
      brk(0x08094968)                                 = 0
      brk(0x0809C968)                                 = 0
      brk(0x0809C968)                                 = 0
      brk(0x080A4968)                                 = 0
      fstat64(2, 0x08046290)                          = 0
      write(2, " E r r o r   6   i n i t".., 30)      = 30
      write(2, " M e s s a g e   f i l e".., 37)      = 37
      write(2, " S P 2 - 0 7 5 0 :   Y o".., 76)      = 76
      _exit(1)
      I am totally at a loss as to what the problem could be. sqlplus was working recently and I can't find anything that has changed! My PHP/Apache installation connects with no problem. Any help would be greatly appreciated!
        • 1. Re: SQL*Plus won't start: Instant client 10.1 on Solaris 10
          Laurenz Albe
          Are there any sp1*.msb files around?

          Did you change your language environment?

          Yours,
          Laurenz Albe
          • 2. Re: SQL*Plus won't start: Instant client 10.1 on Solaris 10
            507714
            Well, looks like I found the problem! As it turns out, there was some form of conflict around zombie sqlplus processes. My user was logged in remotely and using sqlplus. If he lost his connection mid-session and tried to log back in and resume sqlplus, this error would occur until the old processes were killed. Strange errors for this issue, but fixed nonetheless. thanks for your help!
            • 3. Re: SQL*Plus won't start: Instant client 10.1 on Solaris 10
              571283
              I was having this same problem on Solaris 10 using instantclient 10.2, with no other Oracle installation:
              <p>Error 6 initializing SQL*Plus
              <p>Message file sp1<lang>.msb not found
              <p>
              A suggestion on another post was to unset $ORACLE_HOME, even though I saw some warnings saying I needed it (running MakeFile.PL for DBD::Oracle).
              <p>
              So I did this: <b>unset $ORACLE_HOME</b>
              <p><b>note:</b> this will probably break Oracle if you have it installed.
              <p>
              sqlplus and instantclient are working for me again. Finally I can start on my CGI scripts again!
              <p>
              Here's the only environment variable I needed (again, I only have instantclient, not the full Oracle installation):
              <p>
              LD_LIBRARY_PATH=/opt/instantclient_10_2/
              <p>
              Cheers,
              <p>
              Xiao
              • 4. Re: SQL*Plus won't start: Instant client 10.1 on Solaris 10
                319528
                This thread is dreadfully old. However, I just had this problem and resolved it as follows.

                My System is Windows 7 Ultimate.

                I installed the instant client into c:\Oracle\11gR2\client64. I then copied the 64-bit sqlplus instant client version into the c:\Oracle\11gR2\client64\bin directory.

                I added both c:\Oracle\11gR2\client64 and c:\Oracle\11gR2\client64\bin to my path variable.

                When I ran sqlplus I received the "Error 6 initializing SQL*Plus" error message that referred to the sqlplus messages file.

                SOLUTION:
                What I realized was the SqlPlus instant client needs to be copied to the c:\Oracle\11gR2\client64 directory, NOT the bin directory.
                When I moved the files, everything worked fine.

                Hope this helps someone.

                Best regards,

                Metro.