****************************Part Three:恢复Standby DB ***************************
SQL> select name from v$restore_point;
NAME
--------------------------------------------------
CURRENT_APPLY_MODE
SQL> FLASHBACK DATABASE TO RESTORE POINT CURRENT_APPLY_MODE;
SQL> alter database convert to physical standby;
Database altered.
SQL> alter database recover managed standby database disconnect from session;
Database altered.
此时,standby 的archive log 应用状况
SQL> select * from (
2 select name,sequence#,archived,applied
3 from v$archived_log
4 order by sequence# desc )
5 where rownum < 3;
NAME SEQUENCE# ARC APP
-------------------------------------------------- ---------- --- ---
/home/oracle/standby_archive/1_14_762489444.dbf 14 YES YES
/home/oracle/standby_archive/1_13_762489444.dbf 13 YES YES
还原standby库完成
重新打开primary库的远程归档
SQL> alter system set log_archive_dest_state_2=ENABLE;
System altered.
查看standby 库的alert log:
==========================================================
Media Recovery Waiting for thread 1 sequence 15
Mon Nov 21 00:30:15 2011
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[1]: Assigned to RFS process 16611
RFS[1]: Identified database type as 'physical standby'
Mon Nov 21 00:30:15 2011
RFS LogMiner: Client disabled from further notification
Mon Nov 21 00:30:16 2011
Fetching gap sequence in thread 1, gap sequence 15-15
Mon Nov 21 00:30:44 2011
RFS[1]: Archived Log: '/home/oracle/standby_archive/1_15_762489444.dbf'
Mon Nov 21 00:30:52 2011
Media Recovery Log /home/oracle/standby_archive/1_15_762489444.dbf
Mon Nov 21 00:31:02 2011
db_recovery_file_dest_size of 2048 MB is 1.14% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Mon Nov 21 00:31:10 2011
RFS[1]: Archived Log: '/home/oracle/standby_archive/1_16_762489444.dbf'
Mon Nov 21 00:31:25 2011
Media Recovery Log /home/oracle/standby_archive/1_16_762489444.dbf
Mon Nov 21 00:32:00 2011
Media Recovery Waiting for thread 1 sequence 17
==========================================================
SQL> select * from (
2 select name,sequence#,archived,applied
3 from v$archived_log
4 order by sequence# desc )
5 where rownum < 5;
NAME SEQUENCE# ARC APP
-------------------------------------------------- ---------- --- ---
/home/oracle/standby_archive/1_16_762489444.dbf 16 YES YES //apply成功
/home/oracle/standby_archive/1_15_762489444.dbf 15 YES YES //apply成功
/home/oracle/standby_archive/1_14_762489444.dbf 14 YES YES
/home/oracle/standby_archive/1_13_762489444.dbf 13 YES YES
参考:
http://blog.china.com/u/071030/89253/201007/6726428.html
http://yangtingkun.itpub.net/post/468/51346
如有错误,请不吝赐教~
物理DG以WR方式打开 - 测试COPY功能后 恢复 standby应用日志。(三)
最新推荐文章于 2024-07-23 13:44:55 发布