Oracle Active Data Guard is a new option with Oracle 11g.
Oracle Active Data Guard enables read-only access to a physical standby database for queries, sorting, reporting, Web-based access, and so on, while continuously applying changes received from the production database.
In older versions of Oracle Data Guard, you were able to open your standby database in read-only mode, but the database was not able to receive the redo from the production DB.
For some applications Active Data Guard can represent a more efficient use of Oracle licenses on the standby database. Active Data Guard is available on Enterprise Edition only and is cost option which must be licensed on both the primary and standby database.
Before you perform these actions, a Data Guard Broker configuration should be already configured. If you need to configure Data Guard Broker, GO HERE.
Enable Active Data Guard using DG Broker
Connect to DG Broker and disable the MRP Process
$ dgmgrl
DGMGRL> connect sys
DGMGRL> show configuration
DGMGRL> edit database 'STDBY' set state = 'apply-off';
DGMGRL> show configuration
Open the physical standby database in read-only mode
sqlplus> alter database open read only;
Connect to DG Broker again and enable the MRP Process
$ dgmgrl
DGMGRL> connect sys
DGMGRL> edit database 'STDBY' set state = 'apply-on';
DGMGRL> show configuration
Now you can perform any Read Operation on the Standby!!!
As you can see, this process is very simple, you just type a few commands, re-start your DB and you are ready to test this amazing feature!!!
Redo data will continue to be received and applied by the database while it is operating in read only mode.
If you perform any DDL and DML operation in PROD, you will see those operations also reflected on the Standby. As an example you can insert some data into a table in PROD and that row will be also inserted in the Standby.
To determine whether a standby database is using Active Data Guard use the following query:
SQL> SELECT database_role, open_mode FROM v$database;
DATABASE_ROLE OPEN_MODE
-------------------- --------------------
PHYSICAL STANDBY READ ONLY WITH APPLY
Disable Active Data Guard using DG Broker
Connect to DG Broker and disable the MRP Process
$ dgmgrl
DGMGRL> connect sys
DGMGRL> show configuration
DGMGRL> edit database 'STDBY' set state = 'apply-off';
DGMGRL> show configuration
Shutdown the physical standby database
sqlplus> shutdown immediate;
sqlplus> startup mount;
Connect to DG Broker again and enable the MRP Process
$ dgmgrl
DGMGRL> connect sys
DGMGRL> edit database 'STDBY' set state = 'apply-on';
DGMGRL> show configuration
Now you Physical standby will be performing as usual
Enable Active Data Guard using SQL*Plus
We need to mention that the preferred method to Enable the Active Data Guard is by using the Broker.
As you can see, this process is very simple, you just type a few commands, re-start your DB and you are ready to test this amazing feature!!!
Redo data will continue to be received and applied by the database while it is operating in read only mode.
Connect to the physical standby, cancel the managed standby recovery, then open it in read only mode. After that enable again the managed recovery process
sqlplus> alter database recover managed standby database cancel
sqlplus> alter database open read only;
sqlplus> alter database recover managed standby database using current logfile disconnect;
Now the standby has been placed in managed recovery mode applying the log files while it is open.
Now you can perform any Read Operation on the Standby
If you perform any DDL and DML operation in PROD, you will see those operations also reflected on the Standby.
Confirm, changes applying on standby database
On the primary create any table, do a log switch and check the maximum log sequence number:
SQL> create table test (cd number);
SQL> alter system switch logfile;
SQL> select max(Sequence#) from v$log;
Connect to the Standby and also check the maximum log sequence number and the existence of that table:
SQL> select max(Sequence#) from v$log;
SQL> describe test;
Disable Active Data Guard using SQL*Plus
Connect to the physical standby and shut it down
sqlplus> shutdown immediate
Then Startup and mount it.
sqlplus> startup mount;
sqlplus> alter database recover managed standby database using current logfile disconnect;
Now you Physical standby will be performing as usual
Checking Different Scenarios
If you start a database in SQL*Plus using the STARTUP command and then invoke managed recovery, the Active Data Guard will be enabled.
For example:
SQL> STARTUP
SQL> SELECT database_role, open_mode FROM v$database;
DATABASE_ROLE OPEN_MODE
-------------------- --------------------
PHYSICAL STANDBY READ ONLY
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE disconnect;
SQL> SELECT database_role, open_mode FROM v$database;
SQL> SELECT database_role, open_mode FROM v$database;
DATABASE_ROLE OPEN_MODE
-------------------- --------------------
PHYSICAL STANDBY READ ONLY WITH APPLY
However, if the database is started in SQL*Plus using the STARTUP MOUNT command and then managed recovery is invoked, Active Data Guard will not be enabled.
SQL> STARTUP MOUNT
SQL> SELECT database_role, open_mode FROM v$database;
DATABASE_ROLE OPEN_MODE
-------------------- --------------------
PHYSICAL STANDBY MOUNTED
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE disconnect;
SQL> SELECT database_role, open_mode FROM v$database;
DATABASE_ROLE OPEN_MODE
-------------------- --------------------
PHYSICAL STANDBY MOUNTED
If the database has been started in SQL*Plus using STARTUP MOUNT and the database is subsequently opened read only, then invoking managed recovery will enable Active Data Guard.
For example:
SQL> STARTUP MOUNT
SQL> SELECT database_role, open_mode FROM v$database;
DATABASE_ROLE OPEN_MODE
-------------------- --------------------
PHYSICAL STANDBY MOUNTED
SQL> ALTER DATABASE OPEN READ ONLY;
SQL> SELECT database_role, open_mode FROM v$database;
DATABASE_ROLE OPEN_MODE
-------------------- --------------------
PHYSICAL STANDBY READ ONLY
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE disconnect;
SQL> SELECT database_role, open_mode FROM v$database;
DATABASE_ROLE OPEN_MODE
-------------------- --------------------
PHYSICAL STANDBY READ ONLY WITH APPLY
参考至:http://pafumi.net/Active_Data_Guard.html
如有错误,欢迎指正
邮箱:czmcj@163.com
相关推荐
Oracle Active Data Guard是Oracle数据库企业版中的一项高级数据保护技术,旨在为关键业务数据库提供实时数据保护和高可用性。该技术通过维护一个与主数据库同步的物理备用数据库,确保在主数据库出现故障时,可以...
官方资料:Oracle Active Data Guard新特性_白皮书主要特性:•全面的Oracle感知数据库保护 •独特的损坏桧测和自动修复•手动或自动地快速故陣切换到同步生产 副本•将生产负载分流到以只读方式打开的 問步备用...
在此背景下,Oracle Active Data Guard技术应运而生,提供了一种简化操作、提高性能的解决方案。 Oracle Active Data Guard是一种高级数据库选件,隶属于Oracle数据库企业版。它通过维护生产数据库的一个实时只读...
Oracle 11g Physical Active Data Guard 是一种高可用性和灾难恢复解决方案,允许在主数据库和备用数据库之间实时传输重做日志,以保持数据的一致性。在这个详细过程中,我们将在同一台主机上配置该环境,尽管这并不...
### Oracle 19c 中 Active Data Guard 的使用详解 #### 一、Active Data Guard 概述 Active Data Guard 是 Oracle 数据库中的一项关键技术,它属于 Data Guard 的一种增强功能,旨在实现主数据库(Primary ...
使用Oracle Active Data Guard实现PMS2.0数据库读写分离初探 本文研究了使用Oracle Active Data Guard实现PMS2.0数据库读写分离,以解决PMS2.0业务系统中数据库I/O吞吐量和资源耗用的性能瓶颈问题。本文首先介绍了...
大牛出手,全是干货,Oracle 11gR2使用Active Data Guard 搭建物理 Data Guard。 注:文档打开密码见压缩包注释 看不到注释的 文档打开密码 tianlesoftware
### Oracle 11g 物理 Active Data Guard 部署详细过程 #### 一、概述 Oracle Data Guard 是一种高可用性解决方案,通过在主数据库(Primary Database)和一个或多个备用数据库(Standby Databases)之间同步数据来...
本专题讲座将介绍如何使用 Oracle Active Data Guard 的 Oracle Data Guard 特性将执行许多不同类型系统和数据库计划维护的流程以滚动方式实现自动化。这可以为 Oracle Active Data Guard 配置中的只读用户实现零...
Oracle 11.2.0.3 数据保护技术在企业级数据库管理中扮演着至关重要的角色,其中Active Data Guard(ADG)是Oracle提供的一种高级数据保护解决方案,用于构建高可用性和灾难恢复策略。本案例将详细介绍如何使用ADG来...
### 基于Oracle 12c Far Sync+Active Data Guard ADG的灾备两地三中心搭建手册 #### 概述 本手册旨在提供一种基于Oracle 12c的两地三中心灾备解决方案的设计与实施步骤。通过使用Oracle 12c Far Sync (FS) 和 ...
Oracle Active Data Guard是一种高级的高可用性和灾难恢复解决方案,它允许数据库在运行时进行物理备用数据库的维护。在这个特定的案例中,客户面临的问题是由于主数据库和备用数据库的`standby_file_management`...
Data Guard的Active Data Guard特性允许备用数据库在保持实时同步的同时,还可以进行读操作,为开发、测试或分析任务提供资源,而不影响主数据库的性能。这在不影响数据安全性的情况下,最大化了硬件资源的利用率。 ...
ctive Data Guard Far Sync是Oracle 12c的新功能(也称为Far Sync Standby),Far Sync功能的实现是通过在距离主库(Primary Database)相对较近的地点配置Far Sync实例,主库(Primary Database) 同步(synchronous)...
特别是从Oracle 11gR2开始,Data Guard的功能得到显著提升,增加了对Active Data Guard的支持,允许备用数据库在读取模式下被激活,从而提供了读写分离和负载均衡的能力,使备用数据库可以用于报表等读取密集型任务...
Oracle 数据库 Data Guard 技术介绍 Oracle 数据库 Data Guard 技术是一种高可用性和灾难恢复解决方案,旨在保护 Oracle 数据库免受故障和数据丢失的影响。该技术通过在主数据库和备用数据库之间传输 redo 数据来...
·使用Oracle Active Data Guard启用只读服务与灾难恢复功能 ·发生故障时顺利转移数据库和应用程序 ·利用Oracle Data Guard切换尽量缩短计划内停机时间 ·利用Oracle Recovery Manager进行备份与恢复
在本案例中,我们将讨论如何在两个Oracle 11.2.0.3 RAC集群之间建立Data Guard配置,以实现Aactive Data Guard,这是一种增强的数据保护模式。 首先,了解Data Guard的基本概念。Data Guard通过创建一个或多个备用...
2. Active Data Guard:在不影响主库性能的情况下,允许在备库上执行查询操作,提供额外的分析和报告能力。 3. Managed Standby Databases:自动管理和维护备库,减少管理员工作量。 4. Switchover与Failover:...
在Oracle Database 12c版本中,Data Guard进行了重大更新,引入了Active Data Guard(ADG)和Logical Data Guard(LDG)等新特性,为数据库的高可用性和灾难恢复提供了更加灵活和强大的支持。 部署Data Guard涉及的...