RMAN parameters, in scripts (only Oracle 11g or later)

When we make a list of the backups made with:

RMAN> list backup summary;

For example, we may have problems locating a backupset. The result is quite confusing and certainly inelegant labels are created by default.

One way to improve this is by passing parameters to the script RMAN responsible for making copies.

Suppose a script is called to launch a task, from the Linux can call this script (bash in this case) which in turn calls another RMAN.

[oracle10@profexdb1 ~]$ cat prueba.sh
#! /bin/bash
export level=$1
export tag=$2_`date +%d%b%y`
rman @prueba.rman using $level $tag
[oracle10@profexdb1 ~]$ cat prueba.rman
connect target sys/oracle
backup incremental level &1 database tag &2;

Then the call:

./prueba.sh 0 COMPLETA

Run an incremental backup of level 0 with a personalized tag, allowing its location very easily.

Leave a Reply