Hallo!
I have a Oracle XE 11g DB running on Debian.
On /tmp/ I create a Script called mdtest.sh and a file called test.
This script is quiet easy and only for testing:
#!/bin/bash
mv test test2
The rights of the files are:
| -rwxrwxrwx 1 oracle | dba | 26 Nov 25 15:00 mdtest.sh |
| -rwxrwxrwx 1 oracle | dba | 0 Nov 25 15:01 test |
I looked in the Internet how to configure dbms_scheduler.
So I create a file on my Debian OS called /u01/app/oracle/product/11.2.0/xe/rdbms/admin/externaljob.ora (didn't exist)
with the following rights:
-rw-r----- 1 root dba 35 Nov 18 14:47 externaljob.ora
and I added the following content:
run_user = oracle
run_group = dba
The file /u01/app/oracle/product/11.2.0/xe/bin/extjob has the following rights:
-rwsr-x--- 1 root dba 608048 Aug 29 2011 extjob
On my DB I created the user pdb a granted to him 'dba' rights.
Then I connected as this user with SQL Developer to the DB.
Then I executed the following statement:
BEGIN
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'my_job',
job_type => 'EXECUTABLE',
job_action => '/tmp/mdtest.sh',
enabled => TRUE
);
END;
whith the following message:
'anonymous block completed'
Then when I execute the following statement:
SELECT * FROM user_scheduler_jobs WHERE job_name = 'MY_JOB';
But it shows no row.
There is something going wrong.
Have I an error in my configuration?
Thanks for any help!
Gerhard