Home » SQL & PL/SQL » SQL & PL/SQL » runing sql script periodically (OS-windows NT, oracle 10.2)
runing sql script periodically [message #399679] Thu, 23 April 2009 08:08 Go to next message
ridhi_sundar
Messages: 184
Registered: November 2007
Location: Bangalore
Senior Member
Hi

I need to run a .sql script every 1 hour. Can any one tell some utility or way to do it?

I tried dbms_job.submit

Quote:

declare
v_job number;
begin
sys.dbms_job.submit(job => v_job,what => '@x.sql;',next_date => sysdate,interval => 'sysdate + 1/24');
commit;
end;
/


It is giving an error as encountered symbol @ when expecting.....


please help
Re: runing sql script periodically [message #399680 is a reply to message #399679] Thu, 23 April 2009 08:15 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Put the statements in a procedure or an anonymous PL/SQL block and execute it.
Or use dbms_scheduler.
Now not all is possible, it depends on what you want to do inside the script.

Regards
Michel
Previous Topic: Facing a problem while using DBMS_JOB
Next Topic: Rowid
Goto Forum:
  


Current Time: Sun Dec 04 10:38:19 CST 2016

Total time taken to generate the page: 0.09142 seconds