Configuration Using Application Command Line Interface (RMAN Scripts)

Table of Contents

Log On to the CommServe

To run command line operations, you must first login to the CommServe.

From Command prompt, navigate to the <Software_Installation_Directory>/Base and run the following command:

qlogin -cs <commserve name> -u <user name>

For example, to log on to the CommServe 'server1' with username 'user1', type the following command:

qlogin -cs server1 -u user1

Configuring an Instance Using XML

Available Parameters for Instance Configuration

The following table displays all the parameters you can use with the commands mentioned in the above sections. To add a parameter to your command, use the following syntax: (A example is provided at the end of the table.)

qoperation execute -af <template XML file> -<parameter name> <value>

Parameter Description of Parameter Values
description A general description of the instance
clientName Name of the client computer, as displayed in the CommCell Browser
appName Name of the application. In this case it would be 'oracle'
instanceName Name of the Oracle instance
TNSAdminPath Path to the TNS Admin directory
blockSize Block size value for backup and restore operations on the selected instance.  The value of BLKSIZE must be a multiple of the minimum physical block size of the Oracle database.
oracleHome Path for the Oracle application software
oracleUser/domainName (Windows only) Name of the domain server
oracleUser/password (Windows only) Name of the user that has administrator rights to administer the Oracle application. This is the account used by the user to log in to and use the application to run jobs.
oracleUser/userName (Unix only) Name of the user that has administrator rights to administer the Oracle application. This is the account used by the user to log in to and use the application to run jobs.
sqlConnect/userName Name of the user with privileges to access the Oracle database
sqlConnect/domainName Name of the Oracle instance
sqlconnect/password Password for the sqlConnect user
catalogConnect/domainName Name of the Oracle recovery catalog database
catalogConnect/userName Name of the user with privileges to access the Oracle recovery catalog database
catalogConnect/password Password for the catalog connect user.
crossCheckTimeout Threshold value for RMAN cross check.
ctrlFileAutoBackup Option to enable control file auto backup.

Valid values are 0, 1 and 2.

storagePolicyName Name of the data storage policy
disableRMANcrosscheck Option to enable/disable RMAN crosscheck.

Valid values are true/false.

encryptionFlag Option to enable encryption.

Valid values are:

  • ENC_MEDIA_ONLY, to enable Media Only (MediaAgent Side) encryption.
  • ENC_NETWORK_MEDIA, to enable Network and Media (Agent Side) encryption.
  • ENC_NETWORK_ONLY, to enable Network Only (Agent Encrypts, MediaAgent Decrypts) encryption.
  • ENC_NONE, no encryption.
isOnDemand Option to enable/disable on demand backup.

Valid values are true/false.

numberOfArchiveLogBackupStreams Number of archive log backup streams to be used
commandLineStoragePolicy/storagePolicyName Name of the command line storage policy for the Oracle command line backup.
deDuplicationOptions/generateSignature A component of deduplication performed on the client or MediaAgent computer. Valid values are:
  • ON_CLIENT, to enable signature generation on the client.
  • ON_MEDIA_AGENT, to enable signature generation on the MediaAgent.
  • OFF, to disable the signature generation.
logBackupStoragePolicy/storagePolicyName Name of the log storage policy for the Oracle log backup.
networkAgents Number of Network Agents.
softwareCompression Option to enable compression on the Client or MediaAgent computer. Valid values are:
  • ON_CLIENT, to enable software compression on the client.
  • ON_MEDIAAGENT, to enable software compression on the MediaAgent.
  • USE_STORAGE_POLICY_SETTINGS, to use the software compression options defined on the storage policy.
  • OFF, to disable software compression.
throttleNetworkBandwidth Enhancing backup performance by reducing network bandwidth overhead.

Valid values are 2-2147483647.

overrideDataPathsForCmdPolicy Option to override the library specified in the command line storage policy

Valid values are true/false.

