Images

CHAPTER
25

Configuring HP Data Protector for Oracle

In large environments, it’s hard for database administrators to schedule, manage, monitor, and report all database backups centrally. Another challenge for DBAs is managing the backup media: setting the protection, monitoring the usage, and checking on the backup history. For HP customers, using a backup user interface with RMAN such as HP Data Protector overcomes all these issues.

This chapter begins with a discussion of the integration between Oracle RMAN 12c and HP Data Protector 9.0. It then describes the configuration of Oracle backups with Data Protector. You will learn how to back up and restore an Oracle database with Data Protector. Finally, you will learn how to set up synchronization between Oracle RMAN Metadata and Data Protector Media Management Database.

Integration of Oracle and Data Protector

You must properly integrate Oracle and Data Protector in order to run successful backup/restore operations. To integrate them, therefore, you’ll now learn about the support matrix and the integration components, and do a workshop on integration configuration.

Support Matrix

At the time of writing, HP Data Protector 9.0 supports Oracle 12c (64-bit) Recovery Manager on the following operating systems:

Images   Windows Server 2008 (64-bit; x64)

Images   Windows Server 2008 R2 (64-bit; x64)

Images   Windows Server 2012 (64-bit; x64)

Images   Windows Server 2012 R2 (64-bit; x64)

Images   RHEL Advanced Server 6.4 (64-bit; x64)

Images   Oracle Enterprise Linux 6.4 (64-bit; x64)

Images   CentOS 6.4 (64-bit; x64)

Integration Components

For Oracle and Data Protector integration, RMAN and the Data Protector Oracle Integration software work together to accomplish backup, copy, restore, recovery, and duplication operations.

The Data Protector Oracle Integration agent uses the information in the recovery catalog or in the control file to determine how to execute the requested backup and restore operations. By using this integration, you can perform Oracle full and incremental backups. Oracle incremental backups can be differential or cumulative. By default, Data Protector performs Oracle differential incremental backups. By changing the default RMAN script created by Data Protector, you can specify a cumulative backup.

With Data Protector, both online and offline database backups can be performed. However, successful backups require proper configurations. For an online database backup, the database instance must be in ARCHIVELOG mode, and for an offline database backup, the database needs to be prepared for backup with the Pre-exec and Post-exec options in the backup specification. You can use these options for shutting down the database or taking a tablespace offline before backup, and then reverse operations after backup.

Here are the components of this integration, as shown in Figure 25-1:

Images

FIGURE 25-1.   Integration architecture of Oracle and Data Protector

Images   SM   The Data Protector Session Manager, which manages the backup and restore sessions.

Images   MA   The Data Protector General Media Agent, which reads and writes data from and to media devices.

Images   Data Protector MML   The Data Protector Oracle Integration Media Management Library, which is a set of routines that enables data transfer between the Oracle server and Data Protector. The Data Protector MML links Data Protector and Oracle server software.

Images   Ob2rman.pl   The Data Protector Oracle Integration agent, which works with RMAN to manage all aspects of the backup/recovery operations on the Oracle target database.

Images   Backup API   The Oracle-defined application programming interface.

Images   IDB   The Internal Database, where all the information about Data Protector sessions, including session messages, objects, data, used devices, and media, is written.

Images   RMAN   The Oracle Recovery Manager.

Integration Restrictions

There are a number of restrictions with respect to the use of Data Protector. These restrictions include the following:

Images   You cannot use the RMAN MAXPIECESIZE option in Data Protector and Oracle integrated backups.

Images   The Data Protector and Oracle integration does not support the RMAN disk backup of a target database to the Fast Recovery Area. The Data Protector and Oracle integration supports only backups from the Fast Recovery Area to a backup device. However, you can create an RMAN script that backs up the target database to the Fast Recovery Area before or after the Data Protector backs up files from the Fast Recovery Area to a backup device. The script can be set up using the Pre-exec or Post-exec option when creating a backup specification.

Images   It’s not possible to add databases with the same database identifiers (DBIDs) into a Data Protector Cell.

Images   In a Data Guard configuration, you cannot add only one standby database to Data Protector Cell without configuring the primary database.

Images   Logical standby database backup is not supported.

Images   Recovery Catalog database is required for Data Guard integrations.

Images   The Data Protector and Oracle integration does not support non-ASCII characters in backup specification names.

RMAN Workshop: Integration Configuration

Workshop Notes

To run a successful RMAN backup of an Oracle Database using Data Protector Integration, you should have the Oracle target database mounted or opened, the recovery catalog database configured and opened (if being used), Oracle Net Services properly configured, and Data Protector Disk Agent, Media Agent, and Oracle Integration installed on the server the target database resides on.

