Advanced Configuration - FlexFrame for Oracle

Understanding the CommCell Console

The Oracle iDataAgent uses the following logical entities to manage backup and restore operations from the CommCell Console.

Agent

Facilitates Oracle instance discovery.

Instance

Defines the Oracle database to be backed up.

Subclient

Defines the Oracle database objects to be backed up.

Managing Instances

For information on how to manage Oracle instances, see Oracle instances.

Managing Container Databases (CDB)

In the CommCell Console each Oracle 12c container database (CDB) maps to an instance. Once you have added an instance for the container database, create subclients and backup sets as you would for any Oracle database instance.

  1. From the CommCell Browser, navigate to Client Computers |< Client >.

  2. Right-click Oracle ,point to All Tasks, and then click New Instance (ORACLE SID).

  3. In the Instance (ORACLE SID) box, type the container database name.

  4. In the User Account box, type the login credentials to access the Oracle container database.

  5. In the ORACLE HOME box, type the Oracle container database application install path.

  6. In the Storage Policy used for the data of default subclient box, select a storage policy name.

  7. Click the Details tab.

  8. In the Connect String box, type the credentials to access the Oracle container database. For example, sys/pwd12@orcl4.

  9. Click the Storage Device tab.

  10. In the Storage Policy used for user command backup of data box, select a storage policy.

  11. In the Storage Policy used for all Archive Log backups box, select a storage policy name.

  12. Click OK.

Configuring User Accounts for Backups

The Oracle Agent requires the following two user accounts in order to perform backup and restore operations:

  • An operating system account with administrator privileges for the Oracle application.

    The following table defines the user account requirements for each operating system:

Operating System

User Account

Windows

  • The Local Administrator of the computer on which the Oracle database resides.

  • The user must be part of the ora_dba group with read and write permissions on the Commvault folder.

Note

when using Oracle 12c, grant full control permission for the Oracle home user for the Commvault folder.

UNIX

Member of the user group assigned during the Agent installation. The operating system user account can also be used.

  • An Oracle user account with the SYSDBA or SYSBACKUP (in Oracle version 12 or higher) privilege can access the Oracle target database. Provide the account information as a connect string with the following connection details:

    • The database user ID and password

    • The Oracle Service Name (as defined in the tnsnames.ora file)

    Use separate accounts to access the target database and the recovery catalog database. The recovery catalog database user account must have RECOVERY_CATALOG_OWNER privileges, which are not required for the target database user.

    By default, the user account for the target database has administration privileges and must be established so the Oracle database administrator can configure additional accounts (except Impersonate User).

Initially, the user account credentials are provided during the instance configuration after the installation of the Agent. You can subsequently change the user account information to access the Oracle database and application at the Instance level whenever the credentials are updated.

Configuring User Account to Access the Oracle Application

You can configure the user account to access the Oracle application.

Procedure
  1. From the CommCell Browser, navigate to Client Computers | <Client> | Oracle.

  2. Right-click the <Instance>, and then click Properties.

    • On the Properties dialog, navigate to the General tab.

      For Windows clients:

      • Click Change, which displays the Impersonate NT User dialog.

      • In the User Account box, enter the user account name.

      • In the Enter Password box, enter the password for the user account.

      • In the Confirm Password box, re-enter the password, and then click OK.

      For Unix clients:

      In the User Account box, enter the user account that you use to access the Oracle application.

    • Click OK.

Configuring User Account to Access the Oracle Database

You can configure the user account privileges to access the Oracle database.

Procedure
  1. From the CommCell Browser, navigate to Client Computers | <Client> | Oracle.

  2. Right-click the <Instance>, and then click Properties.

  3. On the Details tab, enter the Oracle connection information:

    • To use the Oracle Wallet feature, select the Oracle Wallet Auto Login check box.

    • To use the Oracle Connect String, select the Use Connect String check box and in the Connect String box enter the Oracle connect string credentials.

      Note

      If you want to use an account that is other than 'sys', you must grant the SYSDBA or SYSBACKUP (in Oracle version 12 or higher) privilege to the user account.

      Enter the Connect String to connect to the Oracle database as follows:

      1. In the first box enter the Database user ID.

      2. In the second box enter the Password.

      3. In the Confirm Password dialog box, re-enter the password, and click OK.

      4. In the third box enter the Oracle Service name.

      For example, in the following:

      sysdba/<password>@orcl

      sysdba is the Database User ID

      <password> is the Database User ID password

      orcl is the Oracle service name

  4. Click OK.

Managing Subclients

Subclients contain the information about what Oracle data is backed up.

When you create an Oracle database instance, a default subclient that includes the entire database and log and control files is automatically created.

If a new database object is added to the Oracle database and none of the subclients contain that database object, then the object is assigned to the default subclient.

You can use the CommCell Console or the Commvault Command Line Interface to create separate subclients for each unique data set and log files. Use the following criteria when determining the unique data sets:

  • The data content you want to back up and how you need to restore the data (for example, all tables or a subset of tables)

  • The database state when you perform backups

  • The required schedule for the data

If a new database object is added to the database, and if none of the subclients contain that database object, then that object is automatically assigned to the content of the default subclient.

When you perform an IntelliSnap backup, the software creates a backup copy.

Use a proxy server when you want to reduce the load on the production server. The proxy server also moves the snap to the backup media.

