Solved

db_file_name_convert

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

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.

Join & Write a Comment

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
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…
Via a live example, show how to take different types of Oracle backups using RMAN.

758 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now