11.07.2015 Views

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 10 ■ DATA GUARD 419■Note Using real-time query or RMAN block change tracking on a Data Guard standby database requiresa license for <strong>Oracle</strong> Active Data Guard.No one can argue that the real-time query standby database is by far one of the most innovativeimprovements to <strong>Oracle</strong> <strong>Database</strong> <strong>11</strong>g. Not only does <strong>Oracle</strong> provide a disaster recoverysolution, but at the same time, it also provides a complete return on investment. The real-timequery feature is the same as the physical standby database that you are accustomed to, exceptnow you can have the database open in read-only mode with almost real-time synchronizationof your mission-critical data from your primary database.There are two important restrictions to opening the physical standby database for readonlywith redo apply. First, the compatibility initialization parameter must be set to <strong>11</strong>.1.0 orhigher. Second, the alter database set transaction read only command has to be issuedprior to performing any kind of distributed queries over the database link.Start the Real-Time Query StandbyTo open the standby database in real-time read-only mode, you must stop the redo apply usingthe alter database recover managed standby database cancel command. Once the databaseis open, you can start or stop the redo apply at any time. The following steps are all that is requiredto change a standby database for real-time reporting:SQL> alter database recover managed standby database cancel;<strong>Database</strong> altered.SQL> alter database open;<strong>Database</strong> altered.SQL> alter database recover managed standby database disconnect;<strong>Database</strong> altered.The managed recovery process, initiated after the database is open, is the key difference inimplementing the real-time query standby database. In previous releases, the managed recoveryprocess is started while the database is mounted.Validate the Real-Time Query Standby <strong>Database</strong>Now you have enabled the real-time query capability in the standby database. Let’s performa simple validation to prove that DDL (and even user creation in this example) can be propagatedin the real-time query standby database. On the primary database, we will create a usercalled rodba to demonstrate how the real-time query standby database applies archivelogswhile the database is in read-only mode. Once the archivelog is applied, you will be able to login as rodba.Immediately after the user account is created on the primary database, you can confirmthat you cannot connect to the rodba user on the real-time query standby database, as shown here:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!