Shell script for table purging [message #560885] |
Tue, 17 July 2012 11:48 |
divroro12
Messages: 105 Registered: March 2008 Location: Laurel, MD USA
|
Senior Member |
|
|
Hi Guys,
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 single shell script or a PL/SQL procedure.
Does anyone have anything similar already working?
Thanks in advance...
- divroro12 -
|
|
|
|
|
|