• 15. Re: sqlplus: error while loading shared libraries: libsqlplus.so
      sb92075
      Yoav wrote:
      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
      post content of /tmp/capture.env
      • 16. Re: sqlplus: error while loading shared libraries: libsqlplus.so
        Yoav
        Hi,

        content of /tmp/capture.env :
        [thor:oracle@pudwh /tmp]$ 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
        _=*27502*/bin/env
        [thor:oracle@pudwh /tmp]$ 
        {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
        • 17. Re: sqlplus: error while loading shared libraries: libsqlplus.so
          sb92075
          repeat with modification as below

          #!/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
          id >> /tmp/capture.env
          which sqlplus >> /tmp/capture.env
          ls -ltr $ORACLE_HOME/bin/sqlplus >> /tmp/capture.env
          sqlplus myuser/mypasswd@pudwh @/software/oracle/PATCHES/POC_AD0FFFKMZ6QQ0.sql

          After script runs again post content of /tmp/capture.env back here
          • 18. Re: sqlplus: error while loading shared libraries: libsqlplus.so
            Yoav
            Hi,
            Attached the content :
            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
            _=*11572*/bin/env
            uid=99(nobody) gid=99(nobody) groups=99(nobody)
            /software/oracle/DB10gR2/bin/sqlplus
            -rwxr-x--x 1 oracle dba 7327 Apr 11 15:11 /software/oracle/DB10gR2/bin/sqlplus
            {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
            • 19. Re: sqlplus: error while loading shared libraries: libsqlplus.so
              sb92075
              uid=99(nobody) gid=99(nobody) groups=99(nobody)
              OS user "nobody" has issue running sqlplus
              • 20. Re: sqlplus: error while loading shared libraries: libsqlplus.so
                Yoav
                sb92075 wrote:
                OS user "nobody" has issue running sqlplus
                But as you can see in the output there is an "x" to other group to execute sqlplus
                uid=99(nobody) gid=99(nobody) groups=99(nobody)
                /software/oracle/DB10gR2/bin/sqlplus
                -rwxr-x--x 1 oracle dba 7327 Apr 11 15:11 /software/oracle/DB10gR2/bin/sqlplus
                Please note that temporary i added nobody user to dba group just to see if it help :
                [thor:oracle /tmp]$ cat /etc/group | grep nobody
                nobody:x:99:nobody
                dba:x:400:nobody
                • 21. Re: sqlplus: error while loading shared libraries: libsqlplus.so
                  Yoav
                  Hi,
                  sb92075 wrote:
                  OS user "nobody" has issue running sqlplus
                  I run another test.
                  I run sqlplus using user nobody.
                  -bash-3.2$ id
                  uid=99(nobody) gid=99(nobody) groups=99(nobody),400(dba)
                  
                  -bash-3.2$ export ORACLE_HOME=/software/oracle/DB10gR2
                  -bash-3.2$ export ORACLE_SID=pudwh
                  -bash-3.2$ export LD_LIBRARY_PATH=/software/oracle/DB10gR2/lib:/usr/lib
                  -bash-3.2$ 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
                  -bash-3.2$ echo $ORACLE_HOME
                  /software/oracle/DB10gR2
                  Executing sqlplus directly as user nobody:
                  -bash-3.2$ /software/oracle/DB10gR2/bin/sqlplus myuser/mypasswd@pudwh @/software/oracle/PATCHES/POC_AD0FFFKMZ6QQ0.sql 
                  SQL*Plus: Release 10.2.0.4.0 - Production on Mon Jul 4 23:35:38 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
                  
                  1 row created.
                  
                  
                  Commit complete.
                  So , i dont see any problem related to user nobody
                  • 22. Re: sqlplus: error while loading shared libraries: libsqlplus.so
                    Yoav
                    Hi ,

                    Based on above ouput :
                    ....
                    uid=99(nobody) gid=99(nobody) groups=99(nobody) <<<<<======
                    /software/oracle/DB10gR2/bin/sqlplus
                    -rwxr-x--x 1 oracle dba 7327 Apr 11 15:11 /software/oracle/DB10gR2/bin/sqlplus
                    Even after adding nobody for the dba group (just for test case) still couldnt execute sqlplus successfully.

                    So I took the following changes in file : $ORACLE_HOME/rdbms/admin/externaljob.ora:
                    #run_user = nobody
                    #run_group = nobody
                    run_user= oracle
                    run_group= dba
                    Then i rerun the procedure above and got the following error message:
                    ORA-27369: job of type EXECUTABLE failed with exit code: Operation not permitted
                    STANDARD_ERROR="sort: open failed: /tmp/capture.env: Permission denied
                    /software/oracle/PATCHES/poc_type1.sh[7]: /tmp/capture.env: cannot create [Permission denied]
                    /software/oracle/PATCHES/poc_type1.sh[8]: /tmp/capt"
                    --> So i remarked the writing to /tmp/capture.env and left only the sqlplus line uncomment.
                    I rerun the procedure and got:
                    ORA-27369: job of type EXECUTABLE failed with exit code: Operation not permitted
                    STANDARD_ERROR="Error 45 initializing SQL*Plus Internal error"
                    Searching metalink , and found :
                    Error 45 Initializing In SQL*Plus When Running A Sql Script From OCFS [ID 281450.1]
                    But i am not using OCFS.

                    Any advice will be appreciated

                    Thanks

                    Edited by: Yoav on 07:47 05/07/2011
                    • 23. Re: sqlplus: error while loading shared libraries: libsqlplus.so
                      Richard Harrison .
                      Hi,
                      I think you missed my earlier post...

                      But another point - you say you edited externaljob.ora - that file should be owned by root - is it?

                      Was root.sh run succesfully?

                      Regards,
                      Harry

                      http://dbaharrison.blogspot.com/
                      • 24. Re: sqlplus: error while loading shared libraries: libsqlplus.so
                        Yoav
                        Hi Harry ,
                        Harry Wrote:
                        I think you missed my earlier post...
                        --> Running changePerm.sh did not help.
                        Harry wrote:
                        But another point - you say you edited externaljob.ora - that file should be owned by root - is it?
                        
                        Was root.sh run succesfully?
                        Yes , the file is owned by root :

                        -rw-r----- 1 root dba 1.6K Jul 5 08:36 externaljob.ora

                        I did not run root.sh after editing the file .
                        I dont belive it neccessary to run it. Also its 24*7 database so i cant run it with out downtime maintenance.

                        Thanks
                        1 2 上一个 下一个