Thursday, May 23, 2013

Protecting Your Oracle Databases With IBM Tivoli Storage Manager (TSM) | IT Solutions Provider

Backup of Oracle databases can be taken using TSM for Databases (formerly known as TSM TDP). The normal TSM backup methods do not apply with Oracle - instead of TSM managing the backups, this function is performed within Oracle using the integrated backup and recovery tool, RMAN.
 
TDP for Oracle allows full and incremental backup functions for the following objects in an online or offline state:

• Databases
• Tablespaces
• Datafiles
• Archive log files
• Control files
• Full database restores while offline
• Tablespace and datafile restore while online or offline

It is good practice to work with an Oracle administrator to develop a backup strategy as both the administrator and RMAN are better placed to understand how the Oracle databases and recovery logs fit together. Thereafter, TSM exists only as a back-end data store for the Oracle backups, where RMAN considers TSM to be its media management layer (MML). RMAN decides the files that need to be backed up and passes those files to TSM, while also maintaining the files needed for restore and expiry operations. This information is stored in a separate Oracle database, referred to as the 'catalog', which contains metadata, or in the source database’s control file. When backup, restore or maintenance activity occurs; RMAN connects to the catalog and manages the metadata, creating a record of database backup objects to be backed up. While this effectively creates another Oracle database to manage, the alternative of using control files instead of the catalog can result in TSM becoming out of sync with Oracle, so is best avoided. In addition, data deduplication techniques can be used to reduce the amount of data stored in TSM during the Oracle backup.
 
As well as requiring the base TSM client to be installed (TSM Client v6.4), TSM for Databases will need installing also, along with an appropriate license. The TSM and TDP software must be able co-exist with the environment on which Oracle is running and so is available in either 32-bit or 64-bit. The license is typically located in /usr/tivoli/tsm/client/oracle/bin64/agent.lic. It is also possible to backup the Oracle databases via LAN-free methods - TSM Managed System for SAN Storage Agent will need to be installed on the same system as the TDP for Oracle software.
 
A standard TSM options file is required and a second (RMAN) options file is required for Oracle which is very different from a standard file, so the TSM administrator needs to understand the structure and contents of the file. The RMAN options file contains entries that are specific to the Oracle environment, including location of logs, TSM for Databases code and location of the options file itself. The Oracle DBA then creates script which runs the backup. Finally, a TDP password then needs to be set using the tdpoconf command and the password directory must be owned by the userid that is running Oracle.
 
Typical Oracle Backup Environment:

The RMAN options file basically defines some environment variables. The location of these files will be site dependent. As a minimum they should set three DSMI variables as shown below (typical example).
 
DSMI_LOG /u01/app/oracle/admin/tsm_rman
DSMI_DIR /usr/tivoli/tsm/client/api/bin64
DSMI_ORC_CONFIG /usr/tivoli/tsm/client/api/bin64/dsm.opt

Best Practice
From a TSM perspective, consider creating a separate domain for Oracle backups, to ensure that backups are segregated and that distinct backup management policies can be applied. The Oracle server should be registered as a separate node to the base client and should be defined with 'backupdelete=yes’ option to allow RMAN to manage the backups. In terms of the TSM management class definition, the copygroup should be setup to keep one active backup forever, with retonly and verdelete values both set to a value of 0. Remember - RMAN is handling the retention of backups. Optionally, the TSM administrator can define a clopt (client optionset) that assigns a specific management class to a specific database being backed up.
 
Jeff White - Technical Consultant - Celerity Limited

No comments:

Post a Comment