Note: If you want to use the Oracle RMAN backup copy option by using a proxy server, you must contact Oracle for their required licensing.

If you want to create a subclient for the Oracle Instant Application Recovery feature, you must set the Volume Copy option for the subclient (Subclient Properties dialog box, IntelliSnap Operations tab, Volume Copy (Block-Level Backup - Support Instant Database Recover).

Best Practice: To ensure that the snapshot reflects the backup details in the schema, after you connect to the catalog, run a traditional full backup on the IntelliSnap subclient. For information on how to perform the backup, see Performing an Oracle Full Backup.

Creating a Subclient for Offline Backups

During an offline backup, the database is shutdown and is not available for use. Since incremental backups require access to various tablespaces and datafiles, it is always recommended that you perform a full backup of the database when it is offline. The full backup includes all the datafiles, tablespaces, and control file of the Oracle database. Note that, offline backups do not include the archived log files.

Offline backups can be performed when the database is in offline or online mode. If the database is online, it shuts down the database, performs the backup and then brings up the database back.

In order to backup the Oracle database when it is offline, you need to create a separate user-defined subclient for offline backup. Make sure that the database is in the MOUNT mode during the backup.

A static listener must be configured for offline backups with lights out script when the Oracle database is in open mode. See When do we configure a static listener for additional information.

Use the following steps to create a subclient for offline backups:

  1. From the CommCell Browser, navigate to Client Computers | <Client>| Oracle.

  2. Right-click the <Instance>, point to All Tasks, and then click New Subclient.

    The Subclient Properties dialog box appears.

  3. On the General tab, type the Subclientname.

  4. On the Contents tab, make the following selections:

    • Check the Data check box.

    • Select Offline Database.

  5. On the Storage Device tab, from the Data Storage Policy list, select the storage policy.

  6. Click OK.

Creating a Subclient for Online Backups

In some environments, it may not be possible to bring down the entire database to perform an offline backup. In such situations, you can choose online backups, where the database will be up and running during the backup.

You can perform either a full backup or incremental backup of the Oracle database when it is online. Since full backups includes all the datafiles, tablespaces and logs, it is very time consuming, hence you can plan for a full online backup less frequently (say, on weekly basis). On the other hand, incremental backups includes the data and logs that have been changed after the last full backup, they are faster and can be performed more frequently (say, on a daily basis).

If a new database object is added to the database, and if none of the subclients contain that database object, then that object is assigned to the content of the default subclient

Use the following steps to create a subclient for online backups:

  1. From the CommCell Browser, navigate to Client Computers | <Client>| Oracle.

  2. Right-click the <Instance>, point to All Tasks, and then click New Subclient.

    The Subclient Properties dialog box appears.

  3. On the General tab, type the Subclientname.

  4. On the Contents tab, select Online Database.

  5. On the Storage Device tab, from the Data Storage Policy list, select the storage policy.

  6. Click OK.

Creating a Subclient to Back Up Individual Datafiles and Tablespaces

You can also create subclients to backup specific datafiles and tablespaces, which undergo frequent changes in the Oracle database.

Use the following steps to create a subclient to backup individual datafiles and tablespaces:

  1. From the CommCell Browser, navigate to Client Computers | <Client>| Oracle.

  2. Right-click the <Instance>, point to All Tasks, and then click New Subclient.

    The Subclient Properties dialog box appears.

  3. On the General tab, type the Subclientname.

  4. On the Contents tab, make the following selections:

    • Select the Online Subset option.

    • Click Yes on the Warning dialog.

    • Select the database objects to be included from the Current Database View.

  5. On the Storage Device tab, from the Data Storage Policy list, select the storage policy.

  6. Click OK.

Creating a Subclient for Selective Online Full Backups

You can selectively copy full backup to a selective copy during an auxiliary copy. The advantage of this type of backup is that both data and logs use the same storage policy, which means that they reside together on the same media. They are completely self-contained for restore and long term archiving purposes. Also, the data aging rules for selective online full backups are different from regular full backups, as both data and logs are aged together under the same storage policy

When performing the selective online full backup, note the following:

  • A selective online full backup job will wait for other Oracle backup jobs currently running on the same instance to complete before it begins.

  • For this type of backup, both data and archive logs will use the same storage policy as defined for data in the subclient, and will ignore the storage policy setting for archive logs (which is defined at the instance level).

  • During selective online full backups, if the data streams (defined at the subclient level) is less than the archive log streams (defined at the instance level), then both the data phase and the archive log phase will use the same number of streams defined for the data in the subclient, and will ignore the number of streams set for the archive logs.

  • While the data backup phase of a selective online full backup is running, the only other Oracle backup jobs that are allowed to run on the same instance are archive log backups. During the log backup phase of a selective online full backup, no other Oracle backups are allowed to run (neither logs nor data) on the same instance.

  • If other Oracle archive log backup jobs are running at the same time as the selective online full backup, they will be forced to use the same storage policy used by the selective online full backup during the time-frame in which the selective online full backup job is running, and will be included in the same auxiliary copy operation.

  • Selective online full backup jobs can be suspended in the job controller.

  • Selective online full backups restarts from the beginning of the phase. For example, if the selective online full backup jobs goes to pending state during the data phase, when restarted, the job starts from the beginning of the data phase.

  • Selective online incremental backup jobs can be suspended in the Job controller and restarted from the point of failure like regular backups.

  • Selective online full incremental backups can be copied to selective copy. Run the script below to copy a full cycle of jobs to selective copy.

    Qscript -f SelectAdditionalJobs [storage policyName] [copy name] [backup types]

The following are valid values for the backup types:

  • 0, disable selection of additional jobs

  • 2, include all non-full jobs

The script can be run from Commvault Install base directory on the CommServe.

 qoperation execscript –sn SelectAdditionalJobs.sql –si <storage policyName> -si <copyname> -si 2

Using the above full-cycle script, selective online full, incremental, offline full and incremental jobs are copied to the selective copy when the Auxiliary copy operation is performed on the storage policy.

  1. From the CommCell Browser, navigate to Client Computers | <Client>| Oracle.

  2. Right-click the <Instance>, point to All Tasks, and then click New Subclient.

    The Subclient Properties dialog box appears.

  3. On the General tab, type the Subclient name.

  4. On the Contents tab, select the Selective Online Full check box.

  5. On the Storage Device tab, from the Data Storage Policy list, select the storage policy.

  6. Click OK.

Configuring the Storage Policy for a Log Backup during a Selective Online Full Backup

For information on how to configure the storage policy, see Configuring the Storage Policy for a Log Backup During a Selective Online Full Backup

Configuring Selective Online Full Backups Using XML

You can create a selective online full backup using XML. See Configuring Subclients Using XML for Oracle.

Selective Online Incremental Backup

When performing selective online incremental backups, note the following:

  • Selective online incremental backup jobs can be suspended in the Job controller and restarted from the point of failure like regular backups.

  • Selective online incremental backups are not copied to Selective copy.

  • Selective online incremental backup will use the storage policies specified for both data and logs.

Creating a Subclient for Log Backups

Archive logs are required to recover database transactions that have been lost due to an operating system or disk failure. You can apply these archive logs to an online backup in order to recover a database.

Though online full backups can include both data and logs, because of their importance in recovering data, it is recommended that you create separate subclients to backup archive log files.

  1. From the CommCell Browser, navigate to Client Computers | <Client>| Oracle.

  2. Right-click the <Instance>, point to All Tasks, and then click New Subclient.

    The Subclient Properties dialog box appears.

  3. On the General tab, type the Subclientname.

  4. On the Contents tab, clear the Data check box.

  5. On the Storage Device tab, from the Data Storage Policy list, select the storage policy.

  6. On the Log Backup tab, select the Backup Archive Log check box.

  7. Click OK.

Configuring Log Backups from Command Line

If you want to create a subclient for Log backups on multiple instances or clients instead of navigating to each client and creating the subclients, then, use this qscript.

Use the following steps to create a subclient for Log backups from the command line using qscript:

  1. From the command prompt, logon to the CommServe using the qlogin command.

    Example: To log on to CommServe commserve.commcell.com with user name user1:

    qlogin -cs commserve.commcell.com -u user1

    Password:

  2. Run the command to create a subclient.

    D:\>qcreate sub client -cs commserve.commcell.com -c client -a Q_ORACLE -i auto -n "NEWlog" -sp "data_storage_policy" -f "auto"

  3. Run the command to disable Data option.

    D:\>qoperation execscript -sn SetSubClientProperty.sql -si 'c=client' -si 'a=Q_ORACLE' -si 'i=auto' -si 'b=default' -si 's=NEWlog' -si 'Oracle Backup Mode' -si '1' -si '2'

  4. Run the command to disable Backup Control File option.

    D:\>qoperation execscript -sn SetSubClientProperty.sql -si 'c=client' -si 'a=Q_ORACLE' -si 'i=auto' -si 'b=default' -si 's=NEWlog' -si 'Backup Control Files' -si '0' -si '2'

  5. Run the command to disable Delete Archive log option.

    D:\>qoperation execscript -sn SetSubClientProperty.sql -si 'c=client' -si 'a=Q_ORACLE' -si 'i=auto' -si 'b=default' -si 's=NEWlog' -si 'Archive Log Deleting' -si '0' -si '2'

For more information about the parameters and arguments, see qscript.

Configuring Log Backups Using XML

You can create a selective online full backup using XML. See Configuring Subclients Using XML for Oracle.

Configuring Control File Subclients
  1. From the CommCell Browser, expand Client Computers > client > Oracle >instance.

  2. Right-click the instance, point to All Tasks and then click New Subclient.

    The Create New Subclient dialog box appears.

  3. On the Content tab:

    • Select the Backup Control File check box to include the control file in the backup.

    • Select the Backup SP File check box to include the SP file in the backup.

  4. Click OK to close the Create New Subclient dialog box.

Configuring Backups for Standby Database

Set up a standby database as a copy of the primary (production) database and use it for full system recovery (disaster recover) and data corruption.

You can back up standby databases when they are either in an offline or online state.

When the database in online, the Oracle Agent determines the standby database mode by checking the database role and automatically disables the log switch operation.

Before You Begin

Configure a standby instance for the Oracle database.

Procedure

  1. From the CommCell Browser, expand Client Computers > client > Oracle.

  2. Right-click the instance, point to All Tasks and then click New Subclient.

    The Create New Subclient dialog box appears.

  3. On the General tab, in the SubclientName box, type the subclient name.

  4. Select the backup mode. On the Content tab:

    • Offline Database - if backups are performed when the database is offline

    • Online Database -if backups are performed when the database is online

  5. Select the storage policy. On the Storage Device tab, select the storage policy from the Data Storage Policy list.

  6. Click OK to close the Creating New Subclient dialog box.

Configuring Archive Log Destinations

When you backup archive logs, you can specify the locations from where the log backups should be performed. This capability enables you to schedule backup operations from different log destinations on the same subclient. If necessary, you can also delete the logs after the backup. For more information, see the "Deleting the Logs after a Backup" section on this page.

Configuring the Log Destination for Backup

Use the following steps to configure the log destination for backup:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | Oracle | <Instance>.

  2. Right-click the <Subclient> and then click Properties.

  3. On the Subclient Properties dialog box, navigate to the Logs Backup tab.

    • Select the Backup Archive Log check box.

    • Select the Select ArchiveLog Destinations for Backup check box.

    • Click Add.

    • Type or select the Archive log file destination, and then click OK.

  4. Click OK.

Deleting the Logs after a Backup

Ensure that the logs in the specified location are backed up. This may cause data loss if those archive logs are not backed up.

Use the following steps to delete the logs after an IntelliSnap backup:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | Oracle | <Instance>.

  2. Right-click the instance, point to All Tasks and then click New Subclient.

    The Create New Subclient dialog box appears.

  3. On the Logs Backup tab, do the following:

    • Select the Select ArchiveLog Destinations for Delete check box.

    • Click Yes to close the warning message.

    • In the Confirmation box, type confirm and click OK.

    • Click Add.

    • Type or select the Archive log file destination and click OK.

    • Click Yes.

  4. Click OK.

Disabling Log Switch

When performing archive log backups, the current redo log file is closed (even if it is not filled up completely) and the next redo log file is used for writing using a log switch. The closed redo log file is then archived during the log phase. Use the following steps to disable the log switch:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | Oracle | <Instance>.

  2. Right-click the instance, point to All Tasks and then click New Subclient.

    The Create New Subclient dialog box appears.

  3. On the Logs Backup tab, do the following:

    • Select the Backup Archive Log check box.

    • Select the Disable Switch Current Log check box.

  4. Click OK.

Enabling Log Deletion after Backup

When backing up archive logs using user-defined subclients, by default the logs are not deleted after the backup operation. Use the following steps to enable deletion of logs soon after the backup.

Alternatively, you can also delete the logs from specific backups. See Deleting Archive Logs for a Specific Backup for more information.

  1. From the CommCell Browser, navigate to Client Computers | <Client> | Oracle | <Instance>.

  2. Right-click the instance, point to All Tasks and then click New Subclient.

    The Create New Subclient dialog box appears.

  3. On the Logs Backup tab, do the following:

    • Select the Backup Archive Log check box.

    • Select the Archive Delete check box.

  4. Click OK.

See Deleting Archive Logs After a Specific Backup for more information.

Managing Control Files

As the Control file stores the status of the physical structure of the database. It is required when you want to recover the database to the current state. Hence it is important to include control files in your backups. By default, control files are included in the subclient for selective online full backups. You can also include/exclude control files for online or offline backups. The following sections describe the methods by which you can backup control files.

Enabling Automatic Backup of Control Files for All Subclients

You can configure the instance to automatically backup Control Files whenever you a backup the subclient in that instance.

  1. From the CommCell Browser, expand Client Computers > client > Oracle RAC.

  2. Right-click the instance, point to All Tasks and then click New Subclient.

    The Instance Properties dialog box appears.

  3. On the Details tab, make the following selections:

    In the Automatic Backup of Control Files box, select how and when to back up the control file:

    • Select Configure On to have the control file and server parameter file written to a separate autobackup piece during a backup. RMAN can recover the database even if the current control file, catalog, and server parameter file are lost.

    • Select Configure Off to exclude the control file and SP file from all instance backups.

    • Select Not Configure to keep the current setting.

  4. Click OK to close the Instance Properties dialog box.

You can configure automatic back ups of the control file at the subclient level. For information on enabling the control file automatic backup at the subclient, see Enabling Automatic Backups of the Oracle Control File at the Subclient Level.

Configuring Table Restores

By default, all data is backed up which includes tablespaces. If you want to restore individual tables, you need to enable table level backup.

Enabling Table Browse for Restores

In order to backup and restore database tables, you need to enable table level backups for the subclient. Use the following steps to enable backups at table level.

  1. From the CommCell Browser, navigate to Client Computers | <Client> | Oracle | <Instance>.

  2. Right-click the instance, point to All Tasks and then click New Subclient.

    The Create New Subclient dialog box appears.

  3. On the Options tab under the Backup Arguments tab, select the Enable Table Browse check box.

  4. Click OK.

Setting Up the Auxiliary Instance

By default, when you restore database tables to a target instance, the system automatically duplicates the source database to an auxiliary instance in a temporary staging location specified during the restore operation. The database will be automatically imported from this auxiliary instance after the restore.

Use the following steps to set up a specific database as an auxiliary instance. This is useful when you want to restore a table to a specific failure point.

  1. Copy the init<SID>.ora file from the source database to the auxiliary database instance.

  2. Update the database name and the database file locations in the init<SID>.ora file for the auxiliary database instance.

  3. Add the DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT parameters in the init<SID>.ora file. These parameters will redirect the datafiles, temp files, and log files to the auxiliary instance.

Windows:

DB_FILE_NAME_CONVERT=('sourcE_of_df_path/','dup_of_df_path/','source_of_temp_path/','dup_of_temp_path/',...)

LOG_FILE_NAME_CONVERT=('source_of_log_path/redo','dup_of_log_path/redo')

Restart the Oracle Services, if using Windows clients.

Unix:

DB_FILE_NAME_CONVERT=(source_of_df_path/,dup_of_df_path/,source_of_temp_path/,dup_of_temp_path/,...NVERT=_log_path/redo,dup_of_log_path/redo)

  1. Add the log_archive_dest_1 parameter is added to the init<SID>.ora file on the auxiliary instance.

  2. Add the destination instance name in the Listener.ora and Tnsnames.ora files. If using a different host, add the duplicate database instance name in the Listener.ora file on the destination host and Tnsnames.ora files on the destination and source hosts. Also, add the original database name in the Tnsnames.ora file on the destination host.

    DUPDB = (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = powerpc02)(PORT = 1521))

    (CONNECT_DATA = (SERVER = DEDICATED)

    (SERVICE_NAME = dupdb) (UR=A) ) )

  3. Restart the Listener.

    $lsnrctl reload

  4. Ensure that the auxiliary instance is in NOMOUNT mode.

    sql> startup nomount;

