Skip to Main Content

Oracle Database Discussions

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!

dbms_scheduler.create_job() job_type executable

user482717Jul 26 2006 — edited Aug 2 2006
I created a job using a dbms_scheduler.create_job()
here is the code:
BEGIN
DBMS_SCHEDULER.CREATE_JOB(
job_name=>'CRSJOB',
job_type=>'EXECUTABLE',
job_action=>'/tmp/crsrows2 > nul',
start_date=>SYSTIMESTAMP,
repeat_interval=>'freq=minutely; byminute=2',
end_date=>NULL,
ENABLED=>TRUE,
comments=>'crs listing job');
end;
/

here is the shell script:
#!/usr/bin/ksh
sqlplus -s regdb/password<<EOF
spool testcrs.dat;
select table_name from user_tables;
insert into abc
select table_name from user_tables;
spool off;
EOF

the shell script runs itself fine, but everytime when I run_job, I got the error that it can't open the file: /tmp/crsrows2.sh, not owner

what should i do? oracle is the owner of the shell script. it must be something so simple, but I can't fix it!

Thank you very much for your help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 30 2006
Added on Jul 26 2006
1 comment
618 views