日期:2014-05-16  浏览次数:20639 次

Oracle Data Guard_ 备库以只读或读写方式打开访问

 

8.2 Opening a Standby Database for Read-Only or Read/Write Access

8.2以只读或者可读写方式打开备库来访问
 

When a standby database is open for read-only access, users can query the standby database but cannot update it. Thus, you can reduce the load on the primary database by using the standby database for reporting purposes. You can periodically open the standby database for read-only access and perform ad hoc queries to verify Redo Apply is updating the standby database correctly. (Note that for distributed queries, you must first issue theALTER DATABASE SET TRANSACTION READ ONLY statement before you can issue a query on the read-only database.)

 

当备库是以只读方式打开时,用户只能在备库上查询而不能更新它。那么你可以为主库减轻负载而在备库上出报表,你可以定期的以只读方式打开备库,查询验证重做应用是否正确的更新到备库。针对分布式查询,你必须在只读数据库查询之前发出ALTER DATABASE SET TRANSACTION READ ONLY语句。

 

Figure 8-1 shows a standby database open for read-only access.

Figure 8-1 Standby Database Open for Read-Only Access

Description of "Figure 8-1 Standby Database Open for Read-Only Access"


See Also:

  • Assessing Whether or Not to Open a Standby Database

  • Opening a Physical Standby Database for Read-Only Access

  •  

A physical standby database can be opened temporarily in read/write mode for development, reporting, or testing purposes, and then flashed back to a point in the past to be reverted back to a physical standby database. When the database is flashed back, Data Guard automatically synchronizes the standby database with the primary database, without the need to re-create the physical standby database from a backup copy of the primary database.

 

物理备库可以暂时打开以读/写模式用来开发,报告或测试的目的,然后闪回到过去一个点来恢复到一个物理备用数据库当数据库闪回以后Data Guard自动同步主库与备库之间的数据而不需要从主数据库的备份副本重新创建物理备用数据库

 

See Also:

Section 12.6 for a scenario that describes activating a physical standby database as a read/write reporting database, and then resynchronizing the database with the primary database
 
第12.6节的场景,描述活动的物理备用数据库为读/写报告数据库,然后与主数据库重新同步数据库。