overrideDataPathsForLogPolicy Option to override the library specified in the log storage policy

Valid values are true/false.

useCatalogConnect Option to establish connection between the target database and the Recovery Catalog database using the specified connect string, and the Recovery Catalog database will be used for backups.

Valid values are true/false.

consumeLicense Option that indicates if the instance uses a license.

Valid values are true/false.

defaultDatabaseStoragePolicy/storagePolicyName Name of the storage policy for default subclient
DBID The Oracle Database Identifier.

Adding an Instance

  1. Download the CreateInstance_Template.xml file and save it on the computer from where the command will be executed.
  2. Execute the following command from the <Software_Installation_Directory>/Base folder after substituting the parameter values.

    qoperation execute -af CreateInstance_Template.xml -appName oracle -clientName xxxxx -instanceName xxxxx -dataArchiveGroup/storagePolicyName xxxx -commandLineStoragePolicy/storagePolicyName xxxx -logBackupStoragePolicy/StoragePolicyName xxxx -oracleHome xxxx -oracleUser/domainName xxxx -oracleUser/password xxxx -oracleUser/userName xxxx -sqlConnect/userName 'xxxx' -sqlConnect/domainName xxxx -sqlconnect/password xxxx -catalogConnect/domainName xxxx -catalogConnect/userName xxxx -catalogConnect/password xxxx

Configuring a Subclient Using XML

Available Parameters for Subclient Configuration

The following table displays all the parameters you can use with the commands mentioned in the above sections. To add a parameter to your command, use the following syntax:

qoperation execute -af <template XML file> -<parameter name> <value>

Parameter Description of Parameter Values
appName Specifies the name of the application. In this case it would be 'Oracle'.
clientName Specifies the name of the client as displayed in the CommCell Browser (e.g., client1).
instanceName Specifies the name of the Oracle instance (e.g., dbname).
subclientName Specifies the name of the Subclient (e.g. subclient1).
encryptionFlag Specifies whether to enable encryption.

alid values are:

  • ENC_MEDIA_ONLY, to enable Media Only (MediaAgent Side) encryption.
  • ENC_NETWORK_MEDIA, to enable Network and Media (Agent Side) encryption.
  • ENC_NETWORK_ONLY, to enable Network Only (Agent Encrypts, MediaAgent Decrypts) encryption.
  • ENC_NONE, no encryption.
description A general description of the subclient.
enableBackup Option to allow backup.  Set this to 'true'.
networkAgents Number of Network Agents (e.g., 2).  Valid vales are 1-4.
softwareCompression Specifies whether to enable compression on the Client or MediaAgent computer.

Valid values are:

  • ON_CLIENT, to enable software compression on the client
  • ON_MEDIAAGENT, to enable software compression on the MediaAgent
  • USE_STORAGE_POLICY_SETTINGS, to use the software compression options defined on the storage policy
  • OFF, to disable software compression
throttleNetworkBandwidth Enhancing backup performance by reducing network bandwidth overhead.

Valid values are 2-2147483647.

applicableReadSize Specifies the amount of application data backup jobs will read for each unit transferred to the MediaAgent.
dataBackupStoragePolicy/storagePolicyName Specifies the data backup storage policy for the Oracle data backup.
enableDeduplication Specifies whether to  enable or disable deduplication.

Valid values are true/false.

generateSignature A component of deduplication performed on the client or MediaAgent computer. Valid values are:
  • ON_CLIENT, to enable signature generation on the client.
  • ON_MEDIA_AGENT, to enable signature generation on the MediaAgent.
  • OFF, to disable the signature generation.
preBackupCommand Specifies the script to run before a backup starts.
postBackupCommand Specifies the script to run after the backup completes.
runPostBackup Specifies whether this process will execute for all attempts to run the phase.

Valid values are YES/NO.

selectiveOnlineFull Specifies whether selective online full backups will be performed for this Subclient.

