1

I want to have an sql update-statement executed once at date x. How can I achieve this on an Oracle 10g database?

EDIT:
My aim is to fire an update statement every day. Why? I have a tiny mistake in my application, that can be 'temporarily fixed' with this statement (since I only have db-access till the real fix will happen).

Jonny

user871611
  • 3,307
  • 7
  • 51
  • 73
  • Do you mean where date is equal to something (select * from table where date = XX-XX-XX), otherwise would I do this in a scripting language, such as php. Its easier and you have better control in my mind than doing it straight SQL. – StenW Apr 01 '13 at 11:33
  • possible duplicate of [How to schedule a work to run at particular time using dbms\_scheduler](http://stackoverflow.com/questions/14016842/how-to-schedule-a-work-to-run-at-particular-time-using-dbms-scheduler) – Ben Mar 02 '14 at 14:04

2 Answers2

2

Consider DBMS_SCHEDULER. It is meant for running jobs periodically, but you can set up your pl/sql job script to suspend or cancel the job entry after your run-once job ends successfully.

http://docs.oracle.com/cd/B28359_01/server.111/b28310/scheduse.htm

jim mcnamara
  • 16,005
  • 2
  • 34
  • 51
1

You can use Crontab to schedule a task to be executed at given day/time.

See: http://en.wikipedia.org/wiki/Crontab

Mariusz Jamro
  • 30,615
  • 24
  • 120
  • 162
  • thanks for the quick reply. unfortunately i don't have access on the machine itself. i only have rights on the database. – user871611 Apr 01 '13 at 11:49