ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 11g data guard 新特性

11g data guard 新特性

Linux操作系统 作者:dbhelper 时间:2014-12-05 12:25:37 0 删除 编辑

Oracle Active Data Guard

Oracle Active Data Guard 是 Oracle 数据库 11g 企业版的选件之一,该选件可通过将资源密集型工作负载卸载到一个或多个同步备用数据库来提升服务质量。Active Data Guard 针对查询、实时报表、基于 Web 的访问等支持对物理备用数据库进行只读访问,同时可继续应用接收自生产数据库的更改。Active Data Guard 还通过支持使用物理备份数据库进行 RMAN 块更改和快速增量备份,消除了在生产数据库上执行备份引起的开销。

11g 以前的版本physical standby open read only 和 日志应用是不能同时进行

开启Active Data Guard

 

SQL> startup mount

ORACLE instance started.

 

Total System Global Area 1707446272 bytes

Fixed Size                  1345408 bytes

Variable Size             989857920 bytes

Database Buffers          704643072 bytes

Redo Buffers               11599872 bytes

Database mounted.

SQL> alter database open read only;

 

Database altered.

 

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;

 

Database altered.

 

SQL> select open_mode from v$database;

 

OPEN_MODE

--------------------

READ ONLY WITH APPLY

 

SQL>

 

snapshot standby database

A snapshot standby database is a fully updatable standby database that is created by converting a physical standby database into a snapshot standby database. A snapshot standby database receives and archives, but does not apply, redo data from a primary database. Redo data received from the primary database is applied when a snapshot standby database is converted back into a physical standby database, after discarding all local updates to the snapshot standby database.

 

A snapshot standby database typically diverges from its primary database over time because redo data from the primary database is not applied as it is received. Local updates to the snapshot standby database will cause additional divergence. The data in the primary database is fully protected however, because a snapshot standby can be converted back into a physical standby database at any time, and the redo data received from the primary will then be applied.

 

A snapshot standby database provides disaster recovery and data protection benefits that are similar to those of a physical standby database. Snapshot standby databases are best used in scenarios where the benefit of having a temporary, updatable snapshot of the primary database justifies additional administrative complexity and increased time to recover from primary database failures.

 

在Snapshot Standby数据库状态下,是完全可以更新的,备库是可以接受主库传过来的日志,但是不能够将变化应用在备库中。此功能适合用于程序升级,功能测试等情况,测试完毕以后再恢复到备库状态

Snapshot Standby 设置步骤:

 

1.  Stop Redo Apply, if it is active.

2.  On an Oracle Real Applications Cluster (RAC) database, shut down all but one instance.

3.  Ensure that the database is mounted, but not open.

4.  Issue the following SQL statement to perform. the conversion:

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount

ORACLE instance started.

 

Total System Global Area 1707446272 bytes

Fixed Size                  1345408 bytes

Variable Size             989857920 bytes

Database Buffers          704643072 bytes

Redo Buffers               11599872 bytes

Database mounted.

SQL> ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;

 

Database altered.

 

SQL> select open_mode from v$database;

 

OPEN_MODE

--------------------

MOUNTED

 

SQL> alter database open;

 

Database altered.

 

SQL> select open_mode from v$database;

 

OPEN_MODE

--------------------

READ WRITE

 

注意:

Flashback Database is used to convert a snapshot standby database back into a physical standby database. Any operation that cannot be reversed using Flashback Database technology will prevent a snapshot standby from being converted back to a physical standby.

 

 

转换回physical standby

1.  On an Oracle Real Applications Cluster (RAC) database, shut down all but one instance.

2.  Ensure that the database is mounted, but not open.

3.  Issue the following SQL statement to perform. the conversion:

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount

ORACLE instance started.

 

Total System Global Area 1707446272 bytes

Fixed Size                  1345408 bytes

Variable Size             989857920 bytes

Database Buffers          704643072 bytes

Redo Buffers               11599872 bytes

Database mounted.

SQL> ALTER DATABASE CONVERT TO PHYSICAL STANDBY;

Database altered.

 

 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/8494287/viewspace-1357474/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2017-10-14

  • 博文量
    651
  • 访问量
    392190