Suffering from corruption in your database, it is nearly just as challenging as in real life…
The other day we suffered from a curruption in a 500+ Gigabyte database, as a sequentual dberify would take about 16+ hours I wrote this one below which starts the dbv’s in nohup in parallel. My dbv finished within the hour, system performance will drop though;)
Have to delete a large number of records and running out of undo tablespace ‘ORA-30036: unable to extend segment by 8 in undo tablespace ‘UNDO’? Script below does a delete with intermediate commits ever ‘x’ records.
declare
-- commit every 'i_commit' rows
i_commit pls_integer := 1000;
-- row counter, 'i_rowcount' rows deleted
i_rowcount pls_integer := 0;
begin
-- define 'infinite' loop
loop
-- delete 'i_commit' rows
delete from obj
where rownum <= i_commit;
i_rowcount := i_rowcount + sql%rowcount;
-- now it's time to exit the loop
if sql%rowcount = 0 then
commit;
exit;
end if;
commit;
end
dbverify in nohup
Suffering from corruption in your database, it is nearly just as challenging as in real life…
The other day we suffered from a curruption in a 500+ Gigabyte database, as a sequentual dberify would take about 16+ hours I wrote this one below which starts the dbv’s in nohup in parallel. My dbv finished within the hour, system performance will drop though;)
Read more →