In the example above, the script is named backup_datafiles, however, you may specify any other script name.

The complete rman script in the Data Protector GUI now should look like:

run {

CONFIGURE CONTROLFILE AUTOBACKUP ON;

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '%F'; allocate channel 'dev_0' type 'sbt_tape'

parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=oracle backup specification)';

allocate channel 'dev_1' type 'sbt_tape'

parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=oracle backup specification)';

allocate channel 'dev_2' type 'sbt_tape'

parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=oracle backup specification)';

allocate channel 'dev_3' type 'sbt_tape'

parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORACL,OB2BARLIST=oracle backup specification)';

EXECUTE SCRIPT 'backup_datafiles';

sql 'alter system archive log current'; backup

format 'oracle backup specification<ORACL_%s:%t:%p>.al' archivelog all;

backup

format 'oracle backup specification<ORACL_%s:%t:%p:1>.cntrl' current controlfile;

}

Now save the script and apply the changes to the backup specification.

Get required information about data files

It is necessary to find out the overall number of data files and also their unique file ID. To do this, you have to connect to the database you want to backup by sqlplus while the database is open and execute:

SQL> select file_id, tablespace_name, file_name from dba_data_files order by file_id;

FILE_ID

TABLESPACE_NAME

FILE_NAME

----------

------------------------------

--------------------------------------------------

1

SYSTEM

/opt/oracle/oradata/ORACL/system01.dbf

2

UNDOTBS1

/opt/oracle/oradata/ORACL/undotbs01.dbf

3

SYSAUX

/opt/oracle/oradata/ORACL/sysaux01.dbf

4

USERS

/opt/oracle/oradata/ORACL/users01.dbf

5

EXAMPLE

/opt/oracle/oradata/ORACL/example01.dbf

6

UNDOTBS2

/opt/oracle/oradata/ORACL/undotbs02.dbf

7

UNDOTBS3

/opt/oracle/oradata/ORACL/undotbs03.dbf

8

UNDOTBS4

/opt/oracle/oradata/ORACL/undotbs04.dbf

9

POOL

/opt/oracle/oradata/ORACL/tbs_pool01.dbf

10

POOL

/opt/oracle/oradata/ORACL/tbs_pool02.dbf

The example above shows the result of the statement if your database has 10 data files. Save the output to a temporary text file and exit sqlplus.

15