Configuring Lights Out Script for Offline Backups

In order to perform offline backups of the Oracle database, all users must be logged out of the database and it must be completely shut down. When the database is online, you can enable a graceful shutdown of the database using lights out script that will notify the users about the shutdown and set a specific wait time for the users to logout of the database. Use the following steps to configure lights out script for offline backups:

  1. From the CommCell Browser, navigate to Client Computers | <Client>| Oracle.

  2. Right-click the <Instance>, point to All Tasks, and then click New Subclient.

    The Subclient Properties dialog box appears.

  3. On the General tab, type the Subclientname.

  4. On the Contents tab, select the Offline Database option.

  5. On the Offline Arguments tab, under the Backup Arguments tab:

    • Select the Lights Out Script check box.

    • Select the Warning check box to display a warning message on the physical node.

    • In the Sleep Time (min) box, select or type the number of minutes to wait between retry attempts.

    • In the Sleep Time (sec) box, select or type the number of seconds that you want the script to wait between retry attempts to shut down the database and check the status.

    • In the Tries Number box, type the number of times the system must retry to attempt to shut down the database.

    • Select the Use SQL Connect check box to connect to the Oracle database.

  6. Click OK.

Including Server Parameter (SP) File during Backups

The Server Parameter file (SPFile) contains the database startup information. By default, the backups do not include the SPFile.