Valid values are true/false.

data Specifies which tablespaces and datafiles will be backed up.

Valid values are true/false.

backupMode Specifies manner in which data file backups for this Subclient will be conducted.

Valid values are:

  • ONLINE_DB, to perform an online backup of the database,
  • ONLINE_SUBSET_DB, to perform an online subset backup that includes tablespaces and datafiles,
  • OFFLINE_DB, to perform an offline (cold) backup of the database
backupControlFile Specifies whether the backup control file is backed up.

Valid values are true/false.

backupSPFile Specifies whether the Server Parameter File is backed up.

Valid values are true/false.

protectBackupRecoveryArea Specifies whether to back up the Flash Recovery Area for Oracle 10g or higher versions.

This is not supported when the "validate" parameter is 'true'.

Valid values are true/false.

tableSpace Specifies which tablespaces will be backed up.
dataFile Specifies which datafiles will be backed up.
dataFilesPerBFS Specifies the number of data files to be bundled in each RMAN backup set.

Valid Values are 1-1000.

maxBackupSetSIzeInKB Specifies the maximum size in KB for an RMAN backup set.

Valid values are 1-1072693248.

archiveFilesPerBFS Specifies the number of archive files to be bundled in each RMAN backup set.

This can be set when the "protectBackupRecoveryArea" parameter is 'true'.

Valid values are 1-1072693248.

maxOpenFiles Specifies the maximum number of concurrent open datafiles that the RMAN can read from simultaneously during a backup operation.

Valid values are 0-1000.

oracleTag Specifies the character string that is used as the Oracle Tag argument associated with Subclient backups.
lightsOutScript Specifies whether the Lights Out Script will be automatically executed before backing up databases.

This can only be set when the backupMode is 'OFFLINE_DB'.

Valid values are true/false.

warning Specifies whether to issue a message to the physical node for users logged into the database warning them that the database will be shut down.

This can only be set when the "lightsOutScript" is 'true'.

Valid values are true/false.

delayTimeinMin Specifies the number of minutes that you want the system to wait after the warning message is sent to the physical node before attempting to shut down the database.

This can only be set when the "lightsOutScript" parameter is 'true'.

Valid values are 0-100.

sleepTimeinMin Specifies interval in minutes that you want the system to wait, or sleep, between retry attempts to shut down the database and check the status. Note that this option is only activated when the number of tries limit has been reached for the Sleep Time (sec) option.

This can only be set when the "lightsOutScript" parameter is 'true'.

Valid values are 0-59.

sleepTimeinSec Specifies the interval in seconds that you want the system to wait, or sleep, between retry attempts.

This can only be set when the "lightsOutScript" parameter is 'true'.

Valid values are 0-59.

triesNumber Specifies the number of times that the system will retry attempts to shut down the database when the Sleep Time (sec) option is activated.

This can only be set when the "lightsOutScript" parameter is 'true'.

Valid values are 0-59.

useSqlConnect Specifies if the CommServe connects to the Oracle database using the SQL command "Connect <Connect String> as sysdba".

This can only be set when the "lightsOutScript" parameter is 'true'.

Valid values are true/false

startupPFile Specifies the location of the PFile to be used with the Lights Out Script option. Select this option when you want the database to start using the PFile.

This can only be set when the "lightsOutScript" parameter is 'true'.

Valid value is the full path to the PFile.

skipReadOnly Specifies whether to omit read-only tablespaces from the backup.

Valid values are true/false.

skipOffline Specifies whether to omit offline tablespaces from the backup.

Valid values are true/false.

skipInaccessible Specifies whether to omit inaccessible tablespaces from the backup.

Valid values are true/false.

validate Specifies whether to run a validate backup job.

Valid values are true/false.

enableTableBrowse Specifies that the Oracle iDataAgent gathers the database tables and user information during the backup so that the backup data can be displayed in a table view during a browse operation.

