Create the Contents of the external script file
All data files should be distributed evenly
Create a new text file on the target database server in a location which is readable by the oracle user (The example assumes that the text file is created as ‘/home/oracle/rman_script’). In the text file enter now a backup statement with a separate paragraph per channel enclosed by opening and closing brackets ‘{‘ and ‘}’.
{
backup incremental level 0
(datafile 9,3,1 channel dev_0 filesperset 3 format 'oracle backup specification<ORACL_%s:%t:%p:1>.df')
(datafile 2,4,10 channel dev_1 filesperset 3 format 'oracle backup specification<ORACL_%s:%t:%p:10>.df')
(datafile 5,6 channel dev_2 filesperset 2 format 'oracle backup specification<ORACL_%s:%t:%p:6>.df')
(datafile 8,7 channel dev_3 filesperset 2 format 'oracle backup specification<ORACL_%s:%t:%p:7>.df');
}
In the given example, the data files 1, 3, and 9 are assigned to channel dev_0, the data files 2, 4 and 10 are assigned to channel dev_1, the data files 5 and 6 are assigned to channel dev_2 and the data files 7 and 8 are assigned to channel dev_3. The sequence of the data file IDs does not need to be ordered, e.g. for channel dev_0 the data file sequence 9,3,1 is used.
You also have to specify the number of data files per channel by specifying the parameter filesperset followed by the number, e.g. for channel dev_1 where 3 data files are backed up the parameter filesperset needs to be set to 3, whereas for channel dev_2 the parameter needs to be set to 2 as in the given example only 2 data files are configured for this channel.
For the format string, you may use the original format string you have copied from the Data Protector GUI with some modifications.
Changes:
•For each format string change the ending from .dbf to .df
•For each format string add “:X” to the % parameters where X is the last data file ID in the datafile statement. For dev_0 channel, this would be 1; for dev_1 channel, this would be 10; for dev_2 channel, this would be 6; and for dev_3 channel, this would be 7.
{
backup incremental level 0
(datafile 9,3,1 channel dev_0 filesperset 3 format 'oracle backup specification<ORACL_%s:%t:%p:1>.df')
(datafile 2,4,10 channel dev_1 filesperset 3 format 'oracle backup specification<ORACL_%s:%t:%p:10>.df')
(datafile 5,6 channel dev_2 filesperset 2 format 'oracle backup specification<ORACL_%s:%t:%p:6>.df')
(datafile 8,7 channel dev_3 filesperset 2 format 'oracle backup specification<ORACL_%s:%t:%p:7>.df');
}
16