Oracle Active DataGurad和Data Guard的区别
以下简称Active Data Guard为ADG,Data Guard为DG。
首先如果用户购买了企业版许可,DG是免费的,而ADG是需要额外付费的数据库选件。
ADG和DG的的架构类似,如下图:
ADG是DG的演进,或者说是DG的超集。ADG的主要功能如下图:
在以上的7项功能中,DG只能有限的支持Real-Time Query,即指当standby数据库打开时,并不能进行日志的redo apply,这其实是对数据同步有影响的。
另外Far Sync,Global Database Services和Application Continuity是DB 12c支持的功能。
from ASKTOM:
Where ADG offers more is that you can have the database open for read-only (eg reports) whilst it is still being kept in sync with your primary database. With normal DG, if you want it open read-only, you must pause the sync process.
ADG maintains a physical copy of your primary database (that can be read by queries). You are 100% positive that it and the primary are the same.
所有ADG和DG的区别主要在这个A,即Active.
在ADG FAQ中有一个问题:
问:My reporting application makes some temporary writes which require read-write access to the standby database, even though the writes do not modify primary data. How can I use it with Active Data Guard ?
答:Active Data Guard does not support any writes to the physical standby database. That said, it is possible that limited writes needed by the reporting application can be directed back to the primary database or to a local database that is on the same server as the standby database, using Oracle database links.
这里说的是,如果standby确实需要写一些数据,可以将写通过DBLink导向primary数据库或本服务器上的其它数据库,如果是12c,还可以使用global temporary table特性写入本库的临时表,不过这个临时表需要再primary DB上创建。
如ADG白皮书所述:
There are also reporting applications that could use a read-only database except for the requirement that they write to global temporary tables and/or access unique sequences. Active Data Guard includes new capabilities with Oracle Database 12c to allow writes to global temp tables and access to unique sequences at an active standby, further expanding the number of reporting applications that can be offloaded from a production database