Sunday 22 September 2013

Remote Physical Data Guard Implementation on Oracle Solaris 10 x64 using Oracle Enterprise Manager Cloud Control 12c Release 3

Oracle Enterprise Manager Cloud Control 12c Release 3 makes data guard implementation a very simple process, carrying it out automatically in minutes, instead of having to carry it out manually in hours! Moreover, a number of data guard configurations can be deployed simultaneously through a user interface, simply, by entering the necessary information and by clicking a few buttons.

A primary production database may have a number of standby databases ready for a failover in case if it crashes. Standby databases may also be created for switchover operations that are performed to carry out maintenance operations on the primary production database.

Depending on the requirements, standby databases can be either physical or logical.

For more information on physical and logical standby databases, kindly visit the following link:
http://www.dba-oracle.com/t_difference_logical_physical_standby_database.htm

In my tutorial below, I will demonstrate to you how to remotely deploy a physical data guard configuration on Oracle Solaris x64 through Oracle Enterprise Manager Cloud Control 12c Release 3.

Time Duration: 30 to 60 minutes, depending on the degree of parallelism.

Prerequisites:
1. An open production database running in ARCHIVELOG mode.
2. An identical operating system running on the primary and standby hosts.
3. An identical release of Oracle database software installed on the primary and standby hosts.
4. A sufficient amount of storage space available on the standby host for creating the standby database.

Implementation Process:

1. Login into OEM CC 12c R3 as user 'sysman' and go to Targets->Databases:

Click on 'Search List' to let the list of databases present load and then click on the database name to navigate to the database home page.

2. The database home page will load displaying the global name of the database at the top left corner as indicated by the below screenshot:

Go to Availability->Add Standby Database... to let the database login page load.


Login as user SYS with SYSDBA privileges. If the named credentials do not exist, then kindly create them by clicking 'New'.

3. The 'Add Standby Database' home page will load -

You can use the wizard to create a Data Guard configuration containing a primary database and a standby database. There are four options available on this page -
A. Create a new physical standby database: This option allows you to create a clone of the primary database that can be mounted or open read-only when in recovery mode. Such a standby database supports all datatypes and DDL.
B. Create a new logical standby database: This option allows you to create a standby database that stores the same data as the primary database, though the data may not be stored physically identical to the primary database.
C. Manage an existing standby database with Data Guard broker: This option allows you to manage an already configured standby database.
D. Create a primary database backup only: This option allows you to create a primary database backup that can be used for the creation of a future standby database.

Select option (A) and click 'Continue'.

 4. The next screen allows you to select the backup type of the RMAN backup that will be used to create the standby database -

You can use either a new or an existing RMAN backup to create the standby database.
If you want to use a new RMAN backup, then select 'Online Backup', else select 'Existing Backup'.

With the 'Online Backup' strategy, you have the following options:
A. Use Recovery Manager (RMAN) to copy database files: This option does not require a staging area (i.e. an intermediate area) to copy the database files to the destination locations.
B. Copy database files via staging areas: This option does require staging areas on both the primary and standby hosts.

With the 'Existing Backup' strategy, you have the following options:
A. RMAN Backup: This options allows you to create the standby database from an existing whole database backup performed typically as part of a regular backup strategy.
B. Backup from a previous standby database creation: This option allows you to create the standby database from a previous backup performed by the 'Add Standby Database' wizard.

Select option (A) of the 'Online Backup' strategy, and click 'Next'.

5. The next page will present the backup options available to create the standby database -

This page allows you to select the degree of parallelism,which is by default 2, specify the primary host credentials of the oracle user and use Oracle-managed Files (OMF) format for the standby redo log files.

Select the correct options and click 'Next'.

6. The next page presents the database location options -

You can specify the standby database attributes (instance name, database storage - file system or ASM), standby database location (host, oracle home) and the standby host credentials of the 'oracle' user.

Select the correct options and click 'Next'.

7. The next page allows you to specify the database file locations -

You can specify the database area to store the data files, multiplex the redo log files and control files across multiple locations, specify the fast recovery area and its size, and create the database listener and specify its port.

Select the correct options, and click 'Next'.

8. The next page allows you to set up other data guard configuration options -

You can specify some standby database parameters such as the DB_UNIQUE_NAME parameter and the target name of the standby database that will be used by enterprise manager. Oracle recommends that the target name be the same as the DB_UNIQUE_NAME parameter.

For more information on the DB_UNIQUE_NAME parameter, kindly click the following link:
http://docs.oracle.com/cd/B28359_01/server.111/b28320/initparams065.htm

You can also specify the monitoring credential that will be used by enterprise manager to monitor the standby database - by default, the NORMAL role monitoring credentials in use for the primary database will be used for the standby database. Kindly note that a mounted standby database requires SYSDBA monitoring credentials in order to provide complete monitoring capability.

You have to also select whether the Data Guard Broker should be used to manage the Data Guard configuration and also specify the data guard connect identifiers to enable communication between the primary and standby databases.

Click 'Next' to continue.

9. The last page of the data guard setup allows you to review the data guard configuration that will be deployed -

Kindly review the configuration thoroughly before clicking 'Finish' because the process cannot be reverted.

10. A standby database creation job will be submitted -

Click 'View Job' to view the summary of the running job -

The job will complete after some time, depending upon the degree of parallelism -

It is now time to verify the data guard configuration.

11. Go to Availability->Verify Data Guard Configuration:

Various standby database settings will be checked as indicated by the above screenshot.

The verification process will complete in a minute, and the results of verification will be displayed -

You can find any diagnosed warnings or errors here. Click 'OK' to continue to the data guard administration page.

12. The data guard administration page allows you to administer all standby databases that have been created for a given primary database -

Features such as Data Guard Status, Protection Mode, Fast-Start Failover, Current Log, Properties, Standby Database Progress Summary, Switchover, Failover, Conversion and Real-time Query, and links to the data guard performance, log file details, configuration verification and data guard configuration removal are available here.

By default, the page is auto refreshed every minute to provide up-to-date information to the administrator.

Click on 'Data Guard Performance' to load the performance statistics of the data guard configuration.

13. The data guard performance page presents the performance related information to the administrator -

You can view the graph of the redo generation rate, redo apply rate and transport and apply lag times.
You can also switch the log file of the primary database by clicking the 'Switch Log' button and can even start/stop the test application to generate load on the primary database.

By default, the page is auto refreshed every minute to provide up-to-date information to the administrator.

Kindly note that the data unit of the graphs is kilobytes (KB) and the time unit is seconds (Sec).

Congratulations! You have successfully deployed a physical data guard configuration on Oracle Solaris 10 x64 through Oracle Enterprise Manager Cloud Control 12c Release 3.

Hope you had a good time while reading the article! :)

1 comment:

  1. Security is an essential part of maintaining any network and is the primary focus for a network administrator.

    Remote DBA

    ReplyDelete