This is not supported when the "validate" parameter is 'true'.  This can be set when the "backupMode" parameter is 'ONLINE_DB' or 'ONLINE_SUBSET_DB'.

Valid values are true/false.

mergeImageCopies Specifies that you can create an image copy of a database, then regularly create incremental backups of the database and apply them to this image copy.

Valid values are true/false.

resyncCatalog Specifies whether the contents of the Recovery Catalog will be synchronized with the contents of the control file.

Valid values are true/false.

backupArchiveLog Specifies whether to back up or delete archived redo log files.

This can be set when the "backupMode" parameter is 'ONLINE_DB' or 'ONLINE_SUBSET_DB'.

Valid values are true/false.

archiveDelete Specifies whether archived redo log files will be deleted once they are backed up.

This can be set when the "backupMode" parameter is 'ONLINE_DB' or 'ONLINE_SUBSET_DB' and the "backupArchiveLog" parameter is 'true'.

Valid values are true/false.

selectArchiveLogDestForBackup Specifies whether you want to add a location from where the archive logs will be backed up.

Valid values are true/false.

archiveLogDestForBackupOpType Specifies whether you are adding or deleting a backup location.

This can only be set when the "selectArchiveLogDestForBackup" parameter is 'true'.

Valid values are:

  • ADD, add a location
  • DELETE, delete the location
archiveLogDestForBackup Specifies the location from where the archive logs will be backed up.

This can only be set when  the "selectArchiveLogDestForBackup" parameter is 'true' and the "archiveLogForDestOpType" is set.

A valid value for this is a directory name (e.g. 'e:/u2/logs').

selectArchiveLogDestForDelete Specifies whether you want to add a location from where the archive logs will be deleted.

Valid values are true/false.

archiveLogDestForDeleteOpType Specifies whether you are adding or deleting a location.

his can only be set when the "selectArchiveLogDestForDelete" parameter is 'true'.

Valid values are:

  • ADD, add a location
  • DELETE, delete the location
archiveLogDestForDelete Specifies the location from where the archive logs will be deleted.

This can only be set when  the "selectArchiveLogDestForDelete" parameter is 'true' and the "archiveLogForDeleteOpType" is 'true'.

A valid value for this is a directory name (e.g. 'e:/u2/logs').

dataThresholdStreams Specifies the data streams used on backups.

This can only be used when the "dataBackupStoragePolicy/storagePolicyName" parameter is set.

Creating a Subclient

  1. Download the CreateSubclient.xml file and save it on the computer from where the command will be executed.
  2. Execute the following command from the <Software_Installation_Directory>/Base folder after substituting the parameters values.

    qoperation execute -af C:\XML\create_subclient_template.xml -appName 'Oracle' -clientName 'client1' -instanceName 'dbname' -subclientName 'subclient1'

Relinking SBT Library

Use the following steps to synchronize the Oracle iDataAgent SBT library with the Oracle library:

  1. Navigate to the software install folder/iDataAgent directory and run the Ora_install.sh file as root user.

    [root@dbserve22 iDataAgent]# ./Ora_install.sh

  2. Type the Oracle user ID and press Enter.

    Please enter ORACLE_USER ID: oracle

  3. Type the user group and press Enter.

    Please enter user group for oracle [dba]: oinstall

  4. Type the Oracle home directory and press Enter.

    Please enter ORACLE_HOME directory: /home/oracle/app/oracle/product/11.2.0/dbhome_1

  5. Type the home directory of Oracle user and press Enter.

    Please enter the home directory of user oracle [~oracle]: /home/oracle

  6. Type n and press Enter.

    Would you like to relink Simpana with different ORACLE_HOME now(y/[n])?n

  7. Verify the SBT library under specified Oracle_HOME/lib directory.

    ls -l /home/oracle/app/oracle/product/11.2.0/dbhome_1/lib/libobk.so
    lrwxrwxrwx 1 root root 27 May 29 13:02 libobk.so -> /opt/simpana/Base/libobk.so

