-- Thanks for the question regarding "Lost all Redo log file", version 9208
Submitted on 15-Jul-2009 15:58 UTC
Last updated 14-Sep-2012 18:46
You Asked
Hi Tom,I am practising Recovery .
CASE 1)I have Development TEST DB in NON-ARCHIVE Mode. NEVER backed up.
All Redo log files including the active one ,are dropped from the OS.
How to recover such a DB. I dont mind loosing Transactions.
Is it possible ?
CASE 2 )I have Development TEST DB in ARCHIVE Mode. NEVER backed up.
All Redo log files including the active one ,are dropped from the OS.
Have all the archived logs.
How to recover such a DB. I dont mind loosing Transactions.
Is it possible ?
and we said...
1) if the database was open and you removed the redo and the database is not shutdown normal (eg: it crashed), you have just lost all of your data.If your redo was lost and the database was either
a) not running, had been shutdown NORMAL (not abort, not crashed), then you have no problem.
b) running - but you were able to shutdown normal (since in unix, erasing a file doesn't really erase it if someone has it open), then you have no problem.
But if the database was shutdown abort or otherwise crashed - you have lost it all.
sys%ORA9IR2> select log_mode from v$database; LOG_MODE ------------ NOARCHIVELOG sys%ORA9IR2> select member from v$logfile; MEMBER ------------------------------------------------------------------------------- /home/ora9ir2/oradata/ora9ir2/redo01.log /home/ora9ir2/oradata/ora9ir2/redo02.log /home/ora9ir2/oradata/ora9ir2/redo03.log sys%ORA9IR2> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. sys%ORA9IR2> !rm /home/ora9ir2/oradata/ora9ir2/redo01.log sys%ORA9IR2> !rm /home/ora9ir2/oradata/ora9ir2/redo02.log sys%ORA9IR2> !rm /home/ora9ir2/oradata/ora9ir2/redo03.log sys%ORA9IR2> startup ORACLE instance started. Total System Global Area 235999648 bytes Fixed Size 450976 bytes Variable Size 201326592 bytes Database Buffers 33554432 bytes Redo Buffers 667648 bytes Database mounted. ORA-00313: open failed for members of log group 1 of thread 1 ORA-00312: online log 1 thread 1: '/home/ora9ir2/oradata/ora9ir2/redo01.log' sys%ORA9IR2> shutdown ORA-01109: database not open Database dismounted. ORACLE instance shut down. sys%ORA9IR2> startup mount ORACLE instance started. Total System Global Area 235999648 bytes Fixed Size 450976 bytes Variable Size 201326592 bytes Database Buffers 33554432 bytes Redo Buffers 667648 bytes Database mounted. sys%ORA9IR2> alter database open resetlogs; alter database open resetlogs * ERROR at line 1: ORA-01139: RESETLOGS option only valid after an incomplete database recovery sys%ORA9IR2> recover database until cancel; Media recovery complete. sys%ORA9IR2> alter database open resetlogs; Database altered. sys%ORA9IR2> select member from v$logfile; MEMBER ------------------------------------------------------------------------------- /home/ora9ir2/oradata/ora9ir2/redo01.log /home/ora9ir2/oradata/ora9ir2/redo02.log /home/ora9ir2/oradata/ora9ir2/redo03.log sys%ORA9IR2> !ls -l /home/ora9ir2/oradata/ora9ir2/redo01.log -rw-rw---- 1 ora9ir2 ora9ir2 104858112 Jul 16 12:13 /home/ora9ir2/oradata/ora9ir2/redo01.log
2) same thing as above. If your database was shutdown clean AND THEN the logs were lost - no problem.
If your database was shutdown crashed - we needed those redo logs to perform instance crash recovery and you have just lost all of your data - your archives are useless.
Không có nhận xét nào:
Đăng nhận xét