8 Replies Latest reply on Sep 4, 2018 9:30 AM by Billy~Verreynne

    Unable to connect to database (from server) using sqlplus after doing "relink"

    Mussa

      I am not able to connect to oracle database (from server) using sqlplus after doing oracle relink.  (I used to connect before the relink)

       

      The error I am getting is :

      sqlplus: symbol lookup error: /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib/libclntsh.so.11.1: undefined symbol: nnfgtent

       

       

      I use Oracle Database R11.2.0.3

       

      $ ls -ltr /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib/libclntsh.so.11.1

      -rwxr-xr-x 1 oracle oracle 52178642 Aug 29 03:28 /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib/libclntsh.so.11.1

       

      $ echo $ORACLE_HOME

      /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3

       

      $ echo $LD_LIBRARY_PATH

      /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib:/usr/X11R6/lib:/usr/openwin/lib:/Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib:/usr/dt/lib:/Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/ctx/lib

       

      $ echo $PATH

      /usr/bin:/usr/bin:/Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/perl/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oratest3/bin:/Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/bin:.:.:.

       

      $ cat /etc/oracle-release

      Oracle Linux Server release 5.9

       

       

      Kindly, help

        • 1. Re: Unable to connect to database (from server) using sqlplus after doing "relink"
          John Thorton

          Mussa wrote:

           

          I am not able to connect to oracle database (from server) using sqlplus after doing oracle relink. (I used to connect before the relink)

           

          The error I am getting is :

          sqlplus: symbol lookup error: /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib/libclntsh.so.11.1: undefined symbol: nnfgtent

           

          post results from OS  command below

           

          find / -name libclntsh\*    -ls 2>/dev/null

          • 2. Re: Unable to connect to database (from server) using sqlplus after doing "relink"
            Billy~Verreynne

            Use the ldd command to view shared object dependencies:

            billy@oam ~ ldd instantclient_12_2/sqlplus 
                    linux-vdso.so.1 =>  (0x00007ffc0a517000)
                    libsqlplus.so => not found
                    libclntsh.so.12.1 => not found
                    libclntshcore.so.12.1 => not found
                    libmql1.so => not found
                    libipc1.so => not found
                    libnnz12.so => not found
                    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2ad6c3f000)
                    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2ad68e9000)
                    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2ad66ca000)
                    libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f2ad64b0000)
                    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f2ad62a8000)
                    libaio.so.1 => /lib/x86_64-linux-gnu/libaio.so.1 (0x00007f2ad60a6000)
                    libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f2ad5e8c000)
                    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2ad5aac000)
                    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f2ad5895000)
                    /lib64/ld-linux-x86-64.so.2 (0x00007f2ad6e43000)
            

             

                   

            Use environmental variable LD_LIBRARY_PATH to include all the shared object directories:

            billy@oam ~ export LD_LIBRARY_PATH=/home/billy/instantclient_12_2
            billy@oam ~ ldd instantclient_12_2/sqlplus 
                    linux-vdso.so.1 =>  (0x00007ffcc9fc6000)
                    libsqlplus.so => /home/billy/instantclient_12_2/libsqlplus.so (0x00007febb3dfc000)
                    libclntsh.so.12.1 => /home/billy/instantclient_12_2/libclntsh.so.12.1 (0x00007febb0357000)
                    libclntshcore.so.12.1 => /home/billy/instantclient_12_2/libclntshcore.so.12.1 (0x00007febafd89000)
                    libmql1.so => /home/billy/instantclient_12_2/libmql1.so (0x00007febafb12000)
                    libipc1.so => /home/billy/instantclient_12_2/libipc1.so (0x00007febaf6df000)
                    libnnz12.so => /home/billy/instantclient_12_2/libnnz12.so (0x00007febaef96000)
                    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007febaed92000)
                    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007febaea3c000)
                    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007febae81d000)
                    libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007febae603000)
                    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007febae3fb000)
                    libaio.so.1 => /lib/x86_64-linux-gnu/libaio.so.1 (0x00007febae1f9000)
                    libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007febadfdf000)
                    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007febadbff000)
                    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007febad9e8000)
                    libons.so => /home/billy/instantclient_12_2/libons.so (0x00007febad79a000)
                    /lib64/ld-linux-x86-64.so.2 (0x00007febb40ee000)
            
            • 3. Re: Unable to connect to database (from server) using sqlplus after doing "relink"
              Mussa

              Hello John,

               

               

              Here is the output:

               

              $ find / -name libclntsh\*    -ls 2>/dev/null

              10813587    0 lrwxrwxrwx  1 oracle  oracle        17 Jul 12 15:31 /apps/apps/test5/apps/tech_st/10.1.2/lib/libclntsh.so -> libclntsh.so.10.1

              10813564 13396 -rwxrwxr-x  1 oracle  oracle  13696149 Jul 12 15:31 /apps/apps/test5/apps/tech_st/10.1.2/lib/libclntsh.so.10.1

              11571780    0 lrwxrwxrwx  1 oracle  oracle        17 Jul 17 14:07 /apps/apps/test5/apps/tech_st/10.1.3/lib/libclntsh.so -> libclntsh.so.10.1

              11571771 13408 -rwxrwxr-x  1 oracle  oracle  13709249 Jul 17 14:07 /apps/apps/test5/apps/tech_st/10.1.3/lib/libclntsh.so.10.1

              28967604 20072 -rwxrwxr-x  1 oracle  oracle  20526416 Oct 20  2013 /apps/apps/test5/apps/apps_st/appl/msc/12.0.0/bin/SNO/scp/12.1.3/common/bin/libclntsh.so

              36999806 51584 -rw-rwx---  1 oracle  oracle  52761218 May 22  2014 /apps/prodDB11gr2/prod/db/tech_st/11.2.0.3/inventory/backup/2014-05-22_02-56-26PM/Scripts/ext/lib/libclntsh.so.11.1

              36999757 51584 -rw-rwx---  1 oracle  oracle  52761218 May 22  2014 /apps/prodDB11gr2/prod/db/tech_st/11.2.0.3/inventory/backup/2014-05-22_02-44-01PM/Scripts/ext/lib/libclntsh.so.11.1

              20480022 51584 -rw-rwx---  1 oracle  oracle  52761218 May 22  2014 /apps/prodDB11gr2/prod/db/tech_st/11.2.0.3/inventory/Scripts/ext/lib/libclntsh.so.11.1

              48136286    0 lrwxrwxrwx  1 oracle  oracle        65 Jul 23  2017 /apps/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib/libclntsh.so -> /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib/libclntsh.so.11.1

              48136400 51512 -rw-r-xr-x  1 oracle  oracle  52690050 May 22  2014 /apps/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib/libclntsh.so.11.1

              48136349    0 lrwxrwxrwx  1 oracle  oracle        60 Jul 23  2017 /apps/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib/libclntsh.so.10.1 -> /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib/libclntsh.so

              22643012 51512 -rw-r-xr-x  1 oracle  oracle  52690050 May 22  2014 /Stage/prodDB11gr2_old/prod/db/tech_st/11.2.0.3/lib/libclntsh.so.11.1

              47579137 51584 -rw-rwx---  1 oracle  oracle  52761218 May 22  2014 /Stage/prodDB11gr2_old/prod/db/tech_st/11.2.0.3/inventory/Scripts/ext/lib/libclntsh.so.11.1

              47415297 51584 -rw-rwx---  1 oracle  oracle  52761218 May 22  2014 /Stage/prodDB11gr2_old/prod/db/tech_st/11.2.0.3/inventory/backup/2014-05-22_02-44-01PM/Scripts/ext/lib/libclntsh.so.11.1

              46202881 51584 -rw-rwx---  1 oracle  oracle  52761218 May 22  2014 /Stage/prodDB11gr2_old/prod/db/tech_st/11.2.0.3/inventory/backup/2014-05-22_02-56-26PM/Scripts/ext/lib/libclntsh.so.11.1

              16682837    0 lrwxrwxrwx  1 oracle  oracle        17 Aug 29 03:28 /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib/libclntsh.so -> libclntsh.so.11.1

              16682900    0 lrwxrwxrwx  1 oracle  oracle        60 Aug 29 03:28 /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib/libclntsh.so.10.1 -> /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib/libclntsh.so

              16682933 51012 -rwxr-xr-x  1 oracle  oracle  52178642 Aug 29 03:28 /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib/libclntsh.so.11.1

              16683359 51584 -rw-rwx---  1 oracle  oracle  52761218 May 22  2014 /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/inventory/Scripts/ext/lib/libclntsh.so.11.1

              16683398 51584 -rw-rwx---  1 oracle  oracle  52761218 May 22  2014 /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/inventory/backup/2014-05-22_02-44-01PM/Scripts/ext/lib/libclntsh.so.11.1

              16683442 51584 -rw-rwx---  1 oracle  oracle  52761218 May 22  2014 /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/inventory/backup/2014-05-22_02-56-26PM/Scripts/ext/lib/libclntsh.so.11.1

              48726129    0 lrwxrwxrwx  1 oracle  oracle        17 Jun  4 22:31 /Stage/test5/apps/tech_st/10.1.2/lib/libclntsh.so -> libclntsh.so.10.1

              48726410 13396 -rwxrwxr-x  1 oracle  oracle  13696149 Feb  7  2017 /Stage/test5/apps/tech_st/10.1.2/lib/libclntsh.so.10.1

              • 4. Re: Unable to connect to database (from server) using sqlplus after doing "relink"
                Mussa

                Hello Billy,

                 

                Here is the output of ldd sqlplus that has been executed  after exporting LD_LIBRARY_PATH :

                 

                 

                 

                $ ldd sqlplus

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

                        libsqlplus.so => /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib/libsqlplus.so (0x00002b4fcfeb7000)

                        libclntsh.so.11.1 => /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib/libclntsh.so.11.1 (0x00002b4fd009f000)

                        libnnz11.so => /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib/libnnz11.so (0x00002b4fd29c2000)

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

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

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

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

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

                        libaio.so.1 => /usr/lib64/libaio.so.1 (0x00002b4fd2db8000)

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

                • 5. Re: Unable to connect to database (from server) using sqlplus after doing "relink"
                  Billy~Verreynne

                  ldd shows no unresolved shared object library references - what does the command sqlplus -h do?

                  • 6. Re: Unable to connect to database (from server) using sqlplus after doing "relink"
                    Mussa

                    It shows the same error:

                     

                    $ sqlplus -h

                    sqlplus: symbol lookup error: /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib/libclntsh.so.11.1: undefined symbol: nnfgtent

                    • 8. Re: Unable to connect to database (from server) using sqlplus after doing "relink"
                      Billy~Verreynne

                      The error seems to be in the shared object library?

                       

                      Confirm access privs and size of it:

                      ls -l /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib/libclntsh.so.11.1

                       

                      And then determine if its external references, resolve:

                      ldd /Stage/prodDB11gr2/prod/db/tech_st/11.2.0.3/lib/libclntsh.so.11.1

                       

                      Is SELINUX enabled - it could be causing the error.