Saturday, May 28, 2011

Salvage database / recover from incomplete fuzzy backup

PLEASE NOTE :-

NEVER TRY THIS ON PRODUCTION DATABASE

DO NOT TRY THIS without consultation with Support on any database.

THERE IS NO GURANTEE OF DATA RECOVERY.

Case :- I received below errors on my home use practice database when some cleanup script deleted "redo-log" files and archive files. And to add to it last database shutdown was "shutdown abort" :-(

 ------------------------------------------ Error Message 1) ------------------------------------------

WARNING! Recovering data file 1 from a fuzzy file. If not the current file
it might be an online backup taken without entering the begin backup command.
WARNING! Recovering data file 2 from a fuzzy file. If not the current file
it might be an online backup taken without entering the begin backup command.
WARNING! Recovering data file 3 from a fuzzy file. If not the current file
it might be an online backup taken without entering the begin backup command.
WARNING! Recovering data file 4 from a fuzzy file. If not the current file
.....

 ------------------------------------------ Solution to error 1) ------------------------------------------

_ALLOW_RESETLOGS_CORRUPTION= TRUE
_ALLOW_READ_ONLY_CORRUPTION=TRUE

 ------------------------------------------ Error Message 2) ------------------------------------------

ALTER DATABASE OPEN
ORA-1589 signalled during: ALTER DATABASE OPEN...
Sat May 28 19:28:56 2011

 ------------------------------------------ Solution to error 2) ------------------------------------------

alter database open resetlogs

You can ignore below warnings :-

Sat May 28 19:30:10 2011
Errors in file e:\oracle\admin\tdms\udump\tdms_ora_4008.trc:
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: 'E:\ORACLE\ORADATA\TDMS\REDO03.LOG'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.
Sat May 28 19:30:50 2011
LGWR: Primary database is in CLUSTER CONSISTENT mode
Assigning activation ID 2799243297 (0xa6d91021)
Thread 1 opened at log sequence 1
  Current log# 2 seq# 1 mem# 0: E:\ORACLE\ORADATA\TDMS\REDO02.LOG
Successful open of redo thread 1.

 ------------------------------------------ Error Message 3) ------------------------------------------

ORA-00600: internal error code, arguments: [2662], [0], [160681026], [0], [160681068], [4194313], [], []

 ------------------------------------------ Solution to error 3) ------------------------------------------

Event = "10619 trace name context forever, level 1"

With each shutdown and restart the gap between 3rd and 5th argument should decrease. Shutdown and restart database till error is resolved.

 ------------------------------------------ Error Message 4) ------------------------------------------

ORA-00600: internal error code, arguments: [4193], [4228], [4232], [], [], [], [], []

Solution to error 4) :-

shutdown database

UNDO_MANAGEMENT=MANUAL

startup database

create undo tablespace UNDOTBS01 datafile 'E:\oracle\oradata\tdms\UNDOTBS1.DBF' size 500M;

drop old undo tablespace.

drop tablespace UNDOTBS1 including contents and datafiles;

shutdown database

UNDO_MANAGEMENT=AUTO
undo_tablespace = UNDOTBS01

startup database

No comments:

Post a Comment