Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Don't we need to set LD_LIBRARY_PATH in Linux anymore ?

KavanaghJun 20 2013 — edited Jun 20 2013

DB Version: 11.2.0.3 on OEL 6.3, RHEL 5.8

I've noticed that, with an RDMS Software installtion (not client) I can successfully invoke sqlplus without setting LD_LIBRARY_PATH variable in Oracle Enterprise Linux and RHEL

--- Testing in Oracle Enterprise Linux 6.3

---I can invoke sqlplus without setting LD_LIBRARY_PATH

# cat /etc/oracle-release

Oracle Linux Server release 6.3

$ cat .bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

# User specific environment and startup programs

#PATH=$PATH:$HOME/bin

#export PATH

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=/u01/app/oracle/product/11.2.0.3/dbhome_1

#export LD_LIBRARY_PATH=$ORACLE_HOME/lib

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

$

$

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jun 19 23:34:02 2013

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

ERROR:

ORA-12162: TNS:net service name is incorrectly specified

$

$ which ldd

/usr/bin/ldd

$

$

$ ldd /u01/app/oracle/product/11.2.0.3/dbhome_1/bin/sqlplus

        linux-vdso.so.1 =>  (0x00007fff439f3000)

        libsqlplus.so => /u01/app/oracle/product/11.2.0.3/dbhome_1/lib/libsqlplus.so (0x00007f19aeef8000)

        libclntsh.so.11.1 => /u01/app/oracle/product/11.2.0.3/dbhome_1/lib/libclntsh.so.11.1 (0x00007f19ac56b000)

        libnnz11.so => /u01/app/oracle/product/11.2.0.3/dbhome_1/lib/libnnz11.so (0x00007f19ac19f000)

        libdl.so.2 => /lib64/libdl.so.2 (0x00000034ba600000)

        libm.so.6 => /lib64/libm.so.6 (0x00000034bb200000)

        libpthread.so.0 => /lib64/libpthread.so.0 (0x00000034bae00000)

        libnsl.so.1 => /lib64/libnsl.so.1 (0x00000034caa00000)

        libc.so.6 => /lib64/libc.so.6 (0x00000034baa00000)

        libaio.so.1 => /lib64/libaio.so.1 (0x00007f19abf87000)

        /lib64/ld-linux-x86-64.so.2 (0x00000034ba200000)

--- Testing in RHEL 5.8.

--- I can invoke sqlplus without setting LD_LIBRARY_PATH

$ echo $LD_LIBRARY_PATH

/u01/app/oracle/product/db/11gR2/lib

$

$

$ unset LD_LIBRARY_PATH

$

$ echo $LD_LIBRARY_PATH

$

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 20 10:31:43 2013

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

Data Mining and Real Application Testing options

SQL>

Not sure if this is because I am using version 11.2. In 10g installation , I remember getting something similar to the below error

$ sqlplus / as sysdba

sqlplus: error while loading shared libraries: .............

App users always get this error with their oracle client installation. I am sure that If we don't set LD_LIBRARY_PATH in an Oracle Client installation I'll get the above error with sqlplus. I don't have a

Oracle Client in Linux with me now to test.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 18 2013
Added on Jun 20 2013
3 comments
3,042 views