Oracle 11g DataGuard使用总结(3)

dataguard的搭建就完成了,可以在主库切换日志查看是否在备库数据库日志中会应用日志
Media Recovery Waiting for thread 1 sequence 12 (in transit)
Recovery of Online Redo Log: Thread 1 Group 4 Seq 12 Reading mem 0
  Mem# 0: /DATA/app/oracle/oradata/test11g/redo04.log

11g备库使用active dataguard特性。
SQL> alter database open;
 Database altered.

SQL>  recover managed standby database using current logfile disconnect from session;
 Media recovery complete.

switchover的问题答疑
 如果出现下面的错误,很可能当前操作系统用户下安装了多个数据库实例,取消默认的ORACLE_SID即可。
 或者直接使用dgmgrl sys/oracle@test11g 这种方式连接
DGMGRL> switchover to 'stest11g';
 Performing switchover NOW, please wait...
 Operation requires a connection to instance "test11g" on database "stest11g"
 Connecting to instance "test11g"...
 ORA-01017: invalid username/password; logon denied
 Warning: You are no longer connected to ORACLE.
        connect to instance "test11g" of database "stest11g"

切换正常,但是需要手工启动备库,切换其实是正常的,需要手工启动一下主库
 主要原因就是在listener.ora中需要配置一个xxxx_DGMGRL的global_name

DGMGRL> switchover to stest11g
 Performing switchover NOW, please wait...
 Operation requires a connection to instance "test11g" on database "stest11g"
 Connecting to instance "test11g"...
 Connected.
 New primary database "stest11g" is opening...
 Operation requires startup of instance "test11g" on database "test11g"
 Starting instance "test11g"...
 Unable to connect to database
 ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
 Failed.
 Warning: You are no longer connected to ORACLE.
 Please complete the following steps to finish switchover:
        start up instance "test11g" of database "test11g"

如果配置完全正确,正常切换的日志就会如下:
DGMGRL> switchover to stest11g;
 Performing switchover NOW, please wait...
 Operation requires a connection to instance "test11g" on database "stest11g"
 Connecting to instance "test11g"...
 Connected.
 New primary database "stest11g" is opening...
 Operation requires startup of instance "test11g" on database "test11g"
 Starting instance "test11g"...
 ORACLE instance started.
 Database mounted.
 Database opened.
 Switchover succeeded, new primary is "stest11g"
 DGMGRL>

最后还是希望大家能够合理使用dataguard,一切顺利。

CentOS 6.4下安装Oracle 11gR2(x64)

Oracle 11gR2 在VMWare虚拟机中安装步骤

Debian 下 安装 Oracle 11g XE R2

Oracle Data Guard 重要配置参数

基于同一主机配置 Oracle 11g Data Guard

探索Oracle之11g DataGuard

Oracle Data Guard (RAC+DG) 归档删除策略及脚本

Oracle Data Guard 的角色转换

Oracle Data Guard的日志FAL gap问题

Oracle 11g Data Guard Error 16143 Heartbeat failed to connect to standby 处理方法

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/336f81c0cb80cd27ae0ec1b442daf9af.html