This content has been marked as final. Show 4 replies
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,
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
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.
In my script, I have log files but I cannot see it. I guess the job fails directly withoutYes that is what I mean to have redirection in your script itself. Perhaps have a simple
hitting the redirection line in the script.
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.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).
I am using 10.2.0.2 RAC. The Unix script runs successfully every night.
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.
Thanks very much, Ravi.