Enabling Backups from Oracle Enterprise Manager

If you are using the Oracle Enterprise Manager to schedule the backups and restore operations, set the iDataAgent's SBT library in the Oracle Enterprise Manager (OEM) using the following steps:

Oracle recommends doing periodic full, regular incremental and logs backup operations.  The command line backup and restore operations can be scheduled using third-party tools like Control-M or cron.

  1. Login to Oracle Enterprise Manager.
  2. Click the Availability tab.
  3. Under Media Management Setting group, type the following command in the Media Management Vendor Library Parameters box.

    SBT_LIBRARY=<software_install_path>/Base/libobk.so,BLKSIZE=262144

    The SBT_LIBRARY path for the various platforms are listed below:

    • AIX with 64 bit Oracle - <Client Agent Install Path>/Base64/libobk.a(shr.o)
    • Solaris with 64 bit Oracle -<Client Agent Install Path>/Base64/libobk.so
    • Linux on System Z with 64 bit Oracle - <Client Agent Install Path>/Base64/libobk.so
    • All Other Unix platforms -<Client Agent Install Path>/Base/libobk.so

    BLKSIZE: The RMAN block size configured for the Oracle backup.

  4. Click OK.

Viewing Job Details

Use the qlist job qcommand to view job details.

Description

This command displays the job details of a given job ID, or of all the active jobs under a client, agent, instance backup set or subclient. The command displays job details such as job ID, type, phase, status, failure reason, and user-defined description.

When a job ID is specified, the job details are displayed regardless of the job status. When no option is specified in the command, it displays all active jobs in the CommServe. Only active jobs are displayed when you query jobs based on client, agent, instance, backup set, or subclient.

Additionally, you can filter the jobs based on the job type or status. Only those jobs with the specified type/status are displayed in the command prompt. When more than one job is found, the jobs are listed one job per line, and are displayed in the command prompt. The system displays a message "No jobs to display" when there are no jobs.

In case of an error, an error code and the error description are displayed in the following format: "job: Error errorcode: errordescription"

Usage

qlist job [-cs <commserve_host_name>] [-co <i|o|s|p|r|d|c>] [-j <jobid>] [-jt <jobtype>] [-js <Running|Suspended|Waiting|Pending>] [-c <client>] [-a <iDataAgent Type>] [-i <instance>] [-b <backupset>] [-s <subclient>] [-waitForJobComplete] [-waitTimeoutSecs <waitTimeoutSecs>] [-tf <tokenfile>] [-tk <token>] [-h] [-af <argsfile>]

Use the [-jt <jobtype>] option to specify the job operation that you want to display. This will prevent displaying other job operations, such as administration jobs.

Column Codes

The column codes represent the job details that you want to display for a job. These columns can be specified using the -co option to filter the columns displayed by the qlist job command. The following are the available column codes:

i Job ID
o Job Type
s Job Status
p Job Phase
r Failure/Pending Reason
d Job Description
c Job Progress (percentage of completion)

By default, all column codes are enabled, except the r column.

Options

-cs CommServe host name
-co Columns to display. See the Column Codes table above.
-j Job ID
-jt Filters the jobs by type. Valid values are:
  • Backup
  • Restore
  • Admin
-js Filters the jobs by status. Valid values are:
  • Running
  • Suspended
  • Waiting
  • Pending
-c Client computer name
-a iDataAgent type installed on client computer (see Argument Values - Agent Types).
-i Instance name
-b Backup set name
-s Subclient name
-waitForJobComplete Waits indefinitely until the job completes. If the operation returns error code 0x205, retry the operation.

This option must be used with the -j option. To define a specific wait period, use this option with the -waitTimeoutSecs option.

