Skip to Main Content

Oracle Database Express Edition (XE)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with DBMS_SCHEDULER to run executable on Linux

Dietmar AustApr 4 2006 — edited Apr 17 2006

I cannot get this to work :(. Really strange.

The testcase works right out away using
- Oracle 10gR2 on Redhat AS 3
and
- Oracle XE beta1 on Debian

Here it is:

  1. set up the external file and make sure it works:
daust1> ls -lia go*
 213404 -rwxr-xr-x    1 oracle   oinstall       39 Apr  4 01:03 go.sh
daust1> cat go.sh
#!/bin/sh
date >> /tmp/go.log
exit 130
daust1> pwd
/tmp
daust1> go.sh
daust1> ls -lia go*
 213402 -rw-r--r--    1 oracle   oinstall       29 Apr  4 10:18 go.log
 213404 -rwxr-xr-x    1 oracle   oinstall       39 Apr  4 01:03 go.sh
  1. grant user HR the privileges to run the job:
grant CREATE EXTERNAL JOB to hr;
grant create job to hr;
  1. run job as user HR:
SQL> BEGIN
  2     DBMS_SCHEDULER.create_job (job_name             => 'SHELL_TEST'
  3                              , job_type             => 'EXECUTABLE'
  4                              , job_action           => '/tmp/go.sh'
  5                              , start_date           => SYSTIMESTAMP
  6                              , repeat_interval      => NULL
  7                              , end_date             => NULL
  8                              , enabled              => TRUE
  9                              , auto_drop            => TRUE
 10                              , comments             => 'Job defined entirely by the CREATE JOB procedure.');
 11  END;
 12  /

PL/SQL-Prozedur erfolgreich abgeschlossen.

RESULT:
a) the executable is not executed
2) I can see the job in USER_SCHEDULER_JOBS with state RUNNING
3) When I try to query

SQL> select * from USER_SCHEDULER_RUNNING_JOBS;

the session hangs and doesn't return.

Can somebody shed some light on it?
I reinstalled it but it didn't make a difference.

This is my configuration:
- old machine (512MB) running Redhat:
Red Hat Enterprise Linux ES release 3 (Taroon Update 3)
- glibc and libiao have the right versions
- I do also have Oracle 9.2.0.6, 10.2, 10.2 http server installed but not running
- I do not experience any other problems using XE.

And I see the following error in the alert.log:
Cannot determine all dependent dynamic libraries for /proc/self/exe
The open() system call failed for the file /proc/self/exe
Linux Error: 13: Permission denied

Thanks,
~Dietmar.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 15 2006
Added on Apr 4 2006
31 comments
1,493 views