Use the following steps to include SPFile during backups:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | Oracle | <Instance>.

  2. Right-click the <Instance>, point to All Tasks, and then click New Subclient.

    The Subclient Properties dialog box appears.

  3. On the General tab, type the Subclientname.

  4. On the Contents tab, select the Back up SP FILE check box.

  5. Click OK.

Enabling Backups of Flash Recovery Area

Flash Recovery Area is a specific area in the disk storage that exclusively holds a copy of all backup-related components, such as image copies, redo logs, and control file auto backups. This facilitates faster restores of backup data and minimizes restores from tapes during restore operations. Use the following steps to enable backup of flash recovery area:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | Oracle | <Instance>.

  2. Right-click the <Instance>, point to All Tasks, and then click New Subclient.

    The Subclient Properties dialog box appears.

  3. On the General tab, type the Subclientname.

  4. On the Contents tab, select the Protect backup recover area check box.

  5. Click OK.

Configuring Merged Incremental Backups

You can create an image copy of a database, then regularly create incremental backups of the database and apply them to this image copy. The system will update the image copy with all the incremental changes that have taken place since the previous full using the System Change Number (SCN) . RMAN can use this updated datafile in media recovery in the same manner as it would use a regular full image copy taken at that SCN. This reduces the overhead of performing a full image copy of the database everyday.

