Dataguard物理备库switchover
2011-09-09 15:01
197 查看
一:switchover同failover的区别
A switchover allows the primary database to switch roles with its standby database. There is no data loss during a switchover. You can switch back to the original Primary database later by performing another switchover.
In case of primary database failure, you will need to perform failover to transition the standby database to the primary role. After a failover, the original primary database can no longer participate in the Data Guard configuration. So if the original Primary database is still accessible, you should always consider a switchover first.
以上概况来讲就是可以自由的主库和备库间进行switchover切换,期间不会有数据的丢失;faliover只有在主库故障的情况下,才需要去执行,当执行过failover,原先的主库将不再参与data guard的配置,所以在主库可用的情况下,应当先进行switchover
二:Before Switchover:
1. test the Switchover first on your testing systems before working on Production.
2. Verify the primary database instance is open and the standby database instance is mounted.
3. Verify there are no active users connected to the databases.
4. Make sure the last redo data transmitted from the Primary database was applied on the standby database.
Issue the following commands on Primary database and Standby database to find out:
Perform SWITCH LOGFILE if necessary.
SQL>select sequence#, applied from v$archvied_log;
In order to apply redo data to the standby database as soon as it is received, use Real-time apply.
在执行switchover切换前应当进行测试,验证主库是否处在open状态,备库是否处在mount状态,保证没有用户连接到数据库,确定所有从主库传送过来redolog在备库上都应经成功应用,可以使用实时应用redolog来提高备库应用redolog的实时性!
三:Quick Switchover Steps
切换后的主库:
SQL> select name,database_role,switchover_status from v$database;
NAME DATABASE_ROLE SWITCHOVER_STATUS
--------- ---------------- --------------------
ORCL PRIMARY SESSIONS ACTIVE
切换后的备库:
SQL> select name,database_role,switchover_status from v$database;
NAME DATABASE_ROLE SWITCHOVER_STATUS
--------- ---------------- --------------------
ORCL PHYSICAL STANDBY TO PRIMARY
SQL> alter database recover managed standby database disconnect from session;
Database altered.
本文出自 “斩月” 博客,谢绝转载!
A switchover allows the primary database to switch roles with its standby database. There is no data loss during a switchover. You can switch back to the original Primary database later by performing another switchover.
In case of primary database failure, you will need to perform failover to transition the standby database to the primary role. After a failover, the original primary database can no longer participate in the Data Guard configuration. So if the original Primary database is still accessible, you should always consider a switchover first.
以上概况来讲就是可以自由的主库和备库间进行switchover切换,期间不会有数据的丢失;faliover只有在主库故障的情况下,才需要去执行,当执行过failover,原先的主库将不再参与data guard的配置,所以在主库可用的情况下,应当先进行switchover
二:Before Switchover:
1. test the Switchover first on your testing systems before working on Production.
2. Verify the primary database instance is open and the standby database instance is mounted.
3. Verify there are no active users connected to the databases.
4. Make sure the last redo data transmitted from the Primary database was applied on the standby database.
Issue the following commands on Primary database and Standby database to find out:
Perform SWITCH LOGFILE if necessary.
SQL>select sequence#, applied from v$archvied_log;
In order to apply redo data to the standby database as soon as it is received, use Real-time apply.
在执行switchover切换前应当进行测试,验证主库是否处在open状态,备库是否处在mount状态,保证没有用户连接到数据库,确定所有从主库传送过来redolog在备库上都应经成功应用,可以使用实时应用redolog来提高备库应用redolog的实时性!
三:Quick Switchover Steps
1. Initiate the switchover on the primary database: SQL>connect / as sysdba Connected. SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN; Database altered. 2. After step 1 finishes, Switch the original physical standby db to primary role; SQL> connect / as sysdba Connected. SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY; Database altered 3. Immediately after issuing command in step 2, shut down and restart the former primary instance PRIM: SQL> shutdown immediate ORA-01507: database not mounted ORACLE instance shut down SQL> startup mount ORACLE instance started. Total System Global Area 167772160 bytes Fixed Size 1218316 bytes Variable Size 92276980 bytes Database Buffers 71303168 bytes Redo Buffers 2973696 bytes Database mounted. 4. After step 3 completes: SQL> shutdown immediate ORA-01507: database not mounted ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 167772160 bytes Fixed Size 1218316 bytes Variable Size 96471284 bytes Database Buffers 67108864 bytes Redo Buffers 2973696 bytes Database mounted. Database opened. SQL> alter system switch logfile; System altered.
切换后的主库:
SQL> select name,database_role,switchover_status from v$database;
NAME DATABASE_ROLE SWITCHOVER_STATUS
--------- ---------------- --------------------
ORCL PRIMARY SESSIONS ACTIVE
切换后的备库:
SQL> select name,database_role,switchover_status from v$database;
NAME DATABASE_ROLE SWITCHOVER_STATUS
--------- ---------------- --------------------
ORCL PHYSICAL STANDBY TO PRIMARY
SQL> alter database recover managed standby database disconnect from session;
Database altered.
本文出自 “斩月” 博客,谢绝转载!
相关文章推荐
- Oracle 10g R2 DataGuard之物理standby的switchover和failover
- 一步一步学DataGuard(6)物理standby之switchover
- Dataguard的switchover和failover
- Oracle 10g dataguard维护,配置自动fast_start switchover
- Dataguard的switchover和failover
- Oracle12cR1 DataGuard物理备库启用real-time apply
- redhat 6.4 oracle11g dataguard 物理备库切换快照备库演示
- 12c DataGuard switchover to 'primary'
- 10g物理standby主备switchover方式切换详述
- dataguard之管理物理备库
- dataguard创建物理备库几个关键参数详解
- 物理Standby Switchover 角色转换
- 11G R2 rac to 11G R2 rac dataguard Switchover
- 通过Rman方式创建Oracle11g DataGuard物理备库
- Oracle10gR2 Dataguard: 建立一个ASM实例存储的物理备库
- Dataguard实战(5):RHEL4.5 安装 Oracle10G Dataguard 多个备库 - 建立物理备库一(主机vmtwo)
- Data guard 之物理standy switchover
- Oracle学习之DATAGUARD(八) Switchover与failover
- switch_status not allowed等物理dataguard 正常切换 脚色转换
- oracle dataguard switchover切换