基于序列号 (sequence number)
做不完全恢复之前,要给数据库做一个备份 这里用rman 做
sequence number是指 redo log的序列号
SQL> create table scott.test1(n1 number);
SQL> insert into scott.test1 values(1);
SQL> insert into scott.test1 values(2);
SQL> commit;
SQL> alter system switch logfile;
SQL> insert into scott.test1 values(3);
SQL> insert into scott.test1 values(4);
SQL> commit;
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIME
----- ------- ---------- ----- ------- --- ------ ------------- ----------
1 1 11 104857600 1 NO CURRENT 305030 2007-12-03:18:39:21
2 1 9 104857600 1 YES INACTIVE 284753 2007-12-03:18:09:52
3 1 10 104857600 1 YES ACTIVE 304755 2007-12-03:18:17:49
SQL> shutdown abort
1号组为当前组,将其破坏
SQL> startup mount
RUN {
SET UNTIL SEQUENCE 11 THREAD 1;
RESTORE DATABASE;
RECOVER DATABASE;
ALTER DATABASE OPEN RESESTLOGS;}
SQL> select * from scott.test1
2 /
N1
----------
1
2
scott.test1 中3,4没有归档,丢失
阅读(2048) | 评论(0) | 转发(0) |