Incrementally updated backups otherwise known as merged incrementals can help you to minimize the time required for media recovery of the database. You need to configure the FLASH recovery area to use these incrementally updated backups. The Flash Recovery Area is defined in the parameter file of the database. Currently, Commvault supports backing up flash recovery area to TAPE using the following RMAN script:

backup recovery area

Recovery area backup is performed during logs phase as it contains archive logs. The Incrementally updated backups are suitable primarily for disk based backup/recovery strategy.

Merged Incremental creates a level 0 image copy backup of all of your database's datafiles in a disk location. All the datafiles are backed up using the same tag name.

Creating an Image Copy

An image copy is an exact copy of a single datafile, archived redo log file, or a control file. Image copies are not stored in an RMAN-specific format. They are identical to the results of copying a file with operating system commands. RMAN can use image copies during RMAN restore and recover operations. You can also use image copies with non-RMAN restore and recovery operations.

Run the following command to create image copies and update them in the RMAN repository:

RMAN> BACKUP AS COPY <datafile>

Example:

RMAN> backup as copy datafile 1;

Alternatively, you can configure the default backup type for disk or image copies using the following command before performing a backup:

RMAN> Configure device type disk backup type to copy;

A database server session is used to create the copy. The server session also performs actions such as validating the blocks in the file and recording the image copy in the RMAN repository.

