[20140422]使用dgmgrl管理dataguard(11)

简介: [20140422]使用dgmgrl管理dataguard(11).txt 参考链接: http://blog.itpub.net/267265/viewspace-1142649/ http://blog.

[20140422]使用dgmgrl管理dataguard(11).txt

参考链接:
http://blog.itpub.net/267265/viewspace-1142649/
http://blog.itpub.net/267265/viewspace-1143027/
http://blog.itpub.net/267265/viewspace-1143058/
http://blog.itpub.net/267265/viewspace-1143126/
http://blog.itpub.net/267265/viewspace-1143480/
http://blog.itpub.net/267265/viewspace-1144742/
http://blog.itpub.net/267265/viewspace-1145573/
http://blog.itpub.net/267265/viewspace-1145697/
http://blog.itpub.net/267265/viewspace-1145727/
http://blog.itpub.net/267265/viewspace-1146558/

-- 我的测试环境:primary的tnsnames别名test,standby主机的tnsnames别名testdg。数据库版本:
-- 前面的测试要设置在MaxAvailability模式,LogXptMode='SYNC',按照文档的介绍在MaxPerformance也可以,再做一个测试看看.

DGMGRL> show configuration
Configuration - study
  Protection Mode: MaxAvailability
  Databases:
    test   - Primary database
    testdg - (*) Physical standby database
Fast-Start Failover: ENABLED
Configuration Status:
SUCCESS

DGMGRL> disable  FAST_START FAILOVER
Disabled.

DGMGRL> edit configuration  SET PROTECTION MODE AS MaxPerformance;
Succeeded.
--修改为MaxPerformance mode.

DGMGRL> enable fast_start failover
Error: ORA-16651: requirements not met for enabling fast-start failover

Failed.

$ oerr ora 16651
16651, 0000, "requirements not met for enabling fast-start failover"
// *Cause:  The attempt to enable fast-start failover could not be completed
//          because one or more requirements were not met:
//          - The Data Guard configuration must be in either MaxAvailability
//            or MaxPerformance protection mode.
//          - The LogXptMode property for both the primary database and
//            the fast-start failover target standby database must be
//            set to SYNC if the configuration protection mode is set to
//            MaxAvailability mode.
//          - The LogXptMode property for both the primary database and
//            the fast-start failover target standby database must be
//            set to ASYNC if the configuration protection mode is set to
//            MaxPerformance mode.
//          - The primary database and the fast-start failover target standby
//            database must both have flashback enabled.
//          - No valid target standby database was specified in the primary
//            database FastStartFailoverTarget property prior to the attempt
//            to enable fast-start failover, and more than one standby
//            database exists in the Data Guard configuration.
// *Action: Retry the command after correcting the issue:
//          - Set the Data Guard configuration to either MaxAvailability
//            or MaxPerformance protection mode.
//          - Ensure that the LogXptMode property for both the primary
//            database and the fast-start failover target standby database
//            are set to SYNC if the configuration protection mode is set to
//            MaxAvailability.
//          - Ensure that the LogXptMode property for both the primary
//            database and the fast-start failover target standby database
//            are set to ASYNC if the configuration protection mode is set to
//            MaxPerformance.
//          - Ensure that both the primary database and the fast-start failover
//            target standby database have flashback enabled.
//          - Set the primary database FastStartFailoverTarget property to
//            the DB_UNIQUE_NAME value of the desired target standby database
//            and the desired target standby database FastStartFailoverTarget
//            property to the DB_UNIQUE_NAME value of the primary database.

--MaxPerformance mode下,设置LogXptMode必须是ASYNC,why? 搞不懂为什么要这样?

DGMGRL> show database test LogXptMode
  LogXptMode = 'SYNC'
DGMGRL> show database testdg LogXptMode
  LogXptMode = 'SYNC'

DGMGRL> edit database test set PROPERTY LogXptMode='ASYNC';
Property "logxptmode" updated
DGMGRL> edit database testdg set PROPERTY LogXptMode='ASYNC';
Property "logxptmode" updated

DGMGRL> show database verbose test FastStartFailoverTarget ;
  FastStartFailoverTarget = 'testdg'
DGMGRL> show database verbose testdg FastStartFailoverTarget ;
  FastStartFailoverTarget = 'test'

DGMGRL> enable fast_start failover
Enabled.

DGMGRL> show configuration
Configuration - study
  Protection Mode: MaxPerformance
  Databases:
    test   - Primary database
    testdg - (*) Physical standby database
