Skip to Main Content
  • Questions
  • Scheduler for executable in oracle 8i

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Janardhan.

Asked: March 01, 2016 - 5:53 am UTC

Last updated: March 01, 2016 - 7:23 am UTC

Version: oracle 8i

Viewed 1000+ times

You Asked

Hi tom

Requirement was there to load csv data to database.
I have done that using SQL Loader in Oracle 8i.
But to schedule that job in any frequency (daily or minutely) I am not able to create dbms_scheduler in oracle 8i
My code to create dbms_scheduler is as below and i did this with SYS user:
begin
dbms_scheduler.create_job (
job_name => 'load_csv',
job_type => 'executable',
job_action => '/home/oracle/startload.bat',
start_date => '01-mar-2016 11:00:00 am',
repeat_interval => 'freq=minutely',
enabled => true);
end;
/
But it says
ORA-06550: line 2, column 1:
PLS-00201: identifier 'DBMS_SCHEDULER.CREATE_JOB' must be declared
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored

I have achieved it through windows task scheduler but can't rely on it
so kindly guide me to execute my "startload.bat" @ oracle 8i, in any frequency .
Thanks

and Connor said...

You cannot run external executables directly in 8i. But you could have a little java wrapper around it.

See https://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:952229840241 for how do it.

This then gives you a PL/SQL procedure which in effect can run a host command.

You can then schedule the PL/SQL procedure in the normal way using dbms_job.

Hope this helps.

Is this answer out of date? If it is, please let us know via a Comment

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library