Home » SQL & PL/SQL » SQL & PL/SQL » Dbms_schedule (Oracle Database, 10g, Windows 7)
Dbms_schedule [message #650302] Fri, 22 April 2016 00:30 Go to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
Hi,

I need to query from table "A" on hourly basis and on the query results I need to populate data in table "B". I am using SCOTT user and the tables are in SCOOT's scheme.

For that I thought that the DBMS_SCHEDULE can help me out in this situation.

So I tried to create a schedule. Which is as follows:

Begin

Dbms_Schedule.Create_Schedule (
Schedule_Name => 'SAVE_THE_WORLD',
Repeat_Interval => 'FREQ=MINUTELY; INTERVAL=60',
Comments => 'Execute this task every 60 minutes. For processing table A and B');
End;


But I received following error:

ERROR at line 3:
ORA-06550: line 3, column 1:
PLS-00201: identifier 'DBMS_SCHEDULE.CREATE_SCHEDULE' must be declared
ORA-06550: line3, column 1:
PL/SQL:Statment ignored


Before that I grant following to SCOTT:

Grant Execute on DBMS_SCHEDULER to Scott;
Grant Create Job to Scott;
Grant Create External Job to Scott;
Grant Scheduler_Admin to Scott;
Grant All on Dbms_Scheduler to Scott;


After the grants still receiving the above ERROR.

Re: Dbms_schedule [message #650303 is a reply to message #650302] Fri, 22 April 2016 00:44 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
Grant Create External Job to Scott;


Why?

Quote:
Grant Scheduler_Admin to Scott


Why?

Quote:
Grant All on Dbms_Scheduler to Scott;


Why?

You need to work scientifically not to shot in the dark.
Why don't grant all roles to SCOTT and all system privileges and pick up all objects and grant ALL on them to SCOTT to be sure to not miss something?

Or maybe just check if Dbms_Schedule exists?

Re: Dbms_schedule [message #650307 is a reply to message #650302] Fri, 22 April 2016 03:08 Go to previous message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
And to completely spell it out, note the name difference between:
azamkhan wrote on Fri, 22 April 2016 06:30

Dbms_Schedule.Create_Schedule (

and
Quote:

Grant Execute on DBMS_SCHEDULER to Scott;

Previous Topic: Nested table with object type
Next Topic: Dynamic SQL - with CONCAT function
Goto Forum:
  


Current Time: Fri Apr 19 18:55:07 CDT 2024