Specifying the Media Parameters for Oracle RMAN Command Line Operations

RMAN command line backups use storage policy and data path specified in the CommCell Oracle database instance by default.

You can override the default parameters by specifying media and SBT parameters in the RMAN script and then running the script from the RMAN command line. This feature is supported for backup, restore, and duplicate database operations.

You must associate the Data Path (MediaAgent, Library, Drive Pool) with the specified storage policy in the parameters file.

Procedure

  1. Create a media parameters file with the required media parameters.

    You can also include the SBT Parameters in the parameters file. For information on the supported media and SBT parameters, see Media Parameters and SBT Parameters.

    The parameter file format is

    [<Parameter Name-1>]
    <Value-1> <
    [<Parameter Name-2>]
    <Value-2>

    Example

    [sp]
    SP_Ora
    [mediaagent]
    firewall-con_cn
    [library]
    CommVault VirtualLib 276
    [drivepool]
    DrivePool(firewall-con_cn)254

  2. Create an RMAN script and use the CvOraSbtParams environment variable to specify a path to the media parameters file.

    Example

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

  3. On the RMAN command line, connect to the target database.

    Example

    rman target sys/sys@dbtnsname

  4. On the RMAN command line, run the RMAN script.

    Example

    Run the RMAN script named backup.txt.

    @backup.txt