ORA-27478: job "APEX_040000.ORACLE_APEX_MAIL_QUEUE" is running

Hello All,
We have a form page ( manual insert/update, no ARP processes). Whenever user updates any field value, then we are triggering e-mails to concerned users. So whenever user clicks on save button and any of form field value has been changed, then we are triggering e-mails. But we are receiving following error when user quickly updates multiple fields and clicks on save button multiple times.
  ORA27478: job "APEX_040000.ORACLE_APEX_MAIL_QUEUE" is runningWe are using APEX_MAIL package for sending mails and following procedure to push the mail queue..
APEX_MAIL.PUSH_QUEUE_BACKGROUND;When we remove above line, then no error is coming. I want to know what is wrong with using APEX_MAIL.PUSH_QUEUE_BACKGROUND;
Regards,
Hari

Hi,
You are using some undocumented procedure.
Use APEX_MAIL.PUSH_QUEUE
http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/apex_mail.htm#CHDJGGHG
Regards,
Jari

Similar Messages

  • ORA+27478 when requesting new workspace

    Hi,
    after going through the wizard for creating a new workspace, I get the following errorÖ
    ORA-27478: job "APEX_040000.ORACLE_APEX_MAIL_QUEUE" is running
    Error requesting Workspace: .
    Return to application.      
    Language: en
    Application Express 4.0.0.00.46If I login as the ADMIN user I can see the request but if I try to approve it I get the same error.
    The Job monitor reports that the ORACLE_APEX_MAIL_QUEUE job is running.
    Not sure where to look for solutions_
    Cheers,
    Andy

    Thanks,
    this is what I get when I am querying the dba_jobs view:
    select job, INSTANCE, FAILURES, SCHEMA_USER  from dba_jobs;
           JOB   INSTANCE   FAILURES SCHEMA_USER
          4001          0          0 APEX_030200
          4002          0          0 APEX_030200
            23          0          0 SYSMANThis doesn’t look right at all as the schema_user isn't APEX_04..... or am I missing something?
    I have alsochecked the job_queue_processes parameter:
    show parameter JOB
    NAME                                 TYPE        VALUE
    job_queue_processes                  integer     1000-Andy
    Edited by: A Tael on Aug 6, 2010 9:19 AM
    Edited by: A Tael on Aug 6, 2010 9:46 AM

  • Simple Queue-Queue Failing with : kwqjaq: Only job queue slave can run prop

    I know this is a simple problem, but I can't get by it.
    I have two DB servers and I just want to queue a message on a local queue and have it propagated to a remote queue.
    Here are my steps:
    I do this on both databases:
    grant dba to johnb identified by johnb ;
    connect johnb/johnb
    create type my_type as object ( a number, b varchar2(2000), c varchar2(2000)) ;
    --- multi consumer queue
    Begin
    /* This queue table should already exist */
    dbms_aqadm.create_queue_table( queue_table => 'MY_QUEUE_TAB',
    queue_payload_type => 'MY_TYPE',
    multiple_consumers => TRUE,
    comment => 'Test MultiConsumer OAQ',
    compatible => '8.1.0' );
    DBMS_AQADM.CREATE_QUEUE (
    queue_name => 'MY_QUEUE'
    , queue_table => 'MY_QUEUE_TAB' );
    dbms_aqadm.start_queue('MY_QUEUE') ;
    End;
    -- on "Local DB" I do the following:
    DECLARE
    subscriber sys.aq$_agent;
    BEGIN
    subscriber := sys.aq$_agent( 'subscriber1' , 'JOHNB.MY_QUEUE@otmdmz2' , null);
    DBMS_AQADM.ADD_SUBSCRIBER(queue_name => 'JOHNB.MY_QUEUE', subscriber => subscriber);
    END;
    -- scheduling propagation
    BEGIN
    DBMS_AQADM.SCHEDULE_PROPAGATION( queue_name => 'JOHNB.MY_QUEUE' , destination => 'otmdmz2' , destination_queue => 'JOHNB.MY_QUEUE');
    END;
    BEGIN
    DBMS_AQADM.ALTER_PROPAGATION_SCHEDULE( queue_name => 'JOHNB.MY_QUEUE' , destination => 'otmdmz2' , destination_queue => 'JOHNB.MY_QUEUE' , latency => 1 );
    END;
    -- I queue with this
    -- enqueue local
    DECLARE
    enqueue_options DBMS_AQ.enqueue_options_t;
    enqueue_properties DBMS_AQ.message_properties_t;
    enqueue_handle RAW(16) ;
    enqueue_message JOHNB.MY_TYPE;
    BEGIN
    enqueue_message := JOHNB.MY_TYPE(1, 'an aq test','sending to remote db' ) ;
    dbms_aq.enqueue(queue_name => 'JOHNB.MY_QUEUE',
    enqueue_options => enqueue_options,
    message_properties => enqueue_properties,
    payload => enqueue_message,
    msgid => enqueue_handle) ;
    commit ;
    end;
    No messages move to remote DB.
    I can see the message in the local queue table.
    Both databases have the same init.ora parameters : job_queue_processes=1000, aq_tm_processes=1.
    If I attempt to run the job I get the message in the subject line in a trace file:
    kwqjaq: Only job queue slave can run propagation job, exiting
    Though I am sure simple configuration issue, I cannot find a relevant note.
    Thanks,
    John

    Another case of the documentation being less than precise - it happens.
    Without personally having investigated, that's my understanding as well bearing in mind the following observation/explanation in the same article which seems to apply for all except 11gR2:
    Although you typically use the JOB_QUEUE_PROCESSES initialization parameter to limit
    the number job queue processes for DBMS_JOB and you use the Scheduler attribute
    max_job_slave_processes to limit the number of job slave processes for the Scheduler,
    the Scheduler is affected by the JOB_QUEUE_PROCESSES parameter.
    The maximum number of job slave processes for Scheduler is determined by the lesser
    of the values of JOB_QUEUE_PROCESSES and max_job_slave_processes. For example:
    If JOB_QUEUE_PROCESSES is set to 10 and max_job_slave_processes is set to 20,
    the job coordinator will start no more than 10 job slave processes to be shared
    between DBMS_JOB and the Scheduler.
    If JOB_QUEUE_PROCESSES is 20 and max_job_slave_processes is 10, the coordinator
    will start up to 20 job slave processes. The Scheduler can use only 10 of these,
    but DBMS_JOB can use all 20.
    If JOB_QUEUE_PROCESSES is 0, DBMS_JOB is disabled, and the maximum number of
    job slave processes for Scheduler is controlled by the max_job_slave_processes
    Scheduler attribute.

  • ORA-27369: job of type EXECUTABLE failed with exit code: Not owner

    Hi
    I created a backup RAC database job using DBMS_SCHEDULER under RMANTEST schema (a DBA account) and I got the error as subject.
    begin
    dbms_scheduler.create_job(
    job_name => 'scheduler_backup',
    job_type => 'EXECUTABLE',
    number_of_arguments => 2,
    job_action => '/opt/oracle/admin/bin/rman_fullbackup_RAC_TEST_test.sh',
    comments => 'backup via scheduler'
    dbms_scheduler.SET_JOB_ARGUMENT_VALUE('scheduler_backup', 1, 'TEST');
    dbms_scheduler.SET_JOB_ARGUMENT_VALUE('scheduler_backup', 2, 'TEST2');
    dbms_scheduler.enable('scheduler_backup');
    end;
    Thanks,
    Kevin

    Hi Ravi
    Thanks for your input.
    "ORA-27369: job of type EXECUTABLE failed with exit code: Not owner" is what I copied from ADDITIONAL_INFO of USER_SCHEDULER_JOB_RUB_DETAILS.
    One thing I don't understand of your words is that
    "On 10gR1 and 10gR2 you can redirect the stdout/stderr within your script and take a look at those log files."
    In my script, I have log files but I cannot see it. I guess the job fails directly without hitting the redirection line in the script. Do you mean I shall write something like this
    dbms_scheduler.create_job (
    job_action => '/opt/oracle/admin/bin/backup.sh > backup.log'
    Another one is
    "make sure that the user that external jobs run as must be able to run your script"
    But OS user and database user are two different accounts at different level.
    I am using 10.2.0.2 RAC. The Unix script runs successfully every night. I just want to take advantage of DBMS_SCHEDULER to avoid host dependency.
    Thanks,
    Kevin

  • ORA-27369: job of type EXECUTABLE failed with exit code: Key has expired

    Hi
    I defined the following Job on Linux Redhat 5.4 & Oracle DB 10.2.0.4:
    BEGIN
      dbms_scheduler.create_job(job_name        => 'expjob',
                                job_type        => 'executable',
                                job_action      => '/EXPORT/scott_cmd',
                                enabled         => TRUE,
                                auto_drop       => FALSE);
    END;
    drwxrwxrwx   2 oracle oinstall  4096 Jul 10 19:19 EXPORTwhere:
    /home/oracle>cat /EXPORT/scott_cmd
    #!/bin/sh
    exp parfile=./scott.par
    /home/oracle>cat /EXPORT/scott.par
    FILE=scott.dmp
    USERID=STRMADMIN/STRMADMIN
    OWNER=SCOTT
    LOG=scott.log
    /home/oracle>ls -l /EXPORT/scott_cmd
    -rwxr-xr-x 1 oracle oinstall 34 Jul 10 19:16 /EXPORT/scott_cmd
    /home/oracle>ls -l /u01/app/oracle/OraHome_1/rdbms/admin/externaljob.ora
    -rw-r--r-- 1 root oinstall 1575 Jul 10 18:42 /u01/app/oracle/OraHome_1/rdbms/admin/externaljob.ora
    (run_user = nobody
    run_group = nobody)
    /home/oracle>ls -l  /u01/app/oracle/OraHome_1/bin/extjob
    -rwsr-x--- 1 root oinstall 64842 Jul  8 14:21 /u01/app/oracle/OraHome_1/bin/extjob
    /home/oracle>ls -l  /u01/app/oracle/OraHome_1/bin/extjobo
    -rwxr-xr-x 1 oracle oinstall 64842 Jul  8 14:21 /u01/app/oracle/OraHome_1/bin/extjoboWhen I executed as user STRMADMIN ( has DBA & CREATE JOB Privileg) the Job, I got always the error:
    /EXPORT>sqlplus STRMADMIN/STRMADMIN
    SQL*Plus: Release 10.2.0.4.0 - Production on Sun Jul 10 19:40:24 2011
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> exec dbms_scheduler.run_job('expjob');
    BEGIN dbms_scheduler.run_job('expjob'); END;
    ERROR at line 1:
    ORA-27369: job of type EXECUTABLE failed with exit code: Key has expired
    ORA-06512: at "SYS.DBMS_ISCHED", line 150
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
    ORA-06512: at line 1
    SQL>Please, help
    regards
    hqt200475
    Edited by: hqt200475 on Jul 10, 2011 10:04 AM
    Edited by: hqt200475 on Jul 10, 2011 10:05 AM

    Hi Ronald,
    I need the external Job in the 10.2.0.4-Environment because of the Online-Upgrade of a 10.2.0.4-Database to 11.2.0.2 with STREAMS. I want to start the old export from a PL/SQL-Procedure.
    Now returning to my problem:
    First: Change the run user to oracle:oinstall $ORACLE_HOME/rdbms/admin/externaljob.ora
    # This configuration file is used by dbms_scheduler when executing external
    # (operating system) jobs. It contains the user and group to run external
    # jobs as. It must only be writable by the owner and must be owned by root.
    # If extjob is not setuid then the only allowable run_user
    # is the user Oracle runs as and the only allowable run_group is the group
    # Oracle runs as.
    #run_user = nobody
    #run_group = nobody
    run_user = oracle
    run_group = oinstallsecond:
    /EXPORT>cat scott_cmd
    #!/bin/sh
    ORACLE_SID=STB;export ORACLE_SID
    ORACLE_HOME=/u01/app/oracle/OraHome_1;export ORACLE_HOME
    PATH=$ORACLE_HOME/bin:$ORACLE_HOME/opmn/bin:$PATH; export PATH
    LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH
    /u01/app/oracle/OraHome_1/bin/exp parfile=/EXPORT/scott.parand:
    BEGIN
      dbms_scheduler.create_job(job_name        => 'expjob_r',
                                job_type        => 'executable',
                                job_action      => '/EXPORT/scott_cmd',
                                enabled         => TRUE,
                                auto_drop       => FALSE);
    END;
    /The manual execution of export as user oracle/oinstall was unproblematic, But I still got the error when running the following procedure :
    SQL> exec dbms_scheduler.run_job('expjob_r');
    BEGIN dbms_scheduler.run_job('expjob_r'); END;
    ERROR at line 1:
    ORA-27369: job of type EXECUTABLE failed with exit code: Operation not
    permitted
    ORA-06512: at "SYS.DBMS_ISCHED", line 150
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
    ORA-06512: at line 1regards
    hqt200475

  • ORA-27369: job of type EXECUTABLE failed with exit code: Permission denied

    Guy's
    I am getting the same error
    my schema is having dba priveleges.
    CREATE OR REPLACE procedure abc_1 as
    begin
    dbms_scheduler.create_job(
    job_name=>'test_1',
    job_type=>'executable',
    job_action=>'/d02/oradata/shell_scripts/import_db_1.sh',
    enabled=>false,
    auto_drop=>true );
    end;
    CREATE OR REPLACE procedure abc_2 as
    --http://www.dba-oracle.com/t_dbms_scheduler_examples.htm
    --http://www.oradev.com/dbms_scheduler.jsp
    --http://forums.oracle.com/forums/thread.jspa?messageID=1352558&#1352558
    begin
    dbms_scheduler.run_job (job_name=>'test_1');
    end;
    SQL>
    SQL>
    SQL> exec abc_1
    PL/SQL procedure successfully completed.
    SQL> exec abc_2
    BEGIN abc_2; END;
    ERROR at line 1:
    ORA-27369: job of type EXECUTABLE failed with exit code: Permission denied
    ORA-06512: at "SYS.DBMS_ISCHED", line 150
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
    ORA-06512: at "SYS.ABC_2", line 6
    ORA-06512: at line 1
    any one got the solution.pl pass it.
    TIA,

    Hi,
    If rdbms/admin/externaljob.ora exists (in 10.2.0.3 and up) then external jobs run as the user and group specified in this file which should be nobody by default.
    If it does not exist (in releases prior to 10.2.0.3) then external jobs run as the owner of bin/extjob which should be nobody by default.
    Because external jobs run as a lowly privileged user (nobody) by default, you need to make sure that this user can execute your script. Things to check for include
    1) Use full paths to all binaries or scripts in job_action or program_action as well as calls inside the script.
    2) Make sure all scripts start with #!/bin/sh or another command interpreter
    3) Make sure all scripts have the executable bit set and are executable by the user that external jobs run as
    4) Make sure that all required environment variables are set. External jobs by default do not have any environment variables set. For example, for an oracle import or export or sqlloader script you may need to set oracle_home, oracle_sid, ld_library_path and path environment variables in your script or source the required Oracle environment script.
    Hope this helps,
    Ravi.

  • ORA-27369: job of type EXECUTABLE failed with exit code: 274662

    I am trying to run a shell script through dbms_scheduler. The Shell scripts calls the oracle procedure which insert a record to the Debug table.
    Code for generating the script
    declare
    begin
    dbms_scheduler.create_job(
              job_name=>'test_call_unix'
              ,job_type=>'executable'
              ,job_action=>'/carsd/Input/Current/BAM/calling_proc.sh'
              ,start_date => SYSDATE
              ,repeat_interval => 'FREQ=SECONDLY; INTERVAL=1'
              ,enabled=>TRUE
              ,auto_drop => TRUE
              ,comments=> 'Calling unxi sh'
    end;
    the shell script (calling_proc.sh)
    touch called.log
    sqlplus $ORA_USER/$ORA_PWD@$ORA_HOST << EOF1
    exec p1_sh;
    exit;
    EOF1
    I gave chmod 777 calling_proc.sh
    this the error which i got in ALL_SCHEDULER_JOB_RUN_DETAILS table
    ORA-27369: job of type EXECUTABLE failed with exit code: 274662
    STANDARD_ERROR="Oracle Scheduler error: Config file is not owned by root or is writable by group or other or extjob is not setuid and owned by root"
    Thanks in advance
    Jeeva.

    STANDARD_ERROR="Oracle Scheduler error: Config file is not owned by root or is writable by group or other or extjob is not setuid and owned by root"
    I gave chmod 777 calling_proc.sh
    comply with top line message!

  • ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function

    Hello,
    I am calling a windows bat file using dbms_scheduler and getting the following error. I have searched the forum and the internet and tried different switches and options. None of them solved my problem.
    Oracle Version: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    OracleJobScheduler is running as a service
    Error starting at line 1 in command:
    execute GET_RESULTS();
    Error report:
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    ORA-06512: at "SYS.DBMS_ISCHED", line 185
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 486
    ORA-06512: at "PS.GET_RESULTS", line 67
    ORA-06512: at line 1
    27369. 00000 - "job of type EXECUTABLE failed with exit code: %s"
    *Cause:    A problem was encountered while running a job of type EXECUTABLE.
    The cause of the actual problem is identified by the exit code.
    *Action:   Correct the cause of the exit code and reschedule the job.
    Here is the code for scheduler
          dbms_output.put_line(os_commandline || utlPath || fileSeparator || 'get.bat >nul')
          dbms_scheduler.create_job
          (   job_name          =>'PS_GET_RESULTS'
                , job_action        => os_commandline || utlPath || fileSeparator || 'get.bat >nul'
                , job_type          =>'executable'
                , enabled           =>false
                , auto_drop         =>false
                , start_date        =>systimestamp
          dbms_scheduler.run_job(job_name =>'PS_GET_RESULTS');The dbs_output prints a line which shows that the parameters os_commandline, utlPath and fileSeparator are set correctly.
         C:\windows\system32\cmd.exe /q /c E:\UTLDir\get.bat >nulThe windows file (get.bat) is:
         "C:\Program Files (x86)\WinSCP\Winscp.exe" /script=e:\utldir\get_resultsThis batch file passes a script file to the executable winscp.exe to get files from another server.
    The script file (get_results) is:
         option batch abort
         option confirm off
         open sftp://username:password@ipnumber:port -hostkey="ssh-rsa 1024 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
         cd /usr/dropbox/
         option transfer binary
         get *.results E:\UTLDir\Results\
         close
         exitI tested the batch file directly and works fine and "gets" the files from the server. But, invoking from Oracle dbms_scheduler fails with ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    Appreciate your help and time in suggesting additional guidelines or pointers.
    Thanks,
    Rose

    Here is an update, if somebody else is having a similar problem.
    The ftp command "cd" to change the directories should be an absolute path. I was given a path "/usr/dropbox/", but on the server it actually corresponds to "/usr/local/apps/dropbox/". After updating the directory path, the scheduler worked fine in invoking the batch file for transferring the files.
    Thanks,
    Rose

  • ORA-27369:job of type EXECUTABLE failed with exit code + rman???

    Hi all,
    I was trying to execute job from 10G (10.2.01) Enterprise Manager Database Control, and got error below
    ORA-27369:job of type EXECUTABLE failed with exit code: Network is down STANDARD_ERROR="/home/oracle/scripts/backup/backupset_full:rman: command not found"
    Here is the file contents of backupset_full
    #!usr/bin/bash
    rman <<EOF
    connect catalog rman/rman@catrcv
    connect target sys/sys@test
    run{
    EXECUTE SCRIPT global_backup_full;
    quit
    EOF
    Here is the file content of global_backup_full script
    CREATE SCRIPT global_backup_full
    shutdown immediate;
    startup mount;
    allocate channel d1 device type DISK;
    backup as compressed backupset database;
    release channel d1;
    NOTE: I am running on bash shell environment.
    THANK YOU VERY MUCH in advance.
    Rich,

    You need to set ORACLE_HOME inside backupset_full script and possibly change rman to $ORACLE_HOME/bin/rman
    #!usr/bin/bash
    export ORACLE_HOME=<your_oracle_home _directory>
    $ORACLE_HOME/bin/rman <<EOF
    connect catalog rman/rman@catrcv
    connect target sys/sys@test
    run{
    EXECUTE SCRIPT global_backup_full;
    quit
    EOF
    Here is the file content of global_backup_full script
    CREATE SCRIPT global_backup_full
    shutdown immediate;
    startup mount;
    allocate channel d1 device type DISK;
    backup as compressed backupset database;
    release channel d1;
    }

  • ORA-27369: job of type EXECUTABLE failed with exit code

    am getting this error
    ORA-27369: job of type EXECUTABLE failed with exit code: Operation not permitted.
    We have been using this for such a long time without any problems.this is the plsql scheduler :
    Please help
    BEGIN
    SYS.DBMS_SCHEDULER.CREATE_JOB
    job_name => 'PROD_LOAD_SL_FILES'
    ,start_date => TO_TIMESTAMP_TZ('2005/12/02 17:05:00.000000 -05:00','yyyy/mm/dd hh24:mi:ss.ff tzh:tzm')
    ,repeat_interval => NULL
    ,end_date => NULL
    ,job_class => 'DEFAULT_JOB_CLASS'
    ,job_type => 'EXECUTABLE'
    ,job_action => '/home/oracle/actual/payment_files/slc_prod/load_sl_files.sh'
    ,comments => 'Loads SL files, uploads logs to database and sends email to Disbursement and DBA teams'
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
    ( name => 'PROD_LOAD_SL_FILES'
    ,attribute => 'RESTARTABLE'
    ,value => FALSE);
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
    ( name => 'PROD_LOAD_SL_FILES'
    ,attribute => 'LOGGING_LEVEL'
    ,value => SYS.DBMS_SCHEDULER.LOGGING_RUNS);
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
    ( name => 'PROD_LOAD_SL_FILES'
    ,attribute => 'MAX_FAILURES');
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
    ( name => 'PROD_LOAD_SL_FILES'
    ,attribute => 'MAX_RUNS');
    BEGIN
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
    ( name => 'PROD_LOAD_SL_FILES'
    ,attribute => 'STOP_ON_WINDOW_CLOSE'
    ,value => FALSE);
    EXCEPTION
    -- could fail if program is of type EXECUTABLE...
    WHEN OTHERS THEN
    NULL;
    END;
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
    ( name => 'PROD_LOAD_SL_FILES'
    ,attribute => 'JOB_PRIORITY'
    ,value => 1);
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
    ( name => 'PROD_LOAD_SL_FILES'
    ,attribute => 'SCHEDULE_LIMIT');
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
    ( name => 'PROD_LOAD_SL_FILES'
    ,attribute => 'AUTO_DROP'
    ,value => FALSE);
    END;
    and this is part of the unix script get executed:
    [oracle@USAC-S009 slc_prod]$ cat load_sl_files.sh
    #!/bin/sh
    # FILEME: /home/oracle/actual/paytment_files/load_sl_files.sh
    # PURPOSE: Load SL files, email .log files
    # INSTRUCTIONS/COMMENTS/ASSUMPTIONS: Two SL files will be pulled down
    # MAINTENANCE LOG
    # REV# DATE AUTHOR QA-ed BY CHANGE DESCRIPTION KEY
    DATE=`/bin/date +%d%b%y_%H%M`
    HOME=/home/oracle
    export HOME
    ORACLE_HOME=/u01/app/oracle/product/10.2
    export ORACLE_HOME
    ORACLE_SID=em
    export ORACLE_SID
    PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin:/etc:/usr/local/bin:/u01/app/oracle/product/10.2/bin:/bin:/sbin:/usr/bin:/usr/sbin; export PATH
    SL_HOME=/home/oracle/actual/payment_files/slc_prod
    FILE_HOME=/opt/u02/home/usair
    # Call slc.sh to load files
    ssh usac09.usacad.loc > /home/oracle/actual/payment_files/slc_prod/slc.sh.log <<EOT
    /u01/app/oracle/slc.sh 2>&1
    sleep 120
    EOT
    .............

    Hi,
    The user oracle who owns the scheduler already has permissions for the mailx and the same script is able to send notifications when run manully. Do I need to set additional permissions for scheduler ?
    Also the db version is 10.2.0.5.
    Thanks

  • ORA-27369: job of type EXECUTABLE failed with exit code: Unknown error

    Hello DBAs,
    I am trying to schedule a shell script through dbms_scheduler.CREATE_JOB
    My database version is 10.2.0.3.0.
    I can successfully schedule the job, but while running, it throwing ORA-27369 with out exit code.
    Given below are the actions performed -
    -- Created shel scripts-
    $ cat shell01.sh
    ./test.sh >> test.log
    $
    $ cat test.sh
    sqlplus -s "/ as sysdba" <<EOF
    SELECT SUBSTR(host_name,0,10) host_name, instance_name, status,TO_CHAR(startup_time,'dd-mm-yy hh24:mi:ss') startup_time
    FROM v\$instance;
    disconnect;
    exit;
    EOF
    -- Granting privileges - (eventhough I have tried from 'SYS' schema)
    GRANT create Job, create external job, execute any class, execute any program , manage scheduler to sys;
    -- Drop job with name RUN_SHELL01
    BEGIN
    dbms_scheduler.drop_job('RUN_SHELL01');
    END;
    -- Schedule job with name RUN_SHELL01
    BEGIN
    dbms_scheduler.CREATE_JOB
         (job_name           => 'RUN_SHELL01',
         job_type           => 'EXECUTABLE',
         job_action           => '/home/ora1023/shell01.sh',
    start_date           => '18-AUG-09 05:37:00 AM',
         end_date          => NULL,
         repeat_interval      => 'FREQ=MINUTELY',
         enabled           => false,
         comments           => 'Run shell-script');
    END;
    --Enable job
    BEGIN
    dbms_scheduler.enable('RUN_SHELL01');
    END;
    -- Checking status
    SELECT owner, job_name, enabled FROM dba_scheduler_jobs;
    select JOB_NAME,STATUS,ERROR# from dba_scheduler_job_run_details where job_name='RUN_SHELL01';
    -- Executing the job
    SQL> exec dbms_scheduler.run_job('RUN_SHELL01');
    BEGIN dbms_scheduler.run_job('RUN_SHELL01'); END;
    ERROR at line 1:
    ORA-27369: job of type EXECUTABLE failed with exit code: Unknown error
    ORA-06512: at "SYS.DBMS_ISCHED", line 150
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
    ORA-06512: at line 1
    Anybody please suggest a solutions for this -

    My shell script will work as below -
    user01@test01:/home/user01 : cat shell01.sh
    ./test.sh >> test.log
    user01@test01:/home/user01 :
    user01@test01:/home/user01 :
    user01@test01:/home/user01 : cat test.sh
    sqlplus -s "/ as sysdba" <<EOF
    SELECT SUBSTR(host_name,0,10) host_name, instance_name, status,TO_CHAR(startup_time,'dd-mm-yy hh24:mi:ss') startup_time
    FROM v\$instance;
    disconnect;
    exit;
    EOF
    user01@test01:/home/user01 : ./shell01.sh
    user01@test01:/home/user01 : ls -ltr
    -rw-r--r-- 1 ora1023 dba 155 Aug 26 05:28 test.log
    user01@test01:/home/user01 : cat test.log
    HOST_NAME INSTANCE_NAME STATUS STARTUP_TIME
    test01 oft1 OPEN 18-08-09 08:22:45
    user01@test01:/home/user01 :
    ** I think this shell script is working fine! ..its only for testing..
    and while we are querying dba_scheduler_job_run_details for additional info-
    SQL> select s.STATUS ,s.ADDITIONAL_INFO from dba_scheduler_job_run_details s where s.job_name='RUN_SHELL01';
    STATUS
    ADDITIONAL_INFO
    STANDARD_ERROR="execve: Exec format error"
    FAILED
    ORA-27369: job of type EXECUTABLE failed with exit code: Unknown error
    STANDARD_ERROR="execve: Exec format error"
    I think Metalink Doc ID: 555160.1 (Schedular Job of Type 'EXECUTABLE' Fails with ORA-27369 "exit code: 255" STANDARD_ERROR="execve: Exec format error"). Will help me to solve this issue Since i am using ksh -
    # echo $SHELL
    /bin/ksh
    Edited by: Rajesh Menon on Aug 25, 2009 9:21 PM

  • ORA-27369: job of type EXECUTABLE failed with exit code: Is a name file

    I am getting this error when I try to execute a file using /bin/sh , I create the file, do a chmod on the file and remove the file but I am have trouble executing it even though I can execute it form the command line.
    ORA-27369: job of type EXECUTABLE failed with exit code: Is a name file
    STANDARD_ERROR="Segmentation Fault"
    139
    EXTERNAL_LOG_ID="job_77927_1275",
    ORA-27369: job of type EXECUTABLE failed with exit code: Transport endpoint is n
    ot connected
    STANDARD_ERROR="Abort - core dumped
    here is the code
    DBMS_SCHEDULER.CREATE_JOB(job_name=>'CHMOD_ON_CCL',
    job_type=>'EXECUTABLE',
    job_action=>'/bin/chmod',
    number_of_arguments=>2,
    enabled=>false,
    auto_drop=>true);
    DBMS_SCHEDULER.set_attribute('CHMOD_ON_CCL', 'credential_name', 'SCHED_USER');
    DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE(job_name=>'CHMOD_ON_CCL',
    argument_position=>1,
    argument_value=>'777');
    DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE(job_name=>'CHMOD_ON_CCL',
    argument_position=>2,
    argument_value=>l_directory || '/' || loc_file_name);
    DBMS_SCHEDULER.ENABLE('CHMOD_ON_CCL');
    --execute the CCL file, this will run the scheduler
    DBMS_SCHEDULER.CREATE_JOB(job_name=>'EXECUTE_CCL',
    job_type=>'EXECUTABLE',
    job_action=>'/bin/sh',
    number_of_arguments=>1,
    enabled=>false,
    auto_drop=>true);
    DBMS_SCHEDULER.set_attribute('EXECUTE_CCL', 'credential_name', 'SCHED_USER');
    DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE(job_name=>'EXECUTE_CCL',
    argument_position=>1,
    argument_value=>l_directory || '/' || loc_file_name);
    DBMS_SCHEDULER.ENABLE('EXECUTE_CCL');
    --remove CCL file after scheudler runs
    DBMS_SCHEDULER.CREATE_JOB(job_name=>'REMOVE_CCL',
    job_type=>'EXECUTABLE',
    job_action=>'/bin/rm',
    number_of_arguments=>1,
    enabled=>false,
    auto_drop=>true);
    DBMS_SCHEDULER.set_attribute('REMOVE_CCL', 'credential_name', 'SCHED_USER');
    DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE(job_name=>'REMOVE_CCL',
    argument_position=>1,
    argument_value=>l_directory || '/' || loc_file_name);
    DBMS_SCHEDULER.ENABLE('REMOVE_CCL');
    "

    No problem at all, you can do the same by getting the output from env and unset the variables that are defined there manually. Start with
    unset PATH
    unset ORACLE_HOME
    unset LD_LIBRATY_PATH
    ad start your script again from this environment. The scheduler launches the jobs in an environment where hardly any variable is defined.
    R.

  • ORA-27369: job of type EXECUTABLE failed with exit code: No such file or directory

    Hi,
    I am using the scheduler to take backup of the dev database and it was working fine. Then I added notification to the scripts and then the scheduler started failing with the following code .
    BEGIN dbms_scheduler.run_job('BACKUP_DEV'); END;
    ERROR at line 1:
    ORA-27369: job of type EXECUTABLE failed with exit code: No such file or
    directory
    ORA-06512: at "SYS.DBMS_ISCHED", line 150
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
    ORA-06512: at line 1
    Here' the original which has no issues
    #!/bin/bash -x
    echo $@
    if [ -z "$ORACLE_HOME" ]; then
    source /path/oracle/.bash_profile
    fi
    RMAN="${ORACLE_HOME}/bin/rman";
    ${RMAN} $@
    exit $?
    And here's the one which gives me the errors. Also if I run this script from command line it works perfectly fine
    #!/bin/bash -x
    echo $@
    if [ -z "$ORACLE_HOME" ]; then
    source /path/oracle/.bash_profile
    fi
    RMAN="${ORACLE_HOME}/bin/rman";
    exec >> temp_log
    ${RMAN} $@
    /usr/bin/mailx -s "Backup status of $ORACLE_SID " [email protected] < temp_log
    /usr/bin/rm temp_log
    exit $?
    Pls let me know what could be the reason that the script fails with the scheduler.

    Hi,
    The user oracle who owns the scheduler already has permissions for the mailx and the same script is able to send notifications when run manully. Do I need to set additional permissions for scheduler ?
    Also the db version is 10.2.0.5.
    Thanks

  • ORA-27369: job of type EXECUTABLE failed with exit code: Unknown error STAN

    ORA-27369: job of type EXECUTABLE failed with exit code: Unknown error STANDARD_ERROR="execve: Exec format error"
    #!/usr/bin/ksh
    /bin/find /u08/oradba/S036/archlog -name "*.arc" -exec rm -f {} \;
    Simple shell script gives above error when scheduled through dbms_scheduler. I did check metalink notes everything seems to be in order.
    Thanks,
    Siva

    Hi,
    Make sure the script is set to be executable (chmod a+rx script.sh) and that /usr/bin/ksh exists and is executable.
    If it still doesn't work post the new error message and the output of "ls -l script.sh" and also your exact Oracle version. Also try running the shell script directly at the command line (e.g. ./script.sh).
    Hope this helps,
    Ravi.

  • CloudControl 12c: ORA-27370: job slave failed to launch a job of type EXEC

    Hello ,
    when trying to execute a scheduler program/scheduler job in CloudControl 12c I'm getting the error:
    ORA-27370: job slave failed to launch a job of type EXECUTABLE ORA-27300: OS system dependent operation:accessing extjob wrapper failed with status: 2 ORA-27301: OS failure message: No such file or directory ORA-27302: failure occurred at: sjsec 3
    Havent't found much regarding this error and CloudControl 12c. Any help will truly get appreciated...
    Rgds
    JH

    Hi Eric ,
    many thanks for your support and help so far.
    We still use GridControl 10g - and for that the programs/jobs executed by dbms_scheduler work fine since I have modified the configuration as suggested in your posts.
    But with CloudControl 12c I don't get that thing working - and I'm truly astonished that it doesn't work right away :-(
    The error
    ORA-27370: job slave failed to launch a job of type EXECUTABLE ORA-27300: OS system dependent operation:accessing extjob wrapper failed with status: 2 ORA-27301: OS failure message: No such file or directory ORA-27302: failure occurred at: sjsec 3
    still remains, no matter why I have changed. I haven't found any logfiles with some further errors on the server where the CloudControl is installed. And the view
    DBA_SCHEDULER_JOB_RUN_DETAILS doesn't contain any information at all.
    I anybody out there who has jobs/programs running without any problems under CloudControl12c?
    Our CloudControl ist installed under RedHat Linux EnterpriseEdition (5.7).
    Rgds
    JH

Maybe you are looking for

  • [N80] Is it possible to share files using WLAN 802...

    Hello. I dont have a Bluetooth connection but I would like to share files between my computer and my N80 using the WLAN not bluetooth. Thanks

  • Desktop Manager has encountered a problem and needs to close.

    My system was working fine until today.  Now after I sync my BB Pearl with Outlook i get this message and my Desktop Mgr shuts down.  I am running Desktop v4.2.2.14.   The syncing operation seems to be workign just fine but then the Desktop Mgr shuts

  • Not able to enable web access (http server) on 5500

    Hi i have 5500 Swtich iam not able to enable http server in it the message show below Core-Switch> (enable) show ip http HTTP Information HTTP server: disabled HTTP port: 800 Web Interface: Not supported HTTP active sessions: 0 Core-Switch> (enable)

  • Nokia Lumia 928 camera & video has a green screen

    I just recently got my new phone and the camera was working great as I have 5 kids and enjoy taking thier pictures and uploading them so family can see however this week when I attempted to take a photo the camera went to a green screen when I presse

  • MacBook iPhone Sync Creates Vertical Stripes on MacBook Screen

    I'm at a loss on this one... I have a black MacBook and I sync my iPhone 2G with it normally. Starting yesterday, when I sync my iPhone with it, iTunes starts the sync process normally, but after a few seconds, the screen switches to thin vertical co