Data Guard相关的动态性能视图
1.查看进程的活动状况---v$managed_standby
www.zzzyk.com
该视图就是专为显示standby数据库相关进程的当前状态信息,例如:
[html]
SQL> select process,client_process,sequence#,status from v$managed_standby;
PROCESS CLIENT_P SEQUENCE# STATUS
--------- -------- ---------- ------------
ARCH ARCH 39 CLOSING
ARCH ARCH 40 CLOSING
RFS LGWR 41 IDLE
RFS ARCH 0 IDLE
MRP0 N/A 41 WAIT_FOR_LOG
RFS N/A 0 IDLE
6 rows selected.
通过上述查询可以得知primary开了两个归档进程,使用lgwr同步传输方式与standby通信,已经接收完40的日志,正等待41。 www.zzzyk.com
2.确认redo应用进度---v$archive_dest_status
该视图显示归档文件路径配置信息及redo的应用情况等,例如:
[html]
SQL> select dest_name,archived_thread#,archived_seq#,applied_thread#,applied_seq#,db_unique_name from v$archive_dest_status where status='VALID';
DEST_NAME ARCHIVED_THREAD# ARCHIVED_SEQ# APPLIED_THREAD# APPLIED_SEQ# DB_UNIQUE_NAME
-------------------- ---------------- ------------- --------------- ------------ ------------------------------
LOG_ARCHIVE_DEST_1 1 40 0 0 10gstandby
LOG_ARCHIVE_DEST_2 0 0 0 0 10gpri
STANDBY_ARCHIVE_DEST 1 39 1 39 NONE
3.检查归档文件路径及创建信息---v$archived_log
该视图查询standby数据库归档文件的一些附加信息,比如文件创建时间啦,创建进程啦,归档序号啦,是否被应用啦之类,例如:
[html]
SQL> select name,creator,sequence#,applied,completion_time from v$archived_log;
NAME CREATOR SEQUENCE# APP COMPLETIO
---------------------------------------------------------------------- ------- ---------- --- ---------
/u01/app/oracle/oradata/orcl/archivelog/1_13_793805797.dbf ARCH 13 YES 20-SEP-12
/u01/app/oracle/oradata/orcl/archivelog/1_14_793805797.dbf ARCH 14 YES 20-SEP-12
/u01/app/oracle/oradata/orcl/archivelog/1_15_793805797.dbf ARCH 15 YES 20-SEP-12
/u01/app/oracle/oradata/orcl/archivelog/1_16_793805797.dbf ARCH 16 YES 20-SEP-12
/u01/app/oracle/oradata/orcl/archivelog/1_17_793805797.dbf ARCH 17 YES 20-SEP-12
/u01/app/oracle/oradata/orcl/archivelog/1_18_793805797.dbf ARCH 18 YES 20-SEP-12
/u01/app/oracle/oradata/orcl/archivelog/1_19_793805797.dbf ARCH 19 YES 20-SEP-12
/u01/app/oracle/oradata/orcl/archivelog/1_20_793805797.dbf ARCH 20 YES 20-SEP-12
/u01/app/oracle/oradata/orcl/archivelog/1_21_793805797.dbf ARCH 21 YES 20-SEP-12
/u01/app/oracle/oradata/orcl/archivelog/1_22_793805797.dbf ARCH 22 YES 17-JAN-13
/u01/app/oracle/oradata/orcl/archivelog/1_23_793805797.dbf ARCH 23 YES 17-JAN-13
/u01/app/oracle/oradata/orcl/archivelog/1_24_793805797.dbf ARCH 24 YES 17-JAN-13
/u01/app/oracle/oradata/orcl/archivelog/1_25_793805797.dbf ARCH 25 YES 17-JAN-13
/u01/app/oracle/oradata/orcl/archivelog/1_26_793805797.dbf ARCH 26 YES 17-JAN-13
/u01/app/oracle/oradata/orcl/archivelog/1_27_793805797.dbf ARCH 27 YES 17-JAN-13
/u01/app/oracle/oradata/orcl/archivelog/1_28_793805797.dbf ARCH 28 YES 17-JAN-13
/u01/app/oracle/oradata/orcl/archivelog/1_29_793805797.dbf ARCH 29 YES 17-JAN-13
/u01/app/oracle/oradata/orcl/archivelog/1_30_793805797.dbf ARCH 30 YES 17-JAN-13
/u01/app/oracle/oradata/orcl/archivelog/1_31_793805797.dbf ARCH 31 YES 17-JAN-13
/u01/app/oracle/oradata/orcl/archivelog/1_32_793805797.dbf ARCH 32 YES 17-JAN-13
/u01/app/oracle/oradata/orcl/archivelog/1_33_793805797.dbf ARCH 33 YES 17-JAN-13
/u01/app/oracle/oradata/orcl/archivelog/1_34_793805797.dbf ARCH 34 YES 17-JAN-13
/u01/app/oracle/oradata/orcl/archivelog/1_35_793805797.dbf ARCH 35 YES 17-JAN-13
/u01/app/oracle/oradata/orcl/archivelog/1_36_793805797.dbf ARCH 36 YES 17-JAN-13
/u01/app/oracle/oradata/orcl/archivelog/1_37_793805797.dbf &