This discussion is archived
4 Replies Latest reply: Jun 20, 2007 11:23 AM by 389975 Branched to a new discussion. RSS

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

389975 Newbie
Currently Being Moderated
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
  • 1. Re: ORA-27369: job of type EXECUTABLE failed with exit code: Not owner
    RnR Pro
    Currently Being Moderated
    Hi,

    What happens is that the Scheduler is receiving an error number and converting the error number into the system error message corresponding to the system error number. So "No owner" is your platform's system error message for the error number returned by the script.

    To figure out why the script is failing on 10gR2 you can look in the additional_info column of jobrun_details to see if there are any standard_error messages.

    On 10gR1 and 10gR2 you can redirect the stdout/stderr within your script and take a look at those log files.

    Note that in your script you will need to set any environment variables required (e.g. ORACLE_HOME and PATH) and you will need to make sure that the user that external jobs run as must be able to run your script. On 10.2.0.3 and up external jobs run as the run-user in the rdbms/admin/externaljob.ora file. In previous releases external jobs run as the owner of the bin/extjob file.

    Hope this helps,
    Ravi.
  • 2. Re: ORA-27369: job of type EXECUTABLE failed with exit code: Not owner
    389975 Newbie
    Currently Being Moderated
    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
  • 3. Re: ORA-27369: job of type EXECUTABLE failed with exit code: Not owner
    RnR Pro
    Currently Being Moderated
    Hi,
    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.
    Yes that is what I mean to have redirection in your script itself. Perhaps have a simple
    date > /tmp/out.log
    at the beginning of the script ? The other way, having the redirection as part of the job_action will not work.
    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.
    Right and external jobs need to run as some OS user. On 10.2.0.2 regular user external jobs run an the OS user that owns the $ORACLE_HOME/bin/extjob executable which is nobody by default (and typically nobody can't do a lot).

    On 10.2.0.2 external jobs in the SYS schema run as the OS user that oracle runs as so that may be useful for some purposes.

    Hope this clears things up a bit.

    -Ravi
  • 4. Re: ORA-27369: job of type EXECUTABLE failed with exit code: Not owner
    389975 Newbie
    Currently Being Moderated
    Thanks very much, Ravi.