My Oracle Support Banner

DBMS_SCHEDULER FAILS WITH ORA-27369 WHEN JOB TYPE IS EXECUTABLE (Doc ID 279866.1)

Last updated on JULY 05, 2023

Applies to:

Oracle Database - Enterprise Edition - Version 10.1.0.2 and later
Oracle Database Cloud Schema Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

Create a shell script to touch a file as below :-

cat /tmp/test.sh

#!/usr/bin/ksh
/usr/bin/touch /tmp/harry

on unix prompt we are able to run the script without any issues , but failing through dbms_scheduler after submitting the job as below

begin
dbms_scheduler.create_program
(
program_name => 'test',
program_type => 'EXECUTABLE',
program_action => '/tmp/test.sh',
enabled => TRUE,
comments => 'testing script'
);
end;


begin
dbms_scheduler.create_schedule
(
schedule_name => 'EVERY_5_MINS',
repeat_interval => 'FREQ=MINUTELY; INTERVAL=5',
comments => 'Every 5-mins'
);
end;

begin
dbms_scheduler.create_job
(
job_name => 'TEST',
program_name => 'TEST',
schedule_name => 'EVERY_5_MINS',
comments => 'test script ',
enabled => TRUE
);
end;


SQL> select status,run_duration,actual_start_date,additional_info
     from dbA_scheduler_job_run_details
     where job_name='TEST';


STATUS RUN_DURATION ACTUAL_START_DATE
------------- ------------------------- ---------------------------------------------------------
FAILED +000 00:00:01 02-AUG-04 10.53.35.650626 PM -06:00

ADDITIONAL_INFO
--------------------------------------------------------------------------------
ORA-27369: job of type EXECUTABLE failed with exit code: 256 <=====

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.