DG主备库归档文件名受各自log_archive_format参数影响

长平狐 发布于 2013/09/17 15:11
阅读 76
收藏 0
证明DG主备库归档文件名受各自log_archive_format参数影响
DG1 主库,DG2备库。

一、DG正常运行在最大可用模式。

使用的是alter database recover managed standby database disconnect from session;进行恢复

BYS@dg1>show parameter log_archive_format
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_format                   string      arc_%t_%s_%r.arctest
BYS@dg2>show parameter log_archive_format
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_format                   string      arc_%t_%s_%r.arc

1.在主库上进行归档,产生的归档文件如下:

45、46号归档是未改变 主库 log_archive_format之前生成的归档。
[oracle@dg1 archivelog]$ ls
arc_1_45_821829622.arc   arc_1_47_821829622.arctest
arc_1_46_821829622.arc arc_1_48_821829622.arctest

2.在备库上查看,47 48号归档是备库的

日志
Thu Aug 08 15:15:48 2013
Archived Log entry 33 added for thread 1 sequence 47 ID 0x676c9833 dest 1:
Thu Aug 08 15:15:50 2013
Media Recovery Log /u01/archivelog/arc_1_47_821829622.arc
Media Recovery Waiting for thread 1 sequence 48 (in transit)
Changing standby controlfile to MAXIMUM AVAILABILITY level
Thu Aug 08 15:15:51 2013
Archived Log entry 34 added for thread 1 sequence 48 ID 0x676c9833 dest 1:
RFS[5]: Selected log 4 for thread 1 sequence 49 dbid 1735160627 branch 821829622
Media Recovery Log /u01/archivelog/arc_1_48_821829622.arc
Media Recovery Waiting for thread 1 sequence 49 (in transit)
[oracle@dg2 archivelog]$ ls
arc_1_45_821829622.arc   arc_1_47_821829622.arc
arc_1_46_821829622.arc arc_1_48_821829622.arc


二、在最大性能模式下也是这样DG:主备库归档文件名受各自log_archive_format参数影响:

使用的是alter database recover managed standby database disconnect from session;进行恢复
BYS@dg1>select protection_mode,database_role,protection_level from v$database;
PROTECTION_MODE      DATABASE_ROLE    PROTECTION_LEVEL
-------------------- ---------------- --------------------
MAXIMUM PERFORMANCE  PRIMARY          MAXIMUM PERFORMANCE
BYS@dg1>alter system switch logfile;
SYS@dg2>select protection_mode,database_role,protection_level from v$database;
PROTECTION_MODE      DATABASE_ROLE    PROTECTION_LEVEL
-------------------- ---------------- --------------------

MAXIMUM PERFORMANCE  PHYSICAL STANDBY MAXIMUM PERFORMANCE

查看归档文件,主、备库格式不同

[oracle@dg1 archivelog]$ ls
arc_1_45_821829622.arc      arc_1_50_821829622.arctest
arc_1_46_821829622.arc      arc_1_51_821829622.arctest
arc_1_47_821829622.arctest  arc_1_52_821829622.arctest
arc_1_48_821829622.arctest   arc_1_53_821829622.arctest
arc_1_49_821829622.arctest
[oracle@dg2 ~]$ ls /u01/archivelog/
arc_1_45_821829622.arc  arc_1_50_821829622.arc
arc_1_46_821829622.arc  arc_1_51_821829622.arc
arc_1_47_821829622.arc  arc_1_52_821829622.arc
arc_1_48_821829622.arc arc_1_53_821829622.arc
arc_1_49_821829622.arc

日志:

[oracle@dg2 ~]$ cat alert_dg.log
Thu Aug 08 15:51:47 2013
RFS[2]: Assigned to RFS process 3732
RFS[2]: Identified database type as 'physical standby': Client is ARCH pid 3915
RFS[2]: Selected log 4 for thread 1 sequence 53 dbid 1735160627 branch 821829622
Thu Aug 08 15:51:47 2013
Archived Log entry 39 added for thread 1 sequence 53 ID 0x676c9833 dest 1:
Thu Aug 08 15:51:55 2013
Thu Aug 08 15:51:55 2013
Media Recovery Log /u01/archivelog/arc_1_53_821829622.arc
Media Recovery Waiting for thread 1 sequence 54

原文链接:http://blog.csdn.net/q947817003/article/details/11528297
加载中
返回顶部
顶部