-waitTimeoutSecs Use with the –waitForJobComplete option. Waits the specified seconds for the job to complete. If the job does not complete within the specified seconds, the current status of the job is returned.
-tf Reads token from a file
-tk Token string
-h Displays help
-af Reads arguments from a file

When you run the qlist job command with no options specified (to display all the active jobs), any description that the user specified for the job is partially displayed. Similarly, a partial description is displayed if you run the command for a specific job along with the -co option (including the d value), for example qlist job -j jobid -co iod.

To display the entire user-defined description for a specific job, you must run the following command: qlist job -j jobid -co d.

Diagnostics

Possible exit status values are:

0 - Successful completion.

1 - CLI usage failures, due to the use of an unsupported option or missing argument.

2 - Any other failure.

Example

qlist job -c dbserve41 -a Q_ORACLE

Viewing Job Summary Report

Use the qoperation report qcommand to view the job summary report.

Description

This command generates a job summary report. Reports can be saved as a file in HTML/text formats.

The qoperation report command also allows you to filter the report output by job type, backup type, job status, client, agent, start times, and end times. When no filters are specified, the report is generated for all job types (backup, restore, and administration) for the last 24 hours.

This command provides several options worth noting:

  • You can run a backup report for a specific job by using the [-j jobid] option. Whenever you issue the command with this option, a job report will be generated only for the specified job.
  • You can run a report that includes jobs that were not run by setting the -js (job status) parameter to norun.

Upon successful completion, the command displays the message "Report generated successfully" on the command prompt. In case of an error, an error code and description are displayed as: Error errorcode: errordescription

Usage

qoperation report -rt <reporttype> [-jt <jobtype>] [-t <backuptype>] [-c <client>] [-cg <clientgroup>][-a <iDataAgent>] [-js <job status>] [-st <Start time>] [-et <endtime>] [-lh <lasthours>] [-dpath <destinationpath>] [-opfrmt <reportformat>] [-j <jobid>] [-af <argsfile>] [-tf <tokenfile>] [-tk <token>] [-h]

Options

-rt [string] Type of Report to be generated (jobsummary)
-jt [string] Type of job. Valid values are:
  • backup
  • restore
  • admin
-t [string] Type of backup. Valid values are:
  • Q_FULL
  • Q_INC
  • Q_DIFF
  • Q_SYNTH
-c [list] Client computer name(s)
-cg [list] Client computer group name(s)
-a [list] Agent type installed on client computer (see Argument Values - Agent Types)
-js [string] Job status. Valid job states are:
  • completed
  • failed
  • killed
  • partsuc
  • unning
  • delayed
  • nobackup
  • norun
-st [time] Start time. The time must be entered in the following format: mm/dd/yyyy hh:mm[:ss] or yyyy/mm/dd hh:mm[:ss].
-et [time] End time. The time must be entered in the following format: mm/dd/yyyy hh:mm[:ss] or yyyy/mm/dd hh:mm[:ss].
-lh [int] Last hours
-dpath [string] Destination path where the report needs to be saved (supports both local paths, and UNC paths)
-opfrmt [string] Format of report to be saved. Valid formats are .html and .text files.
-af [string] Reads arguments from a file
-j [int] Job ID
-tf Reads token from a file
-tk Token string
-h [nil] Displays help

Argument File

client [list] Client computer name(s)
clientgroup [list] Client computer group name(s)
jobtype [string] Type of job. Valid values are:
  • backup
  • restore
  • admin
backuptype [string] Type of backup. Valid values are:
  • Q_FULL
  • Q_INC
  • Q_DIFF
  • Q_SYNTH
dataagent [list] Agent type installed on client computer (see Argument Values - Agent Types)
diagtype [list] Type of diagnostic for the job. Valid values are:
  • freason
  • jobattempts
  • assoevents
contenttype [string] Content type. Valid values are:
  • scf
  • protobj
  • failobj
  • cifail
storagetype [string] Type of storage. Valid values are:
  • media
  • drive
  • sp
  • ma
