ORA-27369: job of type EXECUTABLE failed with exit code: Permission denied [message #669240] |
Mon, 09 April 2018 10:04 |
|
krish96
Messages: 74 Registered: October 2012
|
Member |
|
|
Hello,
Expdp scheduler fails with "ORA-27369: job of type EXECUTABLE failed with exit code: Permission denied"..
chown root $ORACLE_HOME/bin/extjob
chmod 4750 $ORACLE_HOME/bin/extjob
chown root $ORACLE_HOME/rdbms/admin/externaljob.ora
chmod 640 $ORACLE_HOME/rdbms/admin/externaljob.ora
chown root $ORACLE_HOME/bin/jssu
chmod 4750 $ORACLE_HOME/bin/jssu
-rwsr-x--- 1 root dba 3.8M Apr 9 09:54 jssu
-rwsr-x--- 1 root dba 3.7M Apr 9 09:54 extjob
-rw-r----- 1 root dba 1.5K Dec 21 2005 externaljob.ora
I have verified all the permissions and job is still failing with the same error..
please let me know your thoughts where i am missing ..
Thanks a lot in advance ...
|
|
|
|
|
Re: ORA-27369: job of type EXECUTABLE failed with exit code: Permission denied [message #669244 is a reply to message #669242] |
Mon, 09 April 2018 10:15 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Received from OP in a PM:BEGIN
SYS.DBMS_SCHEDULER.DROP_JOB
(job_name => 'ORACLE.DATAPUMP_NIGHTLY_EXPORT');
END;
/
BEGIN
SYS.DBMS_SCHEDULER.CREATE_JOB
(
job_name => 'ORACLE.DATAPUMP_NIGHTLY_EXPORT'
,start_date => TO_TIMESTAMP_TZ('2018/04/04 20:00:00.000000 US/Eastern','yyyy/mm/dd hh24:mi:ss.ff tzr')
,repeat_interval => 'FREQ=DAILY;BYDAY=MON,TUE,WED,THU,FRI,SAT;BYHOUR=20;BYMINUTE=0;BYSECOND=0'
,end_date => NULL
,job_class => 'DEFAULT_JOB_CLASS'
,job_type => 'EXECUTABLE'
,job_action => '/dir1/test.bat'
,comments => 'Standard nightly datapump export for testdb'
);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'ORACLE.DATAPUMP_NIGHTLY_EXPORT'
,attribute => 'RESTARTABLE'
,value => FALSE);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'ORACLE.DATAPUMP_NIGHTLY_EXPORT'
,attribute => 'LOGGING_LEVEL'
,value => SYS.DBMS_SCHEDULER.LOGGING_OFF);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
( name => 'ORACLE.DATAPUMP_NIGHTLY_EXPORT'
,attribute => 'MAX_FAILURES');
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
( name => 'ORACLE.DATAPUMP_NIGHTLY_EXPORT'
,attribute => 'MAX_RUNS');
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'ORACLE.DATAPUMP_NIGHTLY_EXPORT'
,attribute => 'STOP_ON_WINDOW_CLOSE'
,value => FALSE);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'ORACLE.DATAPUMP_NIGHTLY_EXPORT'
,attribute => 'JOB_PRIORITY'
,value => 3);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
( name => 'ORACLE.DATAPUMP_NIGHTLY_EXPORT'
,attribute => 'SCHEDULE_LIMIT');
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'ORACLE.DATAPUMP_NIGHTLY_EXPORT'
,attribute => 'AUTO_DROP'
,value => TRUE);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'ORACLE.DATAPUMP_NIGHTLY_EXPORT'
,attribute => 'number_of_arguments'
,value => 2);
SYS.DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE
( job_name => 'ORACLE.DATAPUMP_NIGHTLY_EXPORT'
,argument_position => 1
,argument_value => 'EMREP');
SYS.DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE
( job_name => 'ORACLE.DATAPUMP_NIGHTLY_EXPORT'
,argument_position => 2
,argument_value => 'AMERICAN_AMERICA.test1db');
SYS.DBMS_SCHEDULER.ENABLE
(name => 'ORACLE.DATAPUMP_NIGHTLY_EXPORT');
END;
/
|
|
|
Re: ORA-27369: job of type EXECUTABLE failed with exit code: Permission denied [message #669245 is a reply to message #669244] |
Mon, 09 April 2018 10:21 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
This is never going to work.
First, you have not given the job a credential. So it will be running under whatever account is named in externaljob.ora (probably user nobody).
Second, the executable you need to run would be a shell, such as /bin/sh, not a script.
Third, test.bat is a pretty unusual name for a Solaris shell script.
Just take it easy. Try to run a shell script. One that does very little and needs nothing fancy. Then slowly build up to what you need to do.
|
|
|
Re: ORA-27369: job of type EXECUTABLE failed with exit code: Permission denied [message #669247 is a reply to message #669241] |
Mon, 09 April 2018 11:09 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
A wise man once told me, "First make it work, then make it fancy".
Create a two line file named /tmp/batch as below
#!/bin/bash
env | /bin/sort -o /tmp/batch_capture.env
run OS command below
chmod 777 /tmp/batch
create & run necessary PL/SQL code which invokes /tmp/batch & produces /tmp/batch_capture.env
next run OS commands below
ls -l /tmp/batch*
cat /tmp/batch_capture.env
COPY the results from above then PASTE all back here
|
|
|