Skip Headers
Oracle® Database Backup and Recovery Reference
10g Release 2 (10.2)

Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Go to next page
PDF · Mobi · ePub




Description of filenameconversionspec.gif follows
Description of the illustration filenameconversionspec.gif


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.

Restrictions and Usage Notes

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' ...)


You 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:

Keywords and Parameters

Syntax Element Description
'string_pattern' Specifies the pattern, consisting of the pairs of strings used to convert the filenames..


Using DB_FILE_NAME_CONVERT with Multiple String Patterns: Example 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 previous discussion, directing users to /newdisk1 and tools to /newdisk2:

    TABLESPACE tools, users;

See Also:

"BACKUP", "CONVERT", and "DUPLICATE" for commands that use fileNameConversionSpec