Saturday, August 1, 2009

Inconsisten Recovery Database

Untuk masalah recovery inconsitent (open resetlogs)
misal kita akan restore dari full backup dan restore archive log sampai sequence tertentu
untuk recovery karena ada table yang hilang/tertruncate maka sebelum nya kita check dl
kapan kira2 table tersebut terdrop atau tertruncate

check dl archive log
select * from v$archived_log
where creator <> 'RMAN'

kita bisa memperkirakan harus sampai sequence atau time atau scn berapa kita bisa restore
dan recover

script nya berikut :

RUN {      SET UNTIL SCN 1000;      
 # Alternatives:   # SET UNTIL TIME 'Nov 15 2004 09:00:00';   # SET UNTIL SEQUENCE 9923;     RESTORE DATABASE;   RECOVER DATABASE; }

yang sudah saya coba
sampai sequence ke 7

RUN {    # SET UNTIL SCN 1000;       # Alternatives:   # SET UNTIL TIME 'Nov 15 2004 09:00:00';   SET UNTIL SEQUENCE 8;     RESTORE DATABASE;   RECOVER DATABASE; 
  ALTER DATABASE OPEN RESETLOGS;  }

and DONE

mudah2an berguna :)

tambahan lagi
kita check yu, hasil backup yang bisa direstore
dari incremental nya
petunjuk bisa direstore sampe sequence, scn atau sampai waktu kapan

select sequence#,
to_char(first_time, 'DD-MM-YY HH24:MI:SS') timebkp
from v$backup_archivelog_details;

select name,
sequence#,
registrar,
to_char(first_time, 'DD-MM-YY HH24:MI:SS') timearc
from v$archived_log

:D ....

No comments:

Post a Comment