Solved

db_file_name_convert

Posted on 2013-06-22
3
501 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

773 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