jobinfo [string] Job information (jobopts|user)
jobstatus [string]

Valid job states are:

  • completed
  • failed
  • killed
  • partsuc
  • unning
  • delayed
  • nobackup
  • norun
starttime [list] Start time. The time must be entered in the following format: mm/dd/yyyy hh:mm[:ss] or yyyy/mm/dd hh:mm[:ss].
endtime [string] End time. The time must be entered in the following format: mm/dd/yyyy hh:mm[:ss] or yyyy/mm/dd hh:mm[:ss].
lasthours [int] Last hours
destinationpath [string] Destination path where the report needs to be saved (supports only local paths, not UNC paths)
outputformat [string] Format of report to be saved. Valid formats are .html and .text files.
jobid [number] Backup job ID
description [list<string> | multiline] User-defined comments regarding the job

Note the following when using [description] parameter.

  • [description] provided with no value shows description of all the jobs based on other conditions.
  • [description] provided with filtered value shows description for filtered job reports.
  • If parameter is absent, description is not displayed.

Diagnostics

Possible exit status values are:

0 - Successful completion.

1 - CLI usage failures, due to the use of an unsupported option or missing argument.

2 - Any other failure.

Example

Generate a job summary report and save it to e:\targetdir.

qoperation report -rt jobsummary -dpath e:\targetdir -jt backup -j 10
Report generated successfully

Viewing RMAN Backup Pieces

The getbackuplist utility lists the RMAN backup pieces for a backup job. Execute the following commands to query the backup job history and find the list of all the RMAN backup pieces from any client where the iDataAgent is installed:

  1. Execute the following command to query the backup job history and identify the job id :

    ./qlist jobhistory -c <client name> -a <iDataAgent> -i <Simpana_instance> -s <subclient>

  2. Execute the following command to view the list of all the RMAN backup pieces from the backup job ID:

    ./getbackupList -jobid <job ID> -outfile <ex: /tmp/xxxx.out> -dbjob <db job>

Example:

[root@dbserve Base]# ./qlist jobhistory -c dbserve -a Q_ORACLE -i RDMDB -s default
JOBID    STATUS       STORAGE POLICY    SUBCLIENT    INSTANCE
-----    ------       --------------    ---------    --------
6394     Completed    sh                default      RDMDB
5686     Completed    sh                default      RDMDB

[root@dbserve Base]# ./getbackupList -jobid 6394 -outfile /tmp/oracle.out -dbjob
getBackupList succeeded
[root@dbserve Base]# cat /tmp/oracle.out

DATA ----------------------------------- Archive Files List For Db Job ----------------------------------------------------------                                          --
archFileName                  |    fileType  |    createTime     |    archFileId|    archGroupId |    jobId
DATA ----------------------------------- Archive Files List For Db Job ----------------------------------------------------------                                          --
42o3p5nh_1_1                  |    1         |    1362509187     |    23055     |    35          |    6394
43o3p5nh_1_1                  |    1         |    1362509207     |    23056     |    35          |    6394
44o3p5qi_1_1                  |    1         |    1362509279     |    23057     |    35          |    6394
c-1814427393-20130305-00      |    1         |    1362509290     |    23058     |    35          |    6394

LOGS ----------------------------------- Archive Files List For Db Job ----------------------------------------------------------                                          --
archFileName                  |    fileType  |    createTime     |    archFileId|    archGroupId |    jobId
LOGS ----------------------------------- Archive Files List For Db Job ----------------------------------------------------------                                          --
46o3p5su_1_1                  |    4         |    1362509359     |    23059     |    35          |    6394
47o3p5su_1_1                  |    4         |    1362509380     |    23060     |    35          |    6394
48o3p5uc_1_1                  |    4         |    1362509399     |    23061     |    35          |    6394
c-1814427393-20130305-01      |    4         |    1362509408     |    23062     |    35          |    6394
 

 

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 the 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.

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