NOTE

In RAC databases with Oracle version 11.2.0.2 and later, the control file must be created on a shared disk and be accessible from all RAC nodes, and the OB2_DPMCTL_SHRLOC environment variable must point to this location, from where the control file is backed up.

In this Workshop, it is assumed that devices and media are ready for use and that Data Protector Cell Manager is installed and properly configured. HP Data Protector Manager software, which may reside in a PC, will be used to configure the integration. Oracle Database is on a Linux host.

Step 1.   First you must install the Data Protector agent to the target database server. This can be done locally or remotely if an installation server is ready for the necessary operating system. In this Workshop we’ll install the Data Protector agent locally.

a.   Insert and mount the Unix installation DVD-ROM or ISO image.

b.   Run omnisetup.sh, which is under the LOCAL_INSTALL directory.

NOTE

You can use the [-server name] syntax to import the client to the Cell Manager, where name is a full hostname of the Cell Manager. If you don’t use the -server option, you can still import the client after the installation, as specified in Step 2.

c.   Installer will ask for the components you want to install. Select Disk Agent (da), Media Agent (ma), and Oracle Integration (oracle8) components.

d.   Setup informs you if the installation was completed.

Step 2.   When the agent is installed locally and not imported to the Cell Manager using the -server option, execute this step to import the target database server as a client to the Cell Manager.

a.   Run HP OpenView Storage Data Protector Manager Software and connect the Cell Manager.

b.   In the context list, select Clients, and in the Scoping pane, right-click Clients and then click Import Client.

Images

c.   Type the IP or host name (if it can be resolved) of the target server in the Name box and click Finish.

Step 3.   You must add the Oracle database software owning account (typically with username oracle) to the Data Protector admin user group.

a.   Run HP OpenView Storage Data Protector Manager Software and connect the Cell Manager.

b.   In the context list, select Users, and in the Scoping pane, right-click the admin group and then click Add/Delete Users.

c.   In the Add/Delete Users interface, select Type as UNIX. Then type the username and select <Any> as the UNIX Group.

Images

d.   Click the right double arrows and then click Finish.

NOTE

You do not need to link Oracle Server with the Data Protector MML manually, which is required in former releases. When you start backups or restores using the Data Protector GUI or CLI, Data Protector automatically links Oracle Server with the correct platform-specific Data Protector MML.

RMAN Backup Configuration on Data Protector

To configure an Oracle RMAN backup configuration on Data Protector, decide which devices, media pool, and media will be used for that backup operation. Then you can create the Data Protector Oracle backup specification.

Data Protector offers database backup templates that can be used when creating the backup specification. You can also create templates tailored to your needs.

RMAN Workshop: Backup Configuration

Workshop Notes

Now that you have added the target host to Data Protector successfully, you can define a backup specification. Using this specification, you will be able to start the backup immediately or to schedule it to run within a specific period.

Step 1.   Run HP OpenView Storage Data Protector Manager and connect the Cell Manager.

Step 2.   In the context list, select Backup; in the Scoping pane, expand Backup Specifications. Then, right-click Oracle Server and click Add Backup.

Step 3.   In the Create New Backup window, you can select one of the predefined backup templates, or select Blank Backup to specify backup operation details later. Select Blank Oracle Backup and click OK.

Images

Step 4.   In the next window, Data Protector asks for client, application database, username, and group name information. Specify the client on which the target database resides, the SID of the target database, the username, and the name of the group that owns the Oracle instance, as shown here. Click Next.

Images

Step 5.   In the Configure Oracle window, specify information about the target database. On the General tab, specify the Oracle Server home directory, as shown here.

Images

On the Primary tab, specify username, password, and service information. Don’t forget that this user must have been granted Oracle SYSDBA privilege. Service is the name used to identify a SQL*Net server process for the target database. The Catalog tab requires the username, password, and service information for the Catalog database if it’s being used. The last tab, Standby, is necessary to fill if the Oracle Data Guard environment is in use and will be backed up. Click OK.

Step 6.   This step asks you to specify which components of the database you want to back up. Because you selected Blank Backup in Step 3, you will see all components unchecked. Select the components you want to back up and then click Next.

Images

Step 7.   Now, Data Protector asks you which hardware will be used for this backup. Select the drive you want to use, as shown here. If you defined it earlier, you can also specify the media pool that will be used for the backup. Select the drive and click Properties. You’ll see a drop-down menu to select a media pool. Make your choice and click Next.

Images

