Guenadi N Jilevski's Oracle BLOG


Managing Data Guard 11g R2 with OEM 11g

Managing Data Guard 11g R2 with OEM 11g

In this article we will look at what OEM offers to manage Data Guard. We will see how Flashback database and Data guard can be managed with OEM to build a DR solution. OEM Gird Control is an enterprise tool offering a centralized console for management and monitoring enterprise systems. The post look at how OEM can be used to manage and monitor Data Guard configurations. There are wizards automating most important Data Guard activities in OEM and the paper covers in details the OEM wizards related to Data Guard. Data guard features combined with Flashback database feature allow to achieve an ultimate DR strategy for the business allowing a flexibility in deploying different Data Guard configurations that is, different Data Guard modes, attributes, Active Data Guard, Snapshot Data guard, Fast start Failover and fast and reliable standby database reinstate after failover to name a few. OEM enables us to perform the following tasks related to Data Guard.

  • Creating a new physical standby database
  • Creating a new logical standby database
  • Adding an existing standby database for management with Data Guard broker
  • Monitoring performance of a Data Guard configuration
  • Monitoring archiving and applying of redo log
  • Verifying structure of Data Guard Configuration
  • Performing switchover and failover
  • Setting Active Data Guard
  • Setting Snapshot Data Guard
  • Manage Data Guard Configuration modes and properties. Setting fast start failover.
  • There are various backup options to choose from when creating a standby database.


We assume that the database that we will designate as a primary database is configured as follows:

  • Running in archive log mode
  • The primary database has flashback database turned ON.
  • Parameter LOCAL_LISTENER is set even if listening on default port 1521. It is a must to set the LOCAL_LISTENER for ports different from the default.


