RMAN script examples

Sample RMAN scripts illustrate how to create parallel backup streams to IBM® Storage Protect server storage.

Example

In these examples, to back up to IBM Storage Protect by using Data Protection for Oracle, you must specify type 'sbt_tape' in the RMAN script or within the global RMAN configuration settings.

Example 1:

When the IBM Storage Protect server and Oracle system have multiple network cards, you can back up your data with multiple network paths to improve network throughput. Your environment is set up as follows:
  • The Oracle system has two network cards with two addresses, A and B.
  • The IBM Storage Protect server also has two network cards with two addresses, C and D.
  • Paths exist between A and C, B and D, but not between A and D or B and C.

Create two backup streams or Oracle channels, without using two separate options files to point to different two different addresses. Channel t1 goes to address C, channel t2 goes to address D. Be careful not to send parts of your backup to two different IBM Storage Protect servers because it cannot be restored.

You can maintain one Data Protection for Oracle options file and change the IBM Storage Protect™ server specification in an RMAN script in the following manner:
run
{
   allocate channel t1 type 'sbt_tape';
      SEND channel t1 '-TCPSERVER=<C>';
   allocate channel t2 type 'sbt_tape';
      SEND channel t2 '-TCPSERVER=<D>';

   backup
      filesperset 5
      format 'df_%t_%s_%p'
      (database);
   release channel t2;
   release channel t1;
}

Example 2:

This backup script allocates two parallel connections to the IBM Storage Protect server. The IBM Storage Protect server views these connections as two separate sessions:
run
{
   allocate channel t1 type 'sbt_tape' parms 
            'ENV=(TDPO_OPTFILE=/home/oracle/tdpo.opt)';
   allocate channel t2 type 'sbt_tape' parms 
            'ENV=(TDPO_OPTFILE=/home/oracle/tdpo.opt)';

   backup
      filesperset 5
      format 'df_%t_%s_%p'
      (database);

  }
Tip: On AIX® operating systems, do not use /home/oracle11gr2/scripts/tdpo.opt in your path. oracle11gr2 exceeds the eight character string limit for users on AIX.
run
{
   allocate channel t1 type 'sbt_tape' parms 
            'ENV=(TDPO_OPTFILE=C:\oracle\scripts\tdpo.opt)';
   allocate channel t2 type 'sbt_tape' parms 
            'ENV=(TDPO_OPTFILE=C:\oracle\scripts\tdpo.opt)';

   backup
      filesperset 5
      format 'df_%t_%s_%p'
      (database);

   }

Example 3:

This restore script allocates one parallel connection to the IBM Storage Protect server:
run
{
allocate channel t1 type 'sbt_tape' parms 
'ENV=(TDPO_OPTFILE=/home/oracle/tdpo.opt)';
restore database;
recover database;
alter database open;
}
run
{
allocate channel t1 type 'sbt_tape' parms 
'ENV=(TDPO_OPTFILE=C:\oracle\scripts\tdpo.opt)';
restore database;
recover database;
alter database open;
}
Note:
  1. The allocate channel entry is divided on two lines after the parms option to accommodate page formatting.
  2. The Oracle database must be in mount mode for the restore to succeed.