Step 8.   This step allows you to specify detailed configuration. As you can see in the following illustration, the three categories each have an Advanced button. You can define pre- and post-execution scripts under Backup Specification Options. You can define backup objects’ protection and report level under Common Application Options. Lastly, you can see an overview of the prepared RMAN script and disable/enable Data Protector–managed control file backup under Application Specific Options. Make your selections and click Next.

Images

Step 9.   You can schedule the configured backup in this step. Specify the dates and times that you want backups performed. You can also configure the incremental level of backups in this stage. For example, create two schedule tasks by clicking Add:

Images   Level 0 backup on Sundays

Images   Level 1 incremental backup on the other days

The schedule will look like what’s shown here.

Images

Select the Holiday box if you want to indicate that you do not want scheduled backups to run on holidays. When you want to disable the whole schedule for a backup, you can use the Disable Schedule checkbox.

Step 10.   This last step gives you three options:

Images   Save As   Save the newly created backup/template.

Images   Start Backup   Begin an interactive backup with the current backup specification.

Images   Start Preview   Begin an interactive preview (test) of the backup with the current backup specification.

If you choose to save the backup specification, you can also preview or start the backup later.

Editing the RMAN Script

You can edit the RMAN script section only after the Data Protector Oracle backup specification has been saved.

To manually edit the RMAN script, in the context list, select Backup; in the Scoping pane, expand Backup Specifications. Then expand Oracle Server and click the backup specification you will edit. On the Options tab, click Advanced in the Application Specific Options box. The RMAN script appears with an Edit button.

Click Edit and manually configure the script. You can save the configuration by clicking OK, OK, and Apply.

By default, RMAN scripts automatically created by Data Protector contain instructions for backing up one or more of the following objects:

Images   Databases, tablespaces, or datafiles

Images   Archive logs

Images   Fast Recovery Area

Images   Control files

When you edit manually, the RMAN scripts with all combinations of the aforementioned backup objects are recognized by Data Protector as its own scripts, and it is still possible to modify the selection of objects that will be backed up in the Source tab by clicking the appropriate button.

If the RMAN script contains additional manually entered backup commands (for example, a second backup command for backing up a database that is already listed in the first backup command), the object selection is disabled, and it is only possible to browse the Source tab.

Images

NOTE

