I’m looking to create a trigger or some other Oracle mechanism to delete old records from a table. The table in question has a “date creted” DateTime column. I’d like to periodically delete rows that are a month old. Does oracle support “periodic tasks”, or can/should this be accomplished by an Insert/Update trigger. I don’t think that I can modify other rows in a tablewhen a trigger is triggering on that same table.
Is something like this best handled programatically? I am accessing the database through a .NET application and am thinking it might be best to mantain this programmaticly.
Look at DBMS_SCHEDULER. It will let you set up scheduled jobs.
Official Docs: http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_sched.htm
Helpful summary with examples: http://psoug.org/reference/dbms_scheduler.html