Solved

db_file_name_convert

Posted on 2013-06-22
3
505 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
pivot rows to columns 1 60
Database Design Dilemma 6 71
Oracle SQL Developer - SubString 2 52
oracle sql developer + get hour from datetime field 2 26
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

752 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