oracle data guard broker配置与使用(下)
来源:互联网 发布:linux编译链接 编辑:程序博客网 时间:2024/05/19 18:48
nohup dgmgrl sys/oracle@db1 'start observer' &
后台挂起进程
switchover 切换测试
1:把主库dg1
[oracle@dg1 ~]$ dgmgrl sys/manager
DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected.
DGMGRL> show configuration
Configuration - dg
Protection Mode: MaxAvailability
Databases:
dg1 - Primary database
dg2 - (*) Physical standby database
Fast-Start Failover: ENABLED
Configuration Status:
SUCCESS
主库切换到备库
DGMGRL> switchover to 'dg2';
Performing switchover NOW, please wait...
Operation requires a connection to instance "orcl" on database "dg2"
Connecting to instance "orcl"...
Connected.
New primary database "dg2" is opening...
Operation requires startup of instance "orcl" on database "dg1"
Starting instance "orcl"...
ORACLE instance started.
Database mounted.
Database opened.
Switchover succeeded, new primary is "dg2"
DGMGRL> show configuration;
Configuration - dg
Protection Mode: MaxAvailability
Databases:
dg2 - Primary database
dg1 - (*) Physical standby database
Fast-Start Failover: ENABLED
Configuration Status:
SUCCESS
Note:切换成功
DGMGRL> switchover to 'dg2';
Performing switchover NOW, please wait...
Error: ORA-16558: database specified for switchover is not a standby database
Failed.
Unable to switchover, primary database is still "dg2"
将新主库切换为备库
DGMGRL> exit
[oracle@dg1 ~]$ dgmgrl sys/manager@dg2
DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected.
DGMGRL> show configuration
Configuration - dg
Protection Mode: MaxAvailability
Databases:
dg2 - Primary database
dg1 - (*) Physical standby database
Fast-Start Failover: ENABLED
Configuration Status:
SUCCESS
DGMGRL> switchover to 'dg1';
Performing switchover NOW, please wait...
Operation requires a connection to instance "orcl" on database "dg1"
Connecting to instance "orcl"...
Connected.
New primary database "dg1" is opening...
Operation requires startup of instance "orcl" on database "dg2"
Starting instance "orcl"...
ORACLE instance started.
Database mounted.
Database opened.
Switchover succeeded, new primary is "dg1"
DGMGRL>
Note切换成功
测试failover
主库
SQL> shutdown abort
ORACLE instance shut down.
DGMGRL> start observer
Observer started
18:10:41.98 Tuesday, July 25, 2017
Initiating Fast-Start Failover to database "dg2"...
Performing failover NOW, please wait...
Failover succeeded, new primary is "dg2"
18:10:44.46 Tuesday, July 25, 2017
新主库
SQL> select open_mode,database_role,log_mode,flashback_on from v$database;
OPEN_MODE DATABASE_ROLE LOG_MODE FLASHBACK_ON
-------------------- ---------------- ------------ ------------------
READ WRITE PRIMARY ARCHIVELOG YES
[oracle@dg1 ~]$ dgmgrl sys/manager@dg2
DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected.
DGMGRL> show configuration
Configuration - dg
Protection Mode: MaxAvailability
Databases:
dg2 - Primary database
Warning: ORA-16817: unsynchronized fast-start failover configuration
dg1 - (*) Physical standby database (disabled)
ORA-16661: the standby database needs to be reinstated
Fast-Start Failover: ENABLED
Configuration Status:
WARNING
启动
DGMGRL> connect sys/manager@dg1
Connected.
DGMGRL> startup
ORACLE instance started.
Database mounted.
ORA-16649: possible failover to another database prevents this database from being opened
DGMGRL> start observer
Observer started
18:10:41.98 Tuesday, July 25, 2017
Initiating Fast-Start Failover to database "dg2"...
Performing failover NOW, please wait...
Failover succeeded, new primary is "dg2"
18:10:44.46 Tuesday, July 25, 2017
18:14:41.93 Tuesday, July 25, 2017
Initiating reinstatement for database "dg1"...
Reinstating database "dg1", please wait...
Operation requires shutdown of instance "orcl" on database "dg1"
Shutting down instance "orcl"...
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "orcl" on database "dg1"
Starting instance "orcl"...
ORACLE instance started.
Database mounted.
Continuing to reinstate database "dg1" ...
Reinstatement of database "dg1" succeeded
18:15:44.57 Tuesday, July 25, 2017
[oracle@dg1 ~]$ dgmgrl sys/manager@dg1
DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected.
DGMGRL> show configuration
Configuration - dg
Protection Mode: MaxAvailability
Databases:
dg2 - Primary database
dg1 - (*) Physical standby database
Fast-Start Failover: ENABLED
Configuration Status:
SUCCESS
后台挂起进程
switchover 切换测试
1:把主库dg1
[oracle@dg1 ~]$ dgmgrl sys/manager
DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected.
DGMGRL> show configuration
Configuration - dg
Protection Mode: MaxAvailability
Databases:
dg1 - Primary database
dg2 - (*) Physical standby database
Fast-Start Failover: ENABLED
Configuration Status:
SUCCESS
主库切换到备库
DGMGRL> switchover to 'dg2';
Performing switchover NOW, please wait...
Operation requires a connection to instance "orcl" on database "dg2"
Connecting to instance "orcl"...
Connected.
New primary database "dg2" is opening...
Operation requires startup of instance "orcl" on database "dg1"
Starting instance "orcl"...
ORACLE instance started.
Database mounted.
Database opened.
Switchover succeeded, new primary is "dg2"
DGMGRL> show configuration;
Configuration - dg
Protection Mode: MaxAvailability
Databases:
dg2 - Primary database
dg1 - (*) Physical standby database
Fast-Start Failover: ENABLED
Configuration Status:
SUCCESS
Note:切换成功
DGMGRL> switchover to 'dg2';
Performing switchover NOW, please wait...
Error: ORA-16558: database specified for switchover is not a standby database
Failed.
Unable to switchover, primary database is still "dg2"
将新主库切换为备库
DGMGRL> exit
[oracle@dg1 ~]$ dgmgrl sys/manager@dg2
DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected.
DGMGRL> show configuration
Configuration - dg
Protection Mode: MaxAvailability
Databases:
dg2 - Primary database
dg1 - (*) Physical standby database
Fast-Start Failover: ENABLED
Configuration Status:
SUCCESS
DGMGRL> switchover to 'dg1';
Performing switchover NOW, please wait...
Operation requires a connection to instance "orcl" on database "dg1"
Connecting to instance "orcl"...
Connected.
New primary database "dg1" is opening...
Operation requires startup of instance "orcl" on database "dg2"
Starting instance "orcl"...
ORACLE instance started.
Database mounted.
Database opened.
Switchover succeeded, new primary is "dg1"
DGMGRL>
Note切换成功
测试failover
主库
SQL> shutdown abort
ORACLE instance shut down.
DGMGRL> start observer
Observer started
18:10:41.98 Tuesday, July 25, 2017
Initiating Fast-Start Failover to database "dg2"...
Performing failover NOW, please wait...
Failover succeeded, new primary is "dg2"
18:10:44.46 Tuesday, July 25, 2017
新主库
SQL> select open_mode,database_role,log_mode,flashback_on from v$database;
OPEN_MODE DATABASE_ROLE LOG_MODE FLASHBACK_ON
-------------------- ---------------- ------------ ------------------
READ WRITE PRIMARY ARCHIVELOG YES
[oracle@dg1 ~]$ dgmgrl sys/manager@dg2
DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected.
DGMGRL> show configuration
Configuration - dg
Protection Mode: MaxAvailability
Databases:
dg2 - Primary database
Warning: ORA-16817: unsynchronized fast-start failover configuration
dg1 - (*) Physical standby database (disabled)
ORA-16661: the standby database needs to be reinstated
Fast-Start Failover: ENABLED
Configuration Status:
WARNING
启动
DGMGRL> connect sys/manager@dg1
Connected.
DGMGRL> startup
ORACLE instance started.
Database mounted.
ORA-16649: possible failover to another database prevents this database from being opened
DGMGRL> start observer
Observer started
18:10:41.98 Tuesday, July 25, 2017
Initiating Fast-Start Failover to database "dg2"...
Performing failover NOW, please wait...
Failover succeeded, new primary is "dg2"
18:10:44.46 Tuesday, July 25, 2017
18:14:41.93 Tuesday, July 25, 2017
Initiating reinstatement for database "dg1"...
Reinstating database "dg1", please wait...
Operation requires shutdown of instance "orcl" on database "dg1"
Shutting down instance "orcl"...
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "orcl" on database "dg1"
Starting instance "orcl"...
ORACLE instance started.
Database mounted.
Continuing to reinstate database "dg1" ...
Reinstatement of database "dg1" succeeded
18:15:44.57 Tuesday, July 25, 2017
[oracle@dg1 ~]$ dgmgrl sys/manager@dg1
DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected.
DGMGRL> show configuration
Configuration - dg
Protection Mode: MaxAvailability
Databases:
dg2 - Primary database
dg1 - (*) Physical standby database
Fast-Start Failover: ENABLED
Configuration Status:
SUCCESS
阅读全文
0 0
- oracle data guard broker配置与使用(下)
- oracle data guard broker配置与使用(上)
- Data Guard Broker配置
- Data Guard Broker配置篇
- Oracle 10g Data Guard Broker 配置文档
- Oracle 10g Data Guard Broker 配置文档
- Oracle 10g Data Guard Broker 配置文档
- Oracle 11g Data Guard之主备库切换(switchover不使用DG Broker)
- 查看Data Guard同步--使用Broker
- oracle 10g Data Guard Broker的一个Bug
- 用Broker搭建Oracle Data Guard的必须注意知识点
- Oracle 11g Data Guard Broker Switchover Fast_start Failover
- Oracle 11g Data Guard Broker操作笔记
- 配置data guard broker时遇到的几个问题
- 配置data guard broker时遇到的几个问题
- Oracle Data Guard配置手记
- Oracle Data Guard配置手记
- Oracle Data Guard 环境配置
- BeanFactory管理Bean的生命周期
- numpy.transpose对三维数组的转置
- 不同版本的Oracle数据库的用户密码加密算法
- C#多线程学习笔记
- spring cloud 入门实践系列
- oracle data guard broker配置与使用(下)
- 华硕ASUS 笔记本 改WIN7 BIOS 设置详解
- 如何在面试过程中提升实力
- 杭电第一次多校赛_1001_Add_More_Zero_2017_7_25
- 武汉大学国际软件学院夏令营笔试和面试简介
- 用户资源访问
- Java多线程(一)——实现多线程的两种方式
- 河工APP文档
- 散列