Oracle dataguard主备库创建闪回点及快照数据库与物理standby的切换方法
2016-07-29 11:23
477 查看
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 Standby与Physical 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)
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 Standby与Physical 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)
相关文章推荐
- 【翻译自mos文章】重新创建物理standby database 的 控制文件的方法
- Duplicate复制数据库并创建物理StandBy(spfile版本)
- Duplicate复制数据库并创建物理StandBy(pfile版本)
- Duplicate复制数据库并创建物理StandBy(spfile+不同实例名+不同路径)
- Data Guard——使用 RMAN 创建单实例物理(physical) standby 数据库
- Oracle Data Guard 创建物理Standby数据库
- Duplicate复制数据库并创建物理StandBy(spfile+不同实例名)
- 在单机上创建物理的Oracle9i standby数据库
- 在单机上创建物理的 Oracle9i standby 数据库笔记 from:www.dbanotes.net
- Duplicate复制数据库并创建物理StandBy(pfile版本)
- 创建数据库快照的唯一方法
- 在单机上创建物理的Oracle9i standby数据库
- 创建standby过程(cp物理文件)
- WEB程序打包的详细方法,并自动创建数据库
- 自己手动创建dataset的方法(不用从数据库倒入)
- 创建一个空的IBM DB2 ECO数据库的方法
- sql server 2005 修改计算机主机名后 ,无法创建数据库发布的解决方法
- 无法在app_data目录中创建数据库的解决方法
- 一步一步学DataGuard(3)物理standby之创建步骤(1)
- php为什么选mysql作为数据库? Mysql 创建用户方法