Run the following RMAN script to perform the merged incrementals:

run {
 recover copy of database with tag 'incr_update';
 backup incremental level 1 for recover of copy with tag 'incr_update'
 database;
 }

Wherein

  • The BACKUP INCREMENTAL LEVEL 1... FOR RECOVER OF COPY WITH TAG command:

    • Creates a level 1 incremental backup. If there is no incremental level 0 backup of an individual datafile to use with this level 1 backup, then executing this command creates a level 0 backup of the datafile with the specified tag.

    • Hence, the first time the script runs, it creates the level 0 backup of the datafile needed to begin the cycle of incremental updates. In the second and all subsequent runs, it produces level 1 incremental backups of the datafile.

  • The RECOVER COPY OF DATABASE WITH TAG command :

    • Causes RMAN to apply any incremental level 1 backups to a set of datafile copies with the same tag. If there is no incremental backup or no datafile copy, the command generates a message but does not generate an error.

    • When the script runs for the first time, this command has no effect, since there is neither a datafile copy nor a level 1 incremental backup. The second time the script runs, there is a datafile copy (created by the first BACKUP command), but no incremental level 1 backup. Hence, the command will not have any effect. On the third and all subsequent runs, there is a datafile copy and a level 1 incremental from the previous run. Hence, the level 1 incremental is applied to the datafile copy, bringing the datafile copy up to the checkpoint SCN of the level 1 incremental.

  • The image copies and incremental are stored in FLASH recovery area.

  • TAG name is important to identify the image copies and level 1 incremental updates. You cannot perform a merge incremental backup job without specifying the TAG either at the Subclient or job level.

Configuring Merged Incremental Backups Using CommCell Console

Similar to the command line, the CommCell Console also uses the BACKUP INCREMENTAL LEVEL 1... FOR RECOVER OF COPY WITH TAG and RECOVER COPY OF DATABASE WITH TAG commands to run merge incremental backup operations.

  • The BACKUP INCREMENTAL LEVEL 1... FOR RECOVER OF COPY WITH TAG command:

    • Creates a level 1 incremental backup. If there is no incremental level 0 backup of an individual datafile to use with this level 1 backup, then executing this command creates a level 0 backup of the datafile with the specified tag.

    • Hence, the first time the script runs, it creates the level 0 backup of the datafile needed to begin the cycle of incremental updates. In the second and all subsequent runs, it produces level 1 incremental backups of the datafile.

  • The RECOVER COPY OF DATABASE WITH TAG command:

    • Causes RMAN to apply any incremental level 1 backups to a set of datafile copies with the same tag. If there is no incremental backup or no datafile copy, the command generates a message but does not generate an error.

    • When the script runs for the first time, this command has no effect, since there is neither a datafile copy nor a level 1 incremental backup. The second time the script runs, there is a datafile copy (created by the first BACKUP command), but no incremental level 1 backup. Hence, the command will not have any effect. On the third and all subsequent runs, there is a datafile copy and a level 1 incremental from the previous run. Hence, the level 1 incremental is applied to the datafile copy, bringing the datafile copy up to the checkpoint SCN of the level 1 incremental.

  • The image copies and incremental are stored in the FLASH recovery area.

  • The content in the Oracle flash recovery area is backed up to a media.

    Oracle Flash Recovery Area (FRA) can potentially run out of space. Hence, it is important to regularly schedule backups for Flash Recovery Area to media.

    Following parameters will affect the FRA space:

    1. Configure the FRA size using the following init file parameter:

      db_recovery_file_dest_size –-- specifies the size of the FRA
    2. Configure your retention policy using the following command from RMAN prompt:

      CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF n days --- where n is the number of days
    3. Configure the archived log deletion policy using the following command from RMAN prompt:

      CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP n TIMES TO SBT --- where n is the number of times
    4. All the files in FRA location that meet the Retention criteria are set as obsolete. FRA location is not cleaned up automatically until all the space in FRA is full even after meeting the FRA retention policies. The obsolete pieces are pruned when there is a need for additional space. Use the following to verify the usage of FRA space:

       V$FLASH_RECOVERY_AREA_USAGE;

Use the following steps to configure the merged incremental backups:

  1. From the CommCell Browser, go to Client Computers > Client > Oracle > Instance.

  2. Right-click the instance, point to All Tasks, and then click New Subclient.

    The Subclient Properties dialog box appears.

  3. On the Contents tab do the following:

    • Clear the Data check box.

    • Clear the Backup Control File check box.

    • Select Protect backup recovery area.

  4. On the Options tab under the Backup Arguments tab, select the Merge Incrementals Image Copy check box. A warning message appears informing you that the you cannot perform a merge incremental backup job without specifying the TAG either at the Subclient or job level.

    The TAG name is important to identify the image copies and level 1 incremental updates. You cannot perform a merge incremental backup job without specifying the TAG either at the Subclient or job level.

  5. Click OK.

Using Recovery Catalog for Backups