Fast-Start Failover: ENABLED
Configuration Status:
SUCCESS

--OK,FSFO配置成功.

查看Observer的信息.

09:10:37.19  Tuesday, April 22, 2014
Initiating Fast-Start Failover to database "testdg"...
Performing failover NOW, please wait...
Failover succeeded, new primary is "testdg"
09:10:47.89  Tuesday, April 22, 2014

SYS@testdg> select database_role,open_mode,protection_mode,force_logging,FLASHBACK_ON from v$database;

DATABASE_ROLE    OPEN_MODE            PROTECTION_MODE      FOR FLASHBACK_ON
---------------- -------------------- -------------------- --- ------------------
PRIMARY          READ WRITE           MAXIMUM PERFORMANCE  YES YES

SYS@testdg> select * from scott.dept1 where deptno=60;
    DEPTNO DNAME          LOC
---------- -------------- -------------
        60 MMMM           DDDDDD

DGMGRL> show configuration

Configuration - study

  Protection Mode: MaxPerformance
  Databases:
    testdg - Primary database
      Warning: ORA-16829: fast-start failover configuration is lagging

    test   - (*) Physical standby database (disabled)
      ORA-16661: the standby database needs to be reinstated


--重新启动reinstated后,一切正常.

Fast-Start Failover: ENABLED

Configuration Status:
WARNING

DGMGRL> show configuration

Configuration - study

  Protection Mode: MaxPerformance
  Databases:
    testdg - Primary database
    test   - (*) Physical standby database

Fast-Start Failover: ENABLED

Configuration Status:
SUCCESS

DGMGRL> switchover to test;
Performing switchover NOW, please wait...
New primary database "test" is opening...
Operation requires shutdown of instance "testdg" on database "testdg"
Shutting down instance "testdg"...
ORACLE instance shut down.
Operation requires startup of instance "testdg" on database "testdg"
Starting instance "testdg"...
ORACLE instance started.
Database mounted.
Database opened.
Switchover succeeded, new primary is "test"
DGMGRL> show configuration

Configuration - study

  Protection Mode: MaxPerformance
  Databases:
    test   - Primary database
    testdg - (*) Physical standby database

Fast-Start Failover: ENABLED

Configuration Status:
SUCCESS

总结:
不知道为什么MaxPerformance mode下,设置LogXptMode必须是ASYNC,才能使用FSFO.

目录
相关文章
|
SQL
DATAGUARD(11.2.0.4) ORA-04021
DATAGUARD(11.2.0.4) ORA-04021
288 0
|
Oracle 网络协议 关系型数据库
|
数据库 Go 测试技术
[20151109]使用dgmgrl管理dataguard(15)
[20151109]使用dgmgrl管理dataguard(15).txt 参考链接: http://blog.itpub.net/267265/viewspace-1142649/ http://blog.
1085 0
|
SQL 监控 Oracle
11g dataguard使用总结
11g的dataguard相比于10g来说,最优越的特性应该算就是active dataguard了,这一点改进在很大意义上促使用户需要把数据库从10g升级到11g,读写分离在这个时候得到了升华,而且在后台会根据需要进行数据的同步,相比于使用10g,想读数据的时候把数据库启动到read only 阶段,但这个时候不接受日志同步数据,如果需要同步数据还需要把数据库再启动到mount阶段,感觉还是比较繁琐的。
1267 0
dataguard dubugs
alter database open read only;alter database open read only*ERROR at line 1:ORA-10456: cannot open standby database; media recovery session may be in...
744 0
|
Oracle 关系型数据库 数据库
配置DATAGUARD时报ORA-12528
说明:在dataguard的搭建中,运行rman恢复的时候报错ORA-12528的错误; 脚本如下:RMAN>  connect auxiliary sys/oracle@SCMPRD02     解决...
963 0
|
Oracle 关系型数据库 数据库
[20140422]使用dgmgrl管理dataguard(12)
[20140422]使用dgmgrl管理dataguard(12).txt 参考链接: http://blog.itpub.net/267265/viewspace-1142649/ http://blog.
957 0
|
SQL Oracle 关系型数据库
[20140422]使用dgmgrl管理dataguard(13)
[20140422]使用dgmgrl管理dataguard(13).txt 参考链接: http://blog.itpub.net/267265/viewspace-1142649/ http://blog.
1004 0

热门文章

最新文章