Link to home
Start Free TrialLog in
Avatar of wscott30
wscott30

asked on

OS command from Oracle database

I can’t get an OS script to execute on the server machine from Oracle 11.2 dbms_scheduler (which I should be able to do).  Thanks!
Problem-Statement-OS-commmand.docx
Avatar of H
H
Flag of United States of America image

When the job type is executable, the job action is supposed to point to an executable without any arguments. So what is happening here is that the scheduler is looking for the file called "/NAS/ESG/apps/as/.bin/remove_as.sh' and not finding it.

Instead you should set the job action to just "/usr/bin/ksh", set number_of_arguments to 1, enabled to FALSE, then call set_job_argument_value with "/NAS/ESG/apps/as/.bin/remove_as.sh'" then enable the job.
ASKER CERTIFIED SOLUTION
Avatar of wscott30
wscott30

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Cool, glad you figured it out.  Thanks
Avatar of wscott30
wscott30

ASKER

I figured it out after discussing with our DBAs. This problem can occur when using NAS mounts to different servers and you try to invoke code that is not mounted to the database server. The code must reside on the database server or DBMS_SCHEDULER cannot find it.

Thanks!