Oracle dataguard主备库创建闪回点及快照数据库与物理standby的切换方法

dg主备库创建闪回点:
Create Guaranteed Restore Points (optional)
The standard switchover fallback options should suffice for successfully backing out of a switchover. However, if you want an additional fallback option then you can create a guaranteed restore point on the primary and standby database participating in the switchover.

On the standby
Stop the apply process
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
Create a guaranteed restore point
SQL> CREATE RESTORE POINT SWITCHOVER_START_GRP GUARANTEE FLASHBACK DATABASE;
Start the apply process
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;

On the primary
Create a guaranteed restore point
SQL> CREATE RESTORE POINT SWITCHOVER_START_GRP GUARANTEE FLASHBACK DATABASE;


dg Snapshot StandbyPhysical standby备库的转换:
Steps to convert Physical Standby Database to the Snapshot Standby Database
The conversion from physical standby to snapshot standby database  can be done through the command 
ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;  
1) If not already configured , configure flash recovery area as given below 
a) Set the size for recovery area. 
Alter system set db_recovery_file_dest_size=<size> 
b) Set Flash recovery area. 
Alter system set db_recovery_file_dest=<path> 
2) Bring the physical standby database to mount stage.  
3) Stop managed recovery if it is active.  
4) Convert physical standby database to snapshot standby database.  
ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;  
The database is dismounted during conversion and must be restarted. 
Once the database is restarted  any transaction can be executed . 
SQL> select open_mode,database_role from v$database; 
OPEN_MODE  DATABASE_ROLE 
---------- ---------------- 
READ WRITE SNAPSHOT STANDBY

An implicit guaranteed restore point is created when a physical standby database is converted into a snapshot standby database and this restore point is used to flashback a snapshot standby to its original state when it is converted back into a physical standby database.

Steps to convert the Snapshot Standby Database to the Physical Standby Database
1. Shutdown the snapshot standby database. 
2. Bring the database to the mount stage. 
3. Issue the command 
ALTER DATABASE CONVERT TO PHYSICAL STANDBY; 
4. Shutdown the database and mount it . 
SQL> select open_mode,database_role from v$database; 
OPEN_MODE  DATABASE_ROLE 
---------- ---------------- 
MOUNTED    PHYSICAL STANDBY 
5. Start the media recovery process.

参考文章:
11g Using Snapshot Standby Database. (文档 ID 443720.1)
11.2 Data Guard Physical Standby Switchover Best Practices using SQL*Plus (文档 ID 1304939.1)
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值