Forum Stats

  • 3,733,577 Users
  • 2,246,788 Discussions
  • 7,856,775 Comments

Discussions

sqlplus with Instant Client?

rmmangin
rmmangin Member Posts: 7
Other than instantclient-sqlplus-linux32-11.2.0.1.zip and instantclient-basic-linux32-11.2.0.1.zip and instantclient-sdk-linux32-11.2.0.1.zip what other modules must be installed to use sqlplus with Instant Client to connect to database on a remote server? When I run sqlplus it errors out with "SP2-0667: Message file sp1<lang>.msb not found". The instantclient-sqlplus package does not have any *.msb files in it.
Tagged:

Answers

  • Pavan Kumar
    Pavan Kumar Member Posts: 11,903 Gold Crown
    Hi,

    Might be the SQL Client files got corrupted or download Installation is corrupted. Try to re-install and Check.
    Is this 11g which you are working on.

    I am not sure still.

    - Pavan Kumar N
    Oracle 9i/10g - OCP
    http://oracleinternals.blogspot.com/
  • 367117
    367117 Member Posts: 668
    edited December 2009
    rmmangin wrote:
    instantclient-sqlplus-linux32-11.2.0.1.zip and instantclient-basic-linux32-11.2.0.1.zip and instantclient-sdk-linux32-11.2.0.1.zip
    Did you set LD_LIBRARY_PATH ? What was the sequence of unzip ?
  • rmmangin
    rmmangin Member Posts: 7
    $ORACLE_HOME is set to the base directory under which the lib and bin directories are located (/opt/oracle/product/ora_current).
    $LD_LIBRARY_PATH includes both $ORACLE_HOME/lib and $ORACLE_HOME/bin.
    The instantclient-basic-linux32-11.2.0.1.zip and instantclient-sdk-linux32-11.2.0.1.zip files were both unzipped (in that order) into the $ORACLE_HOME/lib direcotry.
    The instantclient-sqlplus-linux32-11.2.0.1.zip was unzipped last, into the $ORACLE_HOME/bin directory.

    When I try "fine $ORACLE_HOME sp1us.msb -print" there is no sp1us.msb found. In fact there are no *.msb files anywhere under $ORACLE_HOME.
    Should sp1us.msb have been part of the instantclient-sqlplus-linux32-11.2.0.1.zip file?

    The database to which I want to connect is 10g. The 11g Instant Client should connect ok, right?

    Thanks all.
  • 367117
    367117 Member Posts: 668
    edited December 2009
    Can you please post the output of

    env | sort

    Is NLS_LANG set ?

    Is TNS_ADMIN set ?
  • rmmangin
    rmmangin Member Posts: 7
    Neither NLS_LANG nor TNS_ADMIN is set.
    There are quite a few environment variables set. I've omitted a few to keep this post to a reasonable size ;-)
    With that said, here is the output from env | sort
    DISPLAY=:0
    EDITOR=vi
    ENV=/home/roger/.kshrc
    GTK_RC_FILES=/etc/gtk/gtkrc:/home/roger/.gtkrc-1.2-gnome2
    HISTSIZE=800
    HOME=/home/roger
    JAVA_HOME=/usr/java/jre1.6.0_15
    JRE=/usr/java/jre1.6.0_15
    LANG=en_US.UTF-8
    LD_LIBRARY_PATH=/lib:/opt/oracle/product/ora_current/lib:/opt/oracle/product/ora_current/bin:/usr/lib/netscape/plugins
    LOGNAME=roger
    MM_CHARSET=iso-8859-1
    MOZ_ENABLE_PANGO=1
    NPX_PLUGIN_PATH=/usr/lib/netscape/plugins
    ORACLE_HOME=/opt/oracle/product/ora_current
    OS=Linux
    PATH=/usr/bin:/bin:/usr/X11R6/bin:/home/roger/bin:/usr/java/jre1.6.0_15/bin:/opt/oracle/product/ora_current/bin:/opt/bin:.:/usr/local/bin
    PRINTER=nlj
    PS1=$HOSTNM:$PWD>
    TERM=xterm-color
  • 367117
    367117 Member Posts: 668
    edited December 2009
    rmmangin wrote:
    Neither NLS_LANG nor TNS_ADMIN is set.
    LD_LIBRARY_PATH=/lib:/opt/oracle/product/ora_current/lib:/opt/oracle/product/ora_current/bin:/usr/lib/netscape/plugins
    ORACLE_HOME=/opt/oracle/product/ora_current
    PATH=/usr/bin:/bin:/usr/X11R6/bin:/home/roger/bin:/usr/java/jre1.6.0_15/bin:/opt/oracle/product/ora_current/bin:/opt/bin:.:/usr/local/bin
    set

    $ export LD_LIBRARY_PATH=$ORACLE_HOME/bin:$LD_LIBRARY_PATH
    $ export PATH=$ORACLE_HOME/bin:$PATH

    and then post the results of

    $ sqlplus

    Will you be using TNS_ADMIN (For TNSNames) ? If so, set TNS_ADMIN

    Do you have multiple ORACLE Homes on this machine ?
  • rmmangin
    rmmangin Member Posts: 7
    Thanks for the concrete suggestion. I ran the two export commands; sqlplus still reports
    Error 6 initializing SQL*Plus
    SP2-0667: Message file sp1<lang>.msb not found
    SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

    Note that $ORACLE_HOME/bin was already in LD_LIBRARY_PATH. Was your suggestion specifically to make it the first directory there (i.e., that there is importance to the order in which directories appear in LD_LIBRARY_PATH)?

    The box on which I'm trying to get this installed is a desktop Linux box. It has no Oracle db installed on it. I'm trying to use it only as a client to access an Oracle 10g database on a Sun Solaris box. There is only one $ORACLE_HOME on the Linux desktop box (/opt/oracle/product/ora_current). Note that "ora_current" is a symbolic link to "11.2" which is the real directory under which the lib and bin directories are located.

    I do not plan to use TNS_ADMIN.

    I am still perplexed -- if sqlplus needs sp1<lang>.msb, why is that file not part of the instantclient-sqlplus-linux32-11.2.0.1.zip file?
    There are NO .msb files anywhere under the $ORACLE_HOME directory. Should I be trying to find a file "sp1us.msb" somewhere on OTN?

    Thanks again.
  • 367117
    367117 Member Posts: 668
    rmmangin wrote:
    Thanks for the concrete suggestion. I ran the two export commands; sqlplus still reports
    Error 6 initializing SQL*Plus
    SP2-0667: Message file sp1<lang>.msb not found
    SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
    Seems like permission issue to me.

    Are you executing SQLPLUS from Oracle user ?
    There is only one $ORACLE_HOME on the Linux desktop box (/opt/oracle/product/ora_current). Note that "ora_current" is a symbolic link >to "11.2" which is the real directory under which the lib and bin directories are located.
    Try to execute these and see what you get...

    ls -alt $ORACLE_HOME/bin

    ls -alt $ORACLE_HOME/lib
    Was your suggestion specifically to make it the first directory there
    Yes, my intent was to bring ORACLE_HOME directory in the PATH and LD_LIBRARY_PATH as the first entry.
  • ioan
    ioan Member Posts: 132
    Hi,

    Here is a link with info how to configure an instant sqlplus client for linux.

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ape.htm#CHDJCDFA

    Hope this help.

    Ioan
    ioan
  • EdStevens
    EdStevens Member Posts: 28,132 Gold Crown
    rmmangin wrote:
    Other than instantclient-sqlplus-linux32-11.2.0.1.zip and instantclient-basic-linux32-11.2.0.1.zip and instantclient-sdk-linux32-11.2.0.1.zip what other modules must be installed to use sqlplus with Instant Client to connect to database on a remote server? When I run sqlplus it errors out with "SP2-0667: Message file sp1<lang>.msb not found". The instantclient-sqlplus package does not have any *.msb files in it.
    I've never tried to install instant client on a *nix platform, but going to the download page I see this:

    Instant Client Package - SQLPlus: Additional libraries and executable for running SQL*Plus with Instant Client
    instantclient-sqlplus-linux32-11.2.0.1.zip (795,144 bytes) (cksum - 1471854444)

    You didn't mention having that file ....
  • 367117
    367117 Member Posts: 668
    Or you can review this link...

    http://download.oracle.com/docs/cd/E11882_01/server.112/e10823/apd.htm#CHDJCDFA
  • 367117
    367117 Member Posts: 668
    EdStevens wrote:
    rmmangin wrote:
    Other than instantclient-sqlplus-linux32-11.2.0.1.zip and instantclient-basic-linux32-11.2.0.1.zip and instantclient-sdk-linux32-11.2.0.1.zip
    I've never tried to install instant client on a *nix platform, but going to the download page I see this:

    Instant Client Package - SQLPlus: Additional libraries and executable for running SQL*Plus with Instant Client
    instantclient-sqlplus-linux32-11.2.0.1.zip (795,144 bytes) (cksum - 1471854444)

    You didn't mention having that file ....
    Isn't that the first file in the list ?
  • rmmangin
    rmmangin Member Posts: 7
    Thanks everyone for the suggestions. As is so often the case, this was just "user error" on my part ;-}
    I was stubbornly determined to put everything from instantclient-basic-linux32-11.2.0.1.zip and instantclient-sdk-linux32-11.2.0.1.zip into a lib directory under $ORACLE_HOME, and put everything from instantclient-sqlplus-linux32-11.2.0.1.zip into a bin directory under $ORACLE_HOME.

    All I had to do was unzip all 3 files into the same directory, and make that be $ORACLE_HOME. Voila, sqlplus now runs on this desktop linux box, and can connect to the various 10g databases on Solaris boxes.

    Again, thanks all.
  • EdStevens
    EdStevens Member Posts: 28,132 Gold Crown
    ordba wrote:
    EdStevens wrote:
    rmmangin wrote:
    Other than instantclient-sqlplus-linux32-11.2.0.1.zip and instantclient-basic-linux32-11.2.0.1.zip and instantclient-sdk-linux32-11.2.0.1.zip
    I've never tried to install instant client on a *nix platform, but going to the download page I see this:

    Instant Client Package - SQLPlus: Additional libraries and executable for running SQL*Plus with Instant Client
    instantclient-sqlplus-linux32-11.2.0.1.zip (795,144 bytes) (cksum - 1471854444)

    You didn't mention having that file ....
    Isn't that the first file in the list ?
    Ooops. My bad.
  • waldyd
    waldyd Member Posts: 7
    Hello,

    I was having the same problem:

    [[email protected] ~]$ sqlplus
    Error 6 initializing SQL*Plus
    SP2-0667: Message file sp1<lang>.msb not found
    SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

    THE SOLUTION:

    [[email protected] ~]$ unset ORACLE_HOME
    [[email protected] ~]$ cat $LD_LIBRARY_PATH
    cat: /lib:/usr/lib:/usr/lib/oracle/11.2/client/lib:/usr/local/zend/lib: No such file or directory
    [[email protected] ~]$ export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib
    [[email protected] ~]$ sqlplus

    SQL*Plus: Release 11.2.0.3.0 Production on Fri Mar 15 19:22:30 2013

    Copyright (c) 1982, 2011, Oracle. All rights reserved.

    Enter user-name: ^C
    [[email protected] ~]$

    Best Regards,

    Nestor Waldyd
This discussion has been closed.