1 2 Previous Next 24 Replies Latest reply on Jul 6, 2011 10:56 AM by Yoav

    sqlplus: error while loading shared libraries: libsqlplus.so

    Yoav
      Hi,
      I am running dbms_scheduler with job_type => 'executable'.
      Its failed on :
      ORA-27369: job of type EXECUTABLE failed with exit code: Key has expired
      STANDARD_ERROR="sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory"
      The shell script is as followed:
      cat poc_type1.sh
      #!/bin/ksh
      export ORACLE_HOME=/software/oracle/DB10gR2
      export ORACLE_SID=pudwh
      export LD_LIBRARY_PATH=/software/oracle/DB10gR2/lib:/usr/lib
      export PATH=/software/oracle/DB10gR2/bin:/software/oracle/DB10gR2/OPatch:/usr/ccs/bin:/usr/local/coreutils/bin/:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:.:/software/oracle/dba/scripts/bin:/usr/sbin:/software/oracle/dba/scripts/PERL/bin:/software/oracle/dba/scripts/sh:/software/oracle/dba/scripts:/usr/contrib/bin:/sbin:/usr/omni/bin:/usr/local/bin/:/software/oracle/DB10gR2/jdk/bin
      env | sort -o /tmp/capture.env
      sqlplus myuser/mypasswd@pudwh @/software/oracle/PATCHES/POC_AD0FFFKMZ6QQ0.sql 
      and /tmp/capture.env shows :
      $ cat capture.env
      A__z="*SHLVL
      LD_LIBRARY_PATH=/software/oracle/DB10gR2/lib:/usr/lib
      ORACLE_HOME=/software/oracle/DB10gR2
      ORACLE_SID=pudwh
      PATH=/software/oracle/DB10gR2/bin:/software/oracle/DB10gR2/OPatch:/usr/ccs/bin:/usr/local/coreutils/bin/:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:.:/software/oracle/dba/scripts/bin:/usr/sbin:/software/oracle/dba/scripts/PERL/bin:/software/oracle/dba/scripts/sh:/software/oracle/dba/scripts:/usr/contrib/bin:/sbin:/usr/omni/bin:/usr/local/bin/:/software/oracle/DB10gR2/jdk/bin
      PWD=/
      SHLVL=1
      _=*13911*/bin/env
      {code}
      
      Please advice
      
      Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
        • 1. Re: sqlplus: error while loading shared libraries: libsqlplus.so
          CKPT
          refer metalink document

          *ORA-27369 with STANDARD_ERROR="execve: No such file or directory" [ID 472392.1]*
          • 2. Re: sqlplus: error while loading shared libraries: libsqlplus.so
            Lubiez Jean-Valentin
            Hello,


            Are you in 10.2.0.4, on a Linux Platform ?

            If yes, you may try to launch sqlplus in the Script like that:
            /software/oracle/DB10gR2/bin/sqlplus
            You may find more explainations on the Note of MOS below
            DBMS_SCHEDULER job fails on RHEL5 with ORA-27369-...Key has expired [ID 739402.1]
            Hope this help.
            Best regards,
            Jean-Valentin
            • 3. Re: sqlplus: error while loading shared libraries: libsqlplus.so
              Yoav
              Hi ,

              Yes its 10204 on linux redhat 5 .

              The scheduler is as followed :
              BEGIN
                    DBMS_SCHEDULER.create_job (
                      job_name        => 'poc_test',
                      job_type        => 'executable',
                      job_action      => '/software/oracle/PATCHES/poc_type1.sh',
                      start_date      => SYSTIMESTAMP,
                      --repeat_interval => 'SYSTIMESTAMP + 365 /* 1 Year */',
                      enabled         => true ,
                      auto_drop       => false);
               END;
              I added the also the full path to sqlplus :
              #!/bin/ksh
              export ORACLE_HOME=/software/oracle/DB10gR2
              export ORACLE_SID=pudwh
              export LD_LIBRARY_PATH=/software/oracle/DB10gR2/lib:/usr/lib
              export PATH=/software/oracle/DB10gR2/bin:/software/oracle/DB10gR2/OPatch:/usr/ccs/bin:/usr/local/coreutils/bin/:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:.:/software/oracle/dba/scripts/bin:/usr/sbin:/software/oracle/dba/scripts/PERL/bin:/software/oracle/dba/scripts/sh:/software/oracle/dba/scripts:/usr/contrib/bin:/sbin:/usr/omni/bin:/usr/local/bin/:/software/oracle/DB10gR2/jdk/bin
              env | sort -o /tmp/capture.env
              /software/oracle/DB10gR2/bin/sqlplus myuser/mypasswd@pudwh @/software/oracle/PATCHES/POC_AD0FFFKMZ6QQ0.sql 
              The /tmp/capture.env is created successfuly as i already shows but the connection to sqlplus is failed on :
              ORA-27369: job of type EXECUTABLE failed with exit code: Key has expired
              STANDARD_ERROR="/software/oracle/DB10gR2/bin/sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory"
              I tried also this way : ./software/oracle/DB10gR2/bin/sqlplus myuser/mypasswd@pudwh ....

              Still getting the same error message.
              • 4. Re: sqlplus: error while loading shared libraries: libsqlplus.so
                Vishal Joshi
                Hi,

                Plz check out bellow mentioned note. This might help you.

                DBMS_SCHEDULER job fails on RHEL5 with ORA-27369-...Key has expired [ID 739402.1]

                Thanks,
                Vishal Joshi
                • 5. Re: sqlplus: error while loading shared libraries: libsqlplus.so
                  Yoav
                  Hi,
                  I followed this note . I dont see how it can assist .

                  I also run shell script as stand alone , and its successeded to work :
                  ./poc_type1.sh
                  sort: open failed: /tmp/capture.env: Permission denied
                  SQL*Plus: Release 10.2.0.4.0 - Production on Mon Jul 4 13:23:46 2011
                  Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
                  Connected to:
                  Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
                  With the Partitioning, OLAP, Data Mining and Real Application Testing options
                  ************************************
                  WELCOME TO THOR SYSTEM@PUDWH
                  ************************************
                  1 row created.
                  Commit complete.
                  But when its been execute from the scheduler it failed.

                  Thanks
                  • 6. Re: sqlplus: error while loading shared libraries: libsqlplus.so
                    Lubiez Jean-Valentin
                    Hello,


                    Can you execute sqlplus without using the Scheduler ?

                    Else you may relink oracle binaries:
                    $ORACLE_HOME/bin/relink all
                    And check for permission on the Library "libsqlplus.so".


                    Hope this help.
                    Best regards,
                    Jean-Valentin
                    • 7. Re: sqlplus: error while loading shared libraries: libsqlplus.so
                      Vishal Joshi
                      Hi,

                      Kindly inculde $ORACLE_HOME/bin path in your veriabouls and then plz try once and check if it works.

                      Thanks,
                      Vishal Joshi
                      • 8. Re: sqlplus: error while loading shared libraries: libsqlplus.so
                        Yoav
                        Yes i can execute sqlplus without any problem directly :
                        sqlplus system/mypasswrd@pudwh
                        SQL*Plus: Release 10.2.0.4.0 - Production on Mon Jul 4 13:48:54 2011
                        Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
                        Connected to:
                        Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
                        With the Partitioning, OLAP, Data Mining and Real Application Testing options
                        ************************************
                        WELCOME TO THOR SYSTEM@PUDWH
                        ************************************
                        SYSTEM@pudwh> 
                        Thanks
                        • 9. Re: sqlplus: error while loading shared libraries: libsqlplus.so
                          Yoav
                          Hi,
                          $ORACLE_HOME/bin is already in the PATH :
                          export PATH=/software/oracle/DB10gR2/bin ......
                          Thanks
                          • 10. Re: sqlplus: error while loading shared libraries: libsqlplus.so
                            Vishal Joshi
                            Hi,

                            Try following and check if it works or not?

                            chown oracle:dba $ORACLE_HOME/bin/extjob

                            Thanks,
                            Vishal Joshi
                            • 11. Re: sqlplus: error while loading shared libraries: libsqlplus.so
                              EdStevens
                              Yoav wrote:
                              Hi,
                              I am running dbms_scheduler with job_type => 'executable'.
                              Its failed on :
                              ORA-27369: job of type EXECUTABLE failed with exit code: Key has expired
                              STANDARD_ERROR="sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory"
                              The shell script is as followed:
                              cat poc_type1.sh
                              #!/bin/ksh
                              export ORACLE_HOME=/software/oracle/DB10gR2
                              export ORACLE_SID=pudwh
                              export LD_LIBRARY_PATH=/software/oracle/DB10gR2/lib:/usr/lib
                              export PATH=/software/oracle/DB10gR2/bin:/software/oracle/DB10gR2/OPatch:/usr/ccs/bin:/usr/local/coreutils/bin/:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:.:/software/oracle/dba/scripts/bin:/usr/sbin:/software/oracle/dba/scripts/PERL/bin:/software/oracle/dba/scripts/sh:/software/oracle/dba/scripts:/usr/contrib/bin:/sbin:/usr/omni/bin:/usr/local/bin/:/software/oracle/DB10gR2/jdk/bin
                              env | sort -o /tmp/capture.env
                              sqlplus myuser/mypasswd@pudwh @/software/oracle/PATCHES/POC_AD0FFFKMZ6QQ0.sql 
                              and /tmp/capture.env shows :
                              $ cat capture.env
                              A__z="*SHLVL
                              LD_LIBRARY_PATH=/software/oracle/DB10gR2/lib:/usr/lib
                              ORACLE_HOME=/software/oracle/DB10gR2
                              ORACLE_SID=pudwh
                              PATH=/software/oracle/DB10gR2/bin:/software/oracle/DB10gR2/OPatch:/usr/ccs/bin:/usr/local/coreutils/bin/:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:.:/software/oracle/dba/scripts/bin:/usr/sbin:/software/oracle/dba/scripts/PERL/bin:/software/oracle/dba/scripts/sh:/software/oracle/dba/scripts:/usr/contrib/bin:/sbin:/usr/omni/bin:/usr/local/bin/:/software/oracle/DB10gR2/jdk/bin
                              PWD=/
                              SHLVL=1
                              _=*13911*/bin/env
                              {code}
                              
                              Please advice
                              
                              Thanks
                              So, if I understand this, you are using the oracle job scheduler to launch a shell script, that in turn launches sqlplus to execute a sql script? And that sql script appears to be a one-off from an oracle patch?

                              I'm just sayin' . . . .
                              • 12. Re: sqlplus: error while loading shared libraries: libsqlplus.so
                                Richard Harrison .
                                Hi,
                                I think this is because by default the extjob process spawns processes that run as nobody:nobody as a security feature. There are 2 ways to address you problem.

                                1 relax the permission on the oracle tree to alow nobody to be able to access all the files. The script for this is $ORACLE_HOME/install/changeperms.sh

                                2 change the default user that the extjob process runs as $ORACLE_HOME/rdbms/admin/externaljob.ora this needs to be done by root.

                                Cheers,
                                Harry

                                http://dbaharrison.blogspot.com/
                                • 13. Re: sqlplus: error while loading shared libraries: libsqlplus.so
                                  Yoav
                                  EdStevens wrote
                                   
                                  So, if I understand this, you are using the oracle job scheduler to launch a shell script, that in turn launches
                                  sqlplus to execute a sql script? And that sql script appears to be a one-off from an oracle patch?
                                  
                                  I'm just sayin' . . . .
                                  You did not not understand.

                                  The /software/oracle/PATCHES is just a directory that i put there for my test case the sql script.
                                  It has NOTHING to do with "one-off from an oracle patch".
                                  • 14. Re: sqlplus: error while loading shared libraries: libsqlplus.so
                                    Yoav
                                    Hi,

                                    I just followed oracle metalink note :
                                    Scheduler Job of Type 'EXECUTABLE' Fails with ORA-27369 "exit code: 255" STANDARD_ERROR="execve: Exec format error" [ID 555160.1] 
                                    I made some changes as descride in this note:
                                     BEGIN
                                         DBMS_SCHEDULER.create_job (
                                                    job_name => 'POC1',
                                                    job_type => 'EXECUTABLE',
                                                    job_action => '/usr/bin/ksh',  <<<<=====
                                                    start_date => SYSTIMESTAMP,
                                                    number_of_arguments => 1,
                                                    enabled => false,
                                                    auto_drop => false);
                                    END;
                                    
                                    PL/SQL procedure successfully completed.
                                    Then i set one argument vale:
                                    SQL> exec dbms_scheduler.set_job_argument_value(job_name=>'POC1',argument_position=>1,argument_value=>'/software/oracle/PATCHES/poc_type1.sh'); 
                                    
                                    PL/SQL procedure successfully completed.
                                    Then i enabled the Job:
                                    SQL> exec dbms_scheduler.enable(name=>'POC1');
                                    
                                    PL/SQL procedure successfully completed.
                                    But additional_info column still shows :
                                    ORA-27369: job of type EXECUTABLE failed with exit code: Key has expired
                                    STANDARD_ERROR="/software/oracle/DB10gR2/bin/sqlplus: error while loading shared libraries: libsqlplus.so: 
                                    cannot open shared object file: No such file or directory"
                                    The shell script by itself is very simple:
                                    #!/usr/bin/ksh
                                    export ORACLE_HOME=/software/oracle/DB10gR2
                                    export ORACLE_SID=pudwh
                                    export LD_LIBRARY_PATH=/software/oracle/DB10gR2/lib:/usr/lib
                                    export PATH=/software/oracle/DB10gR2/bin:/software/oracle/DB10gR2/OPatch:/usr/ccs/bin:/usr/local/coreutils/bin/:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:.:/software/oracle/dba/scripts/bin:/usr/sbin:/software/oracle/dba/scripts/PERL/bin:/software/oracle/dba/scripts/sh:/software/oracle/dba/scripts:/usr/contrib/bin:/sbin:/usr/omni/bin:/usr/local/bin/:/software/oracle/DB10gR2/jdk/bin
                                    env | sort -o /tmp/capture.env
                                    sqlplus myuser/mypasswd@pudwh @/software/oracle/PATCHES/POC_AD0FFFKMZ6QQ0.sql 
                                    When i remarked the last line in shell script (e.g: the connection to sqlplus) the script worked fine.
                                    Which mean that the problem is somehow related to the sqlplus connection.
                                    Also note that when i run the shell script as a stand alone - It work fine.

                                    Thanks
                                    1 2 Previous Next