Databases Reference
In-Depth Information
Solution
You can use the format parameter to generate unique names for RMAN image copies. The default format %U is defined
differently for image copies of data files, control files, and archived redo logs, as shown in Table 5-2 .
Table 5-2. Default Formats for Various Types of Files
Type of File
Meaning of %U
data-D-%d_id-%I_TS-%N_FNO-%f_%u
Data file
arch-D_%d-id-%I_S-%e_T-%h_A-%a_%u
cf-D_%d-id-%I_%u
Archived log
Control file
You can specify up to four values for the format parameter, but the second through fourth values are used only
if you're making multiple copies. That is, the second, third, and fourth format values are used when you execute the
backup copies , set backup copies , or configure ... backup copies command.
For image copies, you can also use the db_file_name_convert option of the backup command to generate your
own file names for RMAN image copies. When you use this option, you must provide a pair of file name prefixes to
change the names of the output files. The first file name prefix refers to the file names of the files that are being copied
by RMAN. The second file name prefix refers to the file names for the backup copies. In the following example, we use
the db_file_name_convert option to specify that the backup copies of a file that starts with /u01/oradata/users are
prefixed with /backups/users_ts:
RMAN> backup as copy
db_file_name_convert=('/u01/app/oracle/oradata/orcl/users',
'/u01/app/oracle/backup/users_ts')
tablespace users;
The db_file_name_convert option to set the image copy file names is useful in situations where you may want to
direct the backups of tablespaces to different locations, as shown in the following example:
RMAN> backup as copy device type disk
db_file_name_convert = ('/u01/app/oracle/table',
'/u05/app/oracle/copy_table',
'/u01/app/oracle/index','/u05/app/oracle/copy_index')
tablespace data, index;
This example shows how you can easily direct the image copies of the data and index tablespaces to different
locations on disk.
How It Works
When you use the db_file_name_convert option within a backup command when creating image copies, RMAN will
first try to use the pair of names (for the original file and backup copy) you provide to convert file names. If it fails to do
this, RMAN will try to name the image copy according to any format parameter values you may have specified. If you
didn't use the format parameter within the backup command, RMAN will use the default format %U .
 
 
Search WWH ::




Custom Search