Solved

db_file_name_convert

Posted on 2013-06-22
3
502 Views
Last Modified: 2013-06-27
Do I have to put the full path of the file location from both, target and aux, when duplicating a database? Or, can I just put what needs to be converted in the string?
example:

db_file_name_convert='/u01/oradata/PROD', '/u01/oradata/TEST',
                                     '/u02/oradata/PROD','/u02/oradata/TEST',
                                     .......,
                                     ........
or

db_file_name_convert='PROD','TEST'
0
Comment
Question by:rsolomon
3 Comments
 
LVL 15

Accepted Solution

by:
Franck Pachot earned 128 total points
ID: 39269623
Hi,
Yes db_file_name_convert='PROD','TEST' should work. But it will replace all occurence of PROD and maybe the datafile name can have PROD in its name.
Maybe db_file_name_convert='/oradata/PROD','/oradata/TEST'  is better to avoid that risk.
Regards,
Franck.
0
 
LVL 37

Assisted Solution

by:Geert Gruwez
Geert Gruwez earned 127 total points
ID: 39269915
you only need to put the replacement in once ... not for every filename

the algorithm behind this is simple:
for each pair (x, y) in db_file_name_convert
  filename := replace(filename, x, y)

replace is described here:
http://docs.oracle.com/cd/E11882_01/server.112/e17118/functions153.htm#i78608
0
 
LVL 2

Expert Comment

by:guruworld
ID: 39271550
Always find it good to use first option which has the paths (db_file_name_convert='/u01/oradata/PROD', '/u01/oradata/TEST',......).
 
That way, u are guaranteed not to have any errors during name conversion.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to trim oracle sql sentence in unix 17 58
Deleting Rows from an Oracle Database - Performance 19 53
Fill Date time Field 12 23
Help with Oracle IF statment 5 25
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question