Space Management: How to calculate UNDO space need to shrink a segment ?
Hello All,
We used to shrink Tables using the commands -
-- Enable row movement.
ALTER TABLE <owner>.<table> ENABLE ROW MOVEMENT;
-- Recover space for the object and all dependant objects.
ALTER TABLE <owner>.<table> SHRINK SPACE CASCADE;
We use to check the current UNDO tablespace usage, before these commands.
But some times this will fail with the below error !
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDO'
I suspect there should be enough UNDO space for this shrinking (At lease the size of the table, i think).
How can we calculate, the exact UNDO space required for a table to shrink..
Regards,
-Rajesh Menon