Oracle® Database Recovery Manager Reference 10g Release 1 (10.1) Part Number B10770-02 |
|
|
View PDF |
fileNameConversionSpec::=
Text description of fileNameConversionSpec
A subclause that specifies one or more patterns to be used in generating new database file names based on old ones. Used with BACKUP
, CONVERT
and DUPLICATE
as one way of generating output file names.
The rules for these patterns and how they affect file naming are the same as those for the initialization parameter DB_FILE_NAME_CONVERT
. In parentheses, provide an even number of string patterns.
When a new filename is generated based on an old one, the original filename is compared to the first member of each pair of string patterns. The first time a pattern is found which is a substring of the original filename, the new filename is generated by substituting the second member of the pair for the substring that matched.
Set the string_pattern
to a value such as:
DB_FILE_NAME_CONVERT = ('string1' , 'string2' , 'string3' , 'string4' ...)
Where:
string1
is a pattern matching the orignal filenamestring2
is the pattern replacing string1
in the generated filenamestring3
is a pattern matching the orignal filenamestring4
is the pattern replacing string3
in the generated filenameYou can use as many pairs of primary and standby replacement strings as required.
For example, when making image copy backups of tablespaces users
(with datafiles in directory /disk1/dbs/users
) and tools
(with datafiles in /disk1/dbs/tools/
), to direct the converted datafiles to /newdisk/users
and /newdisk/tools
respectively, use the DB_FILE_NAME_CONVERT
pattern shown here:
BACKUP AS COPY TABLESPACE users, tools DB_FILE_NAME_CONVERT = ('disk1/dbs','newdisk');
For each datafile to be converted where 'disk1/dbs
' is a substring of the filename, the new filename is created by replacing 'disk1/dbs
' with 'newdisk
'. For example, the converted datafile corresponding to /disk1/dbs/users/users01.dbf
is stored in /newdisk/users/users01.dbf
, the converted datafile corresponding to /disk1/dbs/tools/tools01.dbf
is stored in /newdisk/tools/tools.dbf
, and so on.
Be aware of the following details:
BACKUP AS COPY TABLESPACE users DB_FILE_NAME_CONVERT = ('dbs','newdbs');
would direct the image copies to /disk1/newdbs/users
and /disk1/newdbs/tools
.
BACKUP AS COPY TABLESPACE users DB_FILE_NAME_CONVERT = ('dbs','newdbs','/disk1','/newdisk');
would have the same effect as the previous example, because the pattern 'dbs
' matches the filename and there is no reason to compare it to the second pattern '/disk1
'.
Syntax Element | Description |
---|---|
|
Specifies the pattern, consisting of the pairs of strings used to convert the filenames.. |
This example shows the use of DB_FILE_NAME_CONVERT
with BACKUP AS COPY
to create image copies of the users
and tools
tablespaces from the above discussion, directing users
to /newdisk1
and tools
to /newdisk2
:
BACKUP AS COPY DEVICE TYPE DISK TABLESPACE tools, users DB_FILE_NAME_CONVERT=('/disk1/dbs/users','/newdisk1', '/disk1/dbs/tools','/newdisk2');
See Also:
"BACKUP", "CONVERT", and "DUPLICATE" for commands that use fileNameConversionSpec |