Use the following steps to specify the media parameters from the RMAN command line:

  1. Create a parameters file with necessary media parameters. Select the mandatory and optional media parameters as per your requirement from the Media Parameters table to create a parameters file. You can also include SBT Parameters in the parameters file.

    Parameters file format:

    [<Parameter Name-1>]

    <Value-1>

    [<Parameter Name-2>]

    <Value-2>

    Example:

    d:\parameters.txt
    [sp]
    SP_Ora
    [mediaagent]
    firewall-con_cn
    [library]
    CommVault VirtualLib 276
    [drivepool]
    DrivePool(firewall-con_cn)254

  2. Create RMAN script file with a path to the media parameters file. You can provide parameters file path in the RMAN script file using CvOraSbtParams environment variable.

    Example of a backup.txt file:

    run {
    allocate channel ch1 type ‘sbt_tape’ PARMS=”BLKSIZE=262144,
    ENV=(CvOraSbtParams=D:\parameters.txt)”;
    backup database;
    release channel ch1; }

  3. Connect to the target database.

    Example:

    rman target sys/sys@dbtnsname

  4. Execute the RMAN script.
  5. @backup.txt

Media Parameters Table

Parameter Usage Description
[sp]

[sp]

<StoragePolicyName>

Example:

[sp]
SP1

Name of the Storage Policy to be used for the RMAN backup/restore job.
[mediaagent] [mediaagent]

<mediaagentname>

Example:

[mediaagent]
MA1

This is an optional parameter.

Name of the MediaAgent to be used for the backup/restore job.

[library] [library]

<libraryname>

Example:

[library]
LN1

This is an optional parameter.

Name of the library to be used for the backup/restore job.

[drivepool] [drivepool]

<drivepool_name>

 

Example:

[drivepool]
DP1

This is an optional parameter.

Name of the drive pool in the library to be used for the backup/restore job.

SBT Parameters Table

Parameter Usage Description
[CvClientName] [CvClientName]

<Client_Name>

Example:

[CvClientName]
Winoratest_cn

Name of the client defined in the CommCell Console.

This parameter is optional. It is primarily used in a clustered environment.

[CvInstanceName] [CvInstanceName]

<Instance_Name>

Example:

[CvInstanceName]
Instance001

Name of the Simpana instance installed

This parameter is optional.

In cases of multiple instances of the software, the first installed instance would be 'Instance001')

[CV_restCopyPrec] [CV_restCopyPrec]

<Copy Precedence>

Example:

[CV_restCopyPrec]
2

Copy precedence for the restore job.
[CvOraSID] [CvOraSID]

<oracle_sid>

Example:

[CvOraSID]
DB1

Name of the Oracle System ID (SID). This parameter is required only when the Oracle instance is discovered/created from the command line and if GUI backup is not at all performed in case of the Oracle instance and database name are different.
CvSrcClientName [CvSrcClientName]

<CvSrcClient_Name>

Example:

[CvSrcClientName]
Test_Src_Client

Name of the Source client defined in CommCell for which restore should look for backup pieces. It will be needed for cross-machine/duplicate restores to get correct backup piece of the required oracle instance when there are conflicting backup pieces between two oracle instances on different clients.
  1. Syntax for allocate channel command to use specific  Simpana  instance when the client has multiple Simpana  instances.
  2. allocate channel ch1 type 'sbt_tape'
    PARMS="SBT_LIBRARY=<software_install_path>/Base/libobk.so,BLKSIZE=262144,
    ENV=(CvInstanceName=Instance002)”;

  3. Multiple ENV variables can be provided as comma separated as follows.

    allocate channel ch1 type 'sbt_tape' PARMS="SBT_LIBRARY=<software_install_path>/Base/libobk.so,BLKSIZE=262144,
    ENV=(CvClientName=client_name,CvInstanceName=instance_name)”;

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, Simpana 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.