PL/SQL procedure for table purging
I have a table within my DB that's growing at a very fast rate & i need to do some maintenance to prevent constant filling of the underlying tablespace. Just one month worth of records is necessary.
This is what I have in mind.
1. Create an identical temporary table as original table
2. Insert last one month records into temp table
3. Truncate the original table
4. Insert temporary table records into original table
5. truncate temporsry table.
All of above should be in a PL/SQL procedure or Unix shell script.
Does anyone have anything similar already working?
Thanks in advance...