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

When we make a list of the backups made with:

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

Source   
[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
run{
backup incremental level &1 database tag &2;
}
exit;

Then the call:

Source   
./prueba.sh 0 COMPLETA

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

Leave a Reply