Single quotes should be used when editing the RMAN script. Double quotes (") must not be used.

Example of the RMAN Script

The following is an example of the RMAN script created by Data Protector based on the Blank Oracle Backup template, after the whole database selection:

Images

Running an RMAN Backup

Now that you’ve integrated Oracle with Data Protector and configured an RMAN backup on Data Protector, you’ll learn how to run an RMAN backup of a Data Protector integrated Oracle database.

Backup Methods

To start an RMAN backup of a Data Protector integrated Oracle database, you can choose from these three methods:

Images   Use either the Data Protector GUI or the Data Protector CLI to start an interactive backup of a predefined Oracle backup specification.

Images   Use the Data Protector Scheduler to schedule a backup of a predefined Oracle backup specification.

Images   Use either Oracle Recovery Manager or Oracle Enterprise Manager to start a backup on the Oracle server.

Running an Interactive Backup

To start an interactive backup of an Oracle database using the Data Protector GUI, follow these steps:

1.   In the HP OpenView Storage Data Protector Manager (Data Protector GUI), select Backup in the drop-down menu.

2.   In the left pane, choose Backup | Backup Specifications | Oracle Server.

3.   Right-click the backup specification you want to start and select Start Backup.

Scheduling a Backup

To schedule an Oracle backup specification, follow these steps:

1.   In the HP OpenView Storage Data Protector Manager, select Backup in the drop-down menu.

2.   In the left pane, choose Backup | Backup Specifications | Oracle Server.

3.   Double-click the backup specification you want to schedule and click the Schedule tab.

4.   In the Schedule page, select a date in the calendar and then click Add to open the Schedule Backup dialog box.

5.   Specify the necessary scheduling options.

Starting Oracle Database Backup Using RMAN or Enterprise Manager

You can also use the RMAN CLI or Enterprise Manager to perform backups of Data Protector integrated databases. To use Data Protector backup media in Oracle database backups, you must set the channel type as SBT_TAPE and specify the OB2BARTYPE, OB2APPNAME, and OB2BARLIST variables:

Images

Backup Procedure

When a backup is started with Data Protector, the following happens in the background:

1.   Data Protector executes ob2rman.pl, which starts RMAN on the client and sends the preconfigured RMAN script.

2.   RMAN contacts the Oracle server, which contacts Data Protector via the MML interface and initiates the backup.

3.   During the backup session, the Oracle server reads data from the disk and sends it to Data Protector for writing to the backup device.

At these stages, messages from the Data Protector backup session and messages generated by Oracle are logged to the Data Protector database.

Restoring Oracle Using the Data Protector GUI

You can restore the following database objects by using both the Data Protector GUI and RMAN:

Images   Control files

Images   Datafiles

Images   Tablespaces

Images   Databases

Images   Recovery catalog databases

You can also duplicate a database by using the Data Protector GUI. You need to create an Oracle instance in order to restore or duplicate a database.

Before you restore any database item or you duplicate a database, ensure that the database is in the correct state:

Images

Images

NOTE

When you are restoring only a few tablespaces or datafiles, the database can be open with the tablespaces or datafiles to be restored offline.

For a restore, RMAN scripts are generated and executed, depending on selections made in the GUI. If you want to perform additional actions, you cannot edit the RMAN restore script, but you can perform the actions manually from RMAN itself.

Restoring the Control File

To restore the control file, follow these steps:

1.   Open the SQL*Plus window and put the database in the nomount state.

2.   In the Data Protector GUI, switch to the Restore context.

3.   Under Restore Objects, expand Oracle Server, expand the system on which the database for which you want to restore the control file resides, and then click the database.

4.   In the Restore Action drop-down list, select Perform RMAN Repository Restore. In the Results area, select the preferred control file restore option, as shown in Figure 25-2.

Images

FIGURE 25-2.   Control file restore options

Depending on the type of the control file backup, the types of restore described in the following sections are possible when you are restoring the control file.

Restoring from Data Protector Managed Control File Backup

When you restore a control file that was backed up with Data Protector, you should know a few things. First, a recovery catalog is not required. Also, the control file will be restored to the default Data Protector temporary files directory. Then, you will need to execute the following RMAN script to complete the restore:

Images

Here, TMP_FILENAME is the location to which the file was restored.

Restoring from RMAN Autobackup

Images   The control file must be automatically backed up by RMAN.

Images   The recovery catalog is not required.

Restoring from RMAN Backup Set

Images   The recovery catalog is required.

Restoring Standby Control File from RMAN Backup Set

If you restore a standby database (not using duplication), you must restore this type of control file. A backup session can contain more than one type of the control file backup. Here are the steps to follow:

1.   In the Options page, from the Client drop-down list, select the system on which the Data Protector Oracle Integration agent (ob2rman.pl) will be started. To restore the control file to a different database than is selected, click Settings and specify the login information for the target database.

2.   Set the other restore options.

3.   Click Restore.

4.   Proceed with restoring the Oracle database objects.

Restoring Oracle Database Objects

To restore Oracle database objects, follow these steps:

1.   Put the database in the mount state.

2.   In the Data Protector GUI, switch to the Restore context.

3.   Under Restore Objects, expand Oracle Server, expand the client on which the database for which you restore the database objects resides, and then click the database.

4.   In the Restore Action drop-down list, select the type of restore you want to perform.

5.   In the Results area, select objects for restore. If you are restoring datafiles, you can restore the files to a new location. Right-click the database object, click Restore As, and in the Restore As dialog box specify the new datafile location.

Images

NOTE

When you are restoring to a new location, current datafiles will be switched to the restored datafile copies only if you have selected Perform Restore and Recovery from the Restore Action drop-down list.

6.   In the Options page, from the Client drop-down list, select the client on which the Data Protector Oracle Integration agent will be started. To restore the database objects to a different database than is selected, click Settings and specify the login information for the target database.

7.   In the Devices page, select the devices to be used for the restore.

8.   Click Restore.

Oracle RMAN Metadata and Data Protector Media Management Database Synchronization

The RMAN metadata, which can be stored either in the recovery catalog database or in the control files, contains information about the target database. RMAN uses this information for all backup, restore, and maintenance operations.

Data Protector has its own data protection policy that is not automatically synchronized with Oracle RMAN metadata. To have both catalogs synchronized, run the following command using RMAN:

Images

RMAN will check all backup information in its repository and query the Data Protector Internal Database for the availability of the backup pieces. RMAN then marks the backup piece as expired or available, depending on media availability. RMAN will not delete the backup information in its repository if it is expired in the Data Protector Internal Database, but instead marks it as expired in the RMAN repository as well.

In order to delete expired backup objects from the recovery catalog database, run the following command using RMAN:

Images

Summary

This chapter has given you an overview of using HP Data Protector software for Oracle RMAN operations. After configuring the integration properly, as well as preparing and scheduling backup configurations that meet your backup needs, you will find it easy to manage the backup/restore operations.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.80.94