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

db_file_name_convert='/u01/oradata/PROD', '/u01/oradata/TEST',

Question by:rsolomon
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
LVL 15

Accepted Solution

Franck Pachot earned 128 total points
ID: 39269623
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.
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:

Expert Comment

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.

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