By default, recovery catalog is not used for backup and restore. As the recovery catalog contains metadata about RMAN operations for each registered database, it is recommended to include recovery catalog in backups. The metadata information is useful when you want to restore and recover the database after a crash. Use the following steps to use the Recovery Catalog for backups:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | Oracle | .

  2. Right-click the <Instance> and then click Properties.

  3. On the Instance Properties dialog box, on to the Details tab.

    • Select the Use Catalog Connect check box.

    • In the Catalog Connect String box

      • In the User ID box, type the Database user ID.

      • Click the Password box, in the Enter Password box, type the password for the user ID.

      • In the Confirm Password box, retype the password, and then click OK.

      • Type the Oracle service name.

      For example:

      sysdba/<password>@<orcl

      where, sysdba is the Database User ID, <password> is the password of the Database User ID, and orcl is the Oracle service name.

  4. Click OK.

Configuring Streams for Backups

You can increase the number of streams used for backups for a particular subclient provided the number of streams does not exceed the maximum number configured in the subclient's storage policy. Increasing the number of streams for a subclient further reduces the amount of time a backup takes to complete. For example, increasing the number of streams from 2 to 3 enhances backup time from one-half that of a single stream to one-third.

Keep in mind that the same number of streams used for performing a backup will be needed to restore the data.

  1. From the CommCell Browser, navigate to Client Computers | <Client> | Oracle | <Instance>.

  2. Right-click the <Subclient> and then click Properties.

  3. On the Storage Device tab.

    • In the Number of Data Backup Streams box, type or select the number of data backup streams.

    • In the Number of Archive Log Backup Streams box, type or select the number of log backup streams.

  4. Click OK.

Enhancing Backup Performance

Several options are available for enhancing backup performance and reduce the network bandwidth used for performing backups. These options include:

  • Specifying the number of datafiles and archive files to be included in each RMAN backup set. The default value is 32.

  • Specifying the maximum size for each RMAN backup set. By default no limits are defined. By default no limits are defined.

  • Specifying the number of open datafiles that can be read by RMAN during the backup. The default value is 8.

  • Specifying the maximum size of data blocks used during backups. The default value is 262144 Kb.

  • Specifying the section size for Oracle 11g multi-section backups. This enables you to divide large data files into multiple sections and simultaneously backup the data file across multiple channels.

    If the section size is larger than the data file size, multi-section backup is not used for the file. If the section size is very small that more than 256 sections would be produced, RMAN increases the section size such that 256 sections are created.

In addition to the above configurations, you can also enable distribution of data across disks during backup operations. See Performance Tuning for more details

Use the following steps to enhance the backup performance:

  1. Right-click the <Instance>, point to All Tasks, and then click New Subclient.

    The Subclient Properties dialog box appears.

  2. On the Backup Arguments tab under the Backup Arguments tab.

    • In the Data Files per BFS box, type or select the number of datafiles in each RMAN backup set.

    • In the Archive Files per BFS box, type or select the number of archive files in each RMAN backup set.

    • In the Backup Set Size group box, do one of the following:

      • Click MAX Backup Set Size and type or select the size of backup set allowed for RMAN backup set.

      • Click Section Size and type or select the size of each data file section used in an RMAN backup set for Oracle 11g backups.

    • In the Max Open Files box, type or select the number of datafiles that RMAN can read from simultaneously during a backup operation.

  3. Click OK.

  4. From the CommCell Browser, navigate to Client Computers | <Client> | Oracle.

  5. Right-click the <Instance> and then click Properties.

  6. On the Instance Properties dialog box, on the Details tab, in the Block Size box, type or select the size of the block for backup and restore operations. The value must be a multiple of the minimum physical block size of the Oracle database.

  7. Click OK.

Assigning Unique Identification Tags for Backups

You can assign unique identification tags for all backup operations from a specific subclient. These tags can be used during a restore operation to easily identify a particular backup. Use the following steps to assign unique identification tag for backups.

  1. From the CommCell Browser, navigate to Client Computers | <Client> | Oracle | <Instance>.

  2. Right-click the <Subclient> and then click Properties.

  3. On the Subclient Properties dialog box, navigate to the Backup Arguments tab under the Backup Arguments tab, in the Oracle Tag box, type the tag name.

  4. Click OK.

Supported Variables

When creating oracle tags, you can also include variable names that will be substituted with the actual value during the backup or restore operation.

The following variables can be included in the Oracle tag name:

Variable Name

Description

%CC%

CommCell ID

%SC%

Subclient Name

%JOB%

Job ID

%LVL%

Backup Level (FULL or INCR)

%PHASE%

Backup phase when the backup piece was created. (DATA or LOG)

%DATE%

Job start date on the client in YYYYMMDD format

%TIME%

Job start time on the client in HHMMSS format. (HH will be in 24 hour format)

Note

The CommCell Console can include a maximum of 31 characters for Oracle tag name. Therefore, when using variables, if the Oracle tag name exceeds 31 character limit after substituting the values, the name will be truncated. You can preview the script from the CommCell Console to identify any truncation.

Excluding Data during Backups

You can configure a subclient to skip the following data during backup operations:

  • Read-only tablespaces

  • Offline tablespaces

  • Inaccessible Datafiles and Archived redo log files

Use the following steps to exclude data during backup operations:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | Oracle | <Instance>.

  2. Right-click the <Subclient> and then click Properties.

  3. On the Subclient Properties dialog box, navigate to the Options tab under the Backup Arguments tab.

    • Select the SKIP READ ONLY check box to exclude the read only tablespaces.

    • Select the SKIP OFFLINE check box to exclude the offline tablespaces.

    • Select the SKIP INACCESSIBLE check box to exclude inaccessible data and log files.

  4. Click OK.

