DBMS_SCHEDULER
Hi,
I have a requirement where a table needs to be truncated periodically. Before truncating the table, I want to preserve the last 7 days of data in a separate history table.
My proposed approach is:
- Create a history table with the same/similar structure as the output table.
- Before truncating the output table, insert the required 7 days of data into the history table.
- Truncate the output table.
- Restore/reinsert the required records back into the output table from the history table.
- Automate this entire process as a scheduled job that runs once every week.
Is it possible to implement this using an Oracle scheduled job (DBMS_SCHEDULER)?
Tagged:
0