Home » SQL & PL/SQL » SQL & PL/SQL » scheduler (Oracle 9i)
scheduler [message #334567] Thu, 17 July 2008 02:49 Go to next message
subbu_tce
Messages: 98
Registered: July 2007
Location: pune
Member
Dear All,
When am trying to run the below block am getting insufficient privileges.What to do ?

BEGIN
dbms_scheduler.create_job(
job_name => 'DEMO_JOB_SCHEDULE'
,job_type => 'PLSQL_BLOCK'
,job_action => 'begin FDL_SCHEDULARE_PROC; end; '
,start_date => SYSDATE+.05/24
,repeat_interval => 'FREQ=DAILY'
,enabled => TRUE
,comments => 'Demo for job schedule.');
END;
/

[Edit MC: Change name from "schedulare" to "scheduler"]

[Updated on: Thu, 17 July 2008 04:12] by Moderator

Report message to a moderator

Re: schedulare [message #334574 is a reply to message #334567] Thu, 17 July 2008 03:10 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Get a DBA to grant you EXECUTE on Dbms_Scheduler
Re: schedulare [message #334582 is a reply to message #334567] Thu, 17 July 2008 04:04 Go to previous messageGo to next message
sarwagya
Messages: 87
Registered: February 2008
Location: Republic of Nepal
Member
GRANT CREATE JOB TO <user>
Re: scheduler [message #334585 is a reply to message #334567] Thu, 17 July 2008 04:11 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Scheduler does not exist in 9i.

Regards
Michel
Re: scheduler [message #334589 is a reply to message #334585] Thu, 17 July 2008 04:37 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Well spotted Michel.
Re: scheduler [message #334593 is a reply to message #334567] Thu, 17 July 2008 05:06 Go to previous messageGo to next message
mfinn
Messages: 9
Registered: July 2008
Location: UK
Junior Member
Yep. DBMS_SCHEDULER was introduced in 10g and supersedes DBMS_JOB.

For 9i use DBMS_JOB
Re: scheduler [message #334594 is a reply to message #334593] Thu, 17 July 2008 05:10 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
DBMS_SCHEDULER does NOT supersedes DBMS_JOB, it is a COMPLEMENT of DBMS_JOB.

Regards
Michel
Re: scheduler [message #334602 is a reply to message #334567] Thu, 17 July 2008 05:57 Go to previous messageGo to next message
krishnamoorthi
Messages: 4
Registered: July 2008
Location: annur coimbatore india
Junior Member
Hi

In 9i i've done successfully...

DECLARE
jno NUMBER;
BEGIN
dbms_job.submit(jno,'proc1;',sysdate,'sysdate + 0.1/1440',true);
commit;
END;

Rgds
Krish
Re: scheduler [message #334603 is a reply to message #334594] Thu, 17 July 2008 05:57 Go to previous messageGo to next message
mfinn
Messages: 9
Registered: July 2008
Location: UK
Junior Member
Here is the documentation from Oracle, which states that it supersedes DBMS_JOB:

http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_job.htm

Quote:
The DBMS_JOB package has been superseded by the DBMS_SCHEDULER package. In particular, if you are administering jobs to manage system load, you should consider disabling DBMS_JOB by revoking the package execution privilege for users.

Re: scheduler [message #334605 is a reply to message #334603] Thu, 17 July 2008 06:06 Go to previous message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
So it is a documentation bug as it does NOT supersede it.
(Actually I think Oracle wants to "sell" its new feature.)

DBMS_JOB is transactional, DBMS_SCHEDULER is not. I mean you can use dbms_job as part of your transaction whereas you can't with dbms_scheduler.

Regards
Michel

[Updated on: Thu, 17 July 2008 06:07]

Report message to a moderator

Previous Topic: CHR(30)
Next Topic: Query taking 6 sec to return 2 rows
Goto Forum:
  


Current Time: Fri Dec 09 23:17:59 CST 2016

Total time taken to generate the page: 0.08628 seconds