Previous Topic: Back Up Using RMAN Scripts in the Agent


RMAN Command Line Scripts

You can write and execute your own RMAN scripts. The following is an example of an RMAN script allocating a single channel to back up a particular data file on a single tape device:

run {
allocate channel dev1 type ‘sbt_tape’;
backup (datafile ‘/oracle/oradata/demo/users01.dbf’ format ‘_%u_%p_%c’);
release channel dev1;
}

Note: To use the Agent for Oracle as a back-end, you must use the following:

The following is an example of an RMAN script that uses multistreaming in a backup. It allocates two channels to back up the data to two different tape devices in parallel:

run {
allocate channel dev1 type ‘sbt_tape’;
allocate channel dev2 type ‘sbt_tape’;
backup filesperset 1 format ‘_%u_%p_%c’ (datafile ‘/oracle/oradata/demo/users01.dbf,  ‘/oracle/oradata/demo/tools01.dbf’);
release channel dev1;
release channel dev2;
}

For more information about using RMAN and RMAN scripts, see the Oracle documentation.