We are using Oracle 11g R2 Grid Infrastructure and RDBMS software and OEM 11g. Below we are going to look at few of the OEM Data Guard automation features.

  1. Let’s create a physical standby database.


    Select a primary database.

    Navigate to Availability tab and select Add Standby Database link.

    Click on the Add Standby Database Link. Note that the link will appear only if there is no Data Guard configuration created for the primary database.

    Select create a new physical standby database link. Here the options are to create a physical or logical database, register an existing standby database for management with a data guard broker or creating a backup that later will be used for creating standby databases.

    Select Online Backup. This will create and run a job backing up the primary database and creating the standby database. The option of using an existing backup will create and run a job creating the standby database using already existing database backup.

    Specify the requested backup options and credentials.

    Specify the details for the standby database.

    Specify the standby database file location and FRA details. Select Listener configuration.

    Specify the standby database details as specified below. Configure Oracle restart and Data guard broker.

    Review details prior submission and press Finish. If at any time a change is necessary press the Back button. Press Next to move forward.

    The display explains what is happening.

    We will let it finish, once done a job is submitted to create the standby database. Pressing Cancel will terminate the process. Click Creation in progress link in the Data Guard Status.

    Here we can monitor the details and status of the standby database creation job.

    Pressing Job activity will show the job status presently is in progress.

    Wait until the job succeeds.

    Upon successful job completion we have the following configuration.

    We also have a set of links to manage the Data Guard configuration.

  2. Verify Data Guard configuration


    Click on the Verify configuration link.

    Upon successful completion the status will be as displayed on the screenshot below. We confirmed that the physical standby database is created successfully.

  3. Data Guard Performance


    Click on the Performance link and start a test application to generate a load on the primary database. What we are interested in are the redo generation rate, redo apply rate and the transport and apply lag.

    After running for a while the application generating a load on the primary database we will have more meaningful data gathered as displayed on the screenshot below.

    We can further drill down and look at details of the Transport Lag.

    We can further drill down and look at details of the redo generation rate.

    We can further drill down and look at details of the redo apply rate.

  4. Managing Data Guard Properties


    Click Edit properties link.

    In the general properties tab we can toggle on and off redo apply. This translates into having Managed Recovery Process (MRP) process running or stopped on the standby database. Enable real time query check box activates/deactivates the Active Data Guard.

    Selecting Enable Real-time query check box will activate the Active Data Guard.

    Standby Role properties tab enables us to specify series of properties such as redo transport mode SYNC/ASYNC, redo compression to name a few.

    Common properties tab enables us to set the listed properties.

    Once the properties are set press Apply.

  5. Managing Data Guard Mode


    Here we can specify the Data Guard mode. Let’s choose maximum protection and press Continue.

    Press Continue.

    Confirm to continue.

    Now we have a Data Guard configuration in maximum protection mode.

  6. Managing Switchover


    Select a standby database (from the list of standby databases) that will become a primary and press Switchover.

    Specify whether to swap the monitoring settings and confirm the switchover.

    Upon successful completion of the switchover we get a confirmation and a role reversal.

  7. Managing & Setting fast start failover


    Click on the link specifying the status of the fast start failover.

    In the Configure Observer page specify the details for the observer.

    Clicking the Observer button show a list of discovered target hosts and Oracle home for the observer.

    After selecting the host and Oracle home press OK. We are prompted to enable flashback database feature as indicated. Enter the specifics and press Continue.

    Confirm to continue.

    Wait for the processing to complete.

    We are back to the Data Guard page with a confirmation of success in enabling FSFO.

  8. Managing Failover & reinstate former primary as a new standby database


    Select a database from the list of standby databases to become a new primary and press Convert button. Page appears asking to select a failover option and whether to swap monitoring settings and jobs. Confirm to continue.

    Wait for the failover to complete.

    When until the failover completes. We have a role reversal the former standby database is a primary and the old primary must be reinstated to become a standby database. Click on the link related to the Data Guard status (Database must be reinstated link).

    In the properties page is indicated that the former primary needs to be reinstated to become a standby database. Press Reinstate button.

    Confirm to continue.

    Wait for the process to continue.

    If the reinstate is successful we will have a valid Data Guard with a new standby database.

    If the reinstate fails create a new standby database.

  9. Managing creation of a logical standby


    Select create a new logical standby database. Press Continue.

    Select the type of the backup for the standby database creation. Note that currently there are no tables unsupported by SQL Apply.

    Select the type of the backup for the standby database creation. Note that currently there are table unsupported by SQL Apply. Address unsupported tables and continue with the standby database creation pressing Next. Select Online backup (Use RMAN to copy database files)

    Next pages are similar to the pages for physical database creation. Select the backup options and press Next.

    Select standby database attributes, standby database location and standby host credentials. Press Next to continue.

    Specify the standby database locations, FRA and listener configuration. Press Next to continue.

    Specify the configuration parameters requested and press Next to continue.

    After reviewing the configuration press submit. Again as in the case of a physical standby creation a job is submitted.

    Wait for the job to complete. After completion we will have the new Data Guard configuration. Available databases are shown below.

    The Data Guard configuration managed and monitored by OEM is as follows.

    Performance page will show now all standby databases as show below.

  10. Monitor Archived and Applied redo logs


    Log File Details link will show the status of the redo transfer and apply.

    Note the progress of redo apply.

  11. Manage Active Data Guard


    Enable Real-time Query property enables Active Data Guard. Check the box Enable Real-time Query and press Apply.

    After completion we will have an Active Data Guard as show below.

  12. Manage Snapshot Data Guard


    Make sure that the databases have flashback database turned on. Select a database from the list of standby databases and press Convert.

    Confirm the conversion.

    Wait for the conversion to complete.

    Upon completion we will have a snapshot standby database.

    Select the snapshot database and press Convert. Confirm the conversion.

    We have a physical standby database

    Once the standby database is with flashback database feature turned on we can toggle on and off between a physical standby database and snapshot standby database.

  13. Manage standby database create process – options for create standby database


    We have multiple options to backup a database for standby creation. So far we used to make a backup and create a standby database in one job. This is if we choose an Online Backup option.

    1. Backup to stage


    Select Create a Primary Database backup only. Press Continue.

    Specify the staging area and primary host credentials.

    Schedule the primary database backup.

    Select Backup from a previous standby database creation

    Enter the primary host credentials.

    Specify the standby database attributes, standby host credentials and staging area holding the backup.

    Enter the standby database files location. Press Next to continue.

    In the configuration page specify Standby Database Parameters, enable Oracle Restart and specify standby database monitoring credentials.

    Review and press Finish. Note that Backup Type has changed from Online Backup to Existing Backup.

    1. Regular level 0 database backup.



  14. Remove a standby database from Data Guard configuration and Remove a Data Guard configuration. Remove button removes a database from the Data Guard configuration. The Remove a Data Guard Configuration link removes the whole data guard configuration.


    We looked at how to create a standby database, how to set the Data Guard modes and properties. We performed a switchover and failover and the respective ex-primary reinstatement to a new standby database. We looked at converting a physical standby to snapshot standby or active data guard. We covered log file monitoring, and Data Guard performance monitoring. We explained how to use OEM 11g to manage standby database in Data Guard Broker configuration.

July 24, 2010 Posted by | oracle | 2 Comments