Validating a Backup

Prior to running backup operations, you can validate a backup job, which will cause RMAN to simulate the backup for the purpose of determining whether the backup can be successfully performed.

During validation, the backup jobs are simulated without the media. Once a validate job is completed, you can view the log files of the job to identify and correct any validation issues.

Use the following steps to enable validation of backup jobs:

Prior to running a backup, you can check the following:

  • Datafiles for physical and logical block corruption

  • Database files exist and are in the correct location.

  • From the CommCell Browser, navigate to Client Computers | <Client> | Oracle | <Instance>.

  • Right-click the <Subclient> and then click Properties.

  • On the Subclient Properties dialog box, navigate to the Options tab under the Backup Arguments tab, select the Validate check box.

  • Click OK.

  • Run the backup.

Specifying the Media Parameters for RMAN Command Line Operations

RMAN command line backups use storage policy and data path specified in the instance properties. However, you can override the default parameters by media parameters file using <param>in RMAN script. You can execute the script file with the updated parameters from the RMAN command line. This feature is supported for backup, restore, and duplicate database operations.

Note

Make sure that the Data Path (MediaAgent, Library, Drive Pool etc., ) provided is associated with the specified storage policy in the parameters file.

See Configuration using the Application Command Line Interface (RMAN Scripts) for details.

Disabling the RMAN Crosscheck

By default, during a data aging operation, an Oracle CROSSCHECK is performed by the system to synchronize the entries in the CommServe database with the RMAN catalog. Use the following steps to disable the cross check operation:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | Oracle.

  2. Right-click the <Instance> and then click Properties.

  3. On the Instance Properties dialog box, navigate to the Details tab.

    • Select the Disable RMAN cross check check box.

    • Click OK to close the warning message.

  4. Click OK.

Enabling Multiple Backup Copies

You can take multiple copies of the data or log backups using RMAN command line. During restores, even if one of the copies is missing or corrupted, the restore operation will automatically failover to the other copy and restore the data.

  1. To utilize the PARALLELISM option, you need to set the initial parameter in pfile or spfile.

    Example:

    BACKUP_TAPE_IO_SLAVES=TRUE
  2. Configure device type.

    Example:

    RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUP SET;
  3. Specify two copies of data.

    Example:

    RMAN> CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 2;
  4. Specify two copies of log backups.

    Example:

    RMAN> CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 2;
  5. Add the environmental variables for the client and instance on which the iDataAgent is installed.

    Example:

    allocate channel ch1 type 'sbt_tape'

    PARMS="<software_install_path>/Base/libobk.so,

    ENV=(CvClientName=<client_name>,

    CvInstanceName=<instance_name>)"

  6. Once you set the parameters, restart the Oracle database and perform backup operations from the CommCell Console.

    Example:

    To restart the database,

    1. Connect to the database.

      SQL> connect admin/admin@orcl as sysdba
    2. Shutdown the database.

      SQL> shutdown
    3. Mount the database.

      SQL> startup mount;
    4. Change to archivelog mode.

      SQL> alter database archivelog;
    5. Open the database.

      SQL> alter database open;

Configuring the Backup Piece Format

The backup piece format is as follows for GUI backups <Hex_CommCell_ID>_<CVJobID>_%d_%U which ensures to get unique name for backup pieces.

Hex_CommCell_ID – Hexadecimal CommCell ID

CvJobID –Commvault job id

%d - represents the Oracle database name

%U – unique identifier

To have the default backup piece format ‘%U’ as before, set the following Additional Setting on the CommCell.

  1. From the CommCell Browser, navigate to Client Computers.

  2. Right-click the <Client>, and then click Properties.

  3. Click Advanced.

  4. Click the Additional Settings tab.

  5. Click Add.

  6. In the Name box, type sDisableBackupPieceFormat.

  7. In the Category box, select or type OracleAgent.

  8. In the Type box, select String.

  9. In the Value box, type Y and click OK.

  10. Click OK.

Customizing the Backup Piece Format

You can customize the backup piece format for non RMAN backups by setting the following Additional Setting.

  1. From the CommCell Browser, navigate to the CommCell.

  2. Right-click the <CommCell>, and click Properties.

  3. On the Properties dialog box, navigate to the Additional Settings tab and click Add.

  4. In the Name box, type sCustombackupPieceFormat.

  5. In the Category box, select or type CommServe

  6. In the Type box, select String.

  7. In the Value box, type the format and click OK.

  8. Click OK.

Preserving the User Permissions on UNIX Client

During backups on Unix client, by default the user permissions are reset to 777 in the orasbt.log file to support multiple ORACLE_HOME path. You can preserve the user permissions set during the install using the following steps:

  1. From the CommCell Browser, navigate to Client Computers.

  2. Right-click the <Client>, and then click Properties.

  3. Click Advanced.

  4. Click the Additional Settings tab.

  5. Click Add.

  6. In the Name box, type sSKIPRESETORASBTLOGPERMS.

  7. In the Category box, select or type OracleAgent.

  8. In the Type box, select String.

  9. In the Value box, type Y and click OK.

  10. Click OK.

Loading...