Skip to Main Content
  • Questions
  • Full Export to testing with different S.O schema

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, gonzalo.

Asked: November 21, 2016 - 9:31 pm UTC

Last updated: November 23, 2016 - 5:18 am UTC

Version: 11g R2

Viewed 1000+ times

You Asked

Hi,

I want to know if it is possible to import on a testing server, with different file locations.
I.e. for example.

-- A prod server with:
/o1/oradata : datafiles
/ssd1/oradata : datafiles

-- A testing server with:
/o1/oradata : datafiles

I have a full export, and a full rman backup.

I know exporting is a point in time, so testing will be as the time the export was made. (but for testing, it is ok)
Is it possible to import, if testing is not a "clone" of production (same file locations, and config). Same oracle version.

What about rman full backup, if I copy my full rman backup to testing, it will create datafiles where they should be. It is said in controlfile right?

Best,

and Connor said...

You can manipulate the files as you restore them with RMAN, eg

run 
{ 
set newname for datafile 1 to '/new_location/system01.dbf'; 
set newname for datafile 2 to '/new_location/sysaux01.dbf'; 
set newname for datafile 3 to '/new_location/undotbs01.dbf'; 
...
...
restore database; 
recover database; 
}



With datapump, you could pre-create the tablespaces, and then the datapump import will not overwrite them.

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

To make it clear

gonzalo amadio, November 22, 2016 - 5:09 pm UTC

So to make it clear.

I can create tablespaces (with datafiles, maybe not the same number), no matter where they are.
And then import with datapump, and the tablespaces (dbfs) will fill up.
Is this correct?

But with rman, I have to have same number of datafiles?

---
Which one do you think is the best? easiest?


Connor McDonald
November 23, 2016 - 5:18 am UTC

"Is this correct? "

Yes.

To simply clone a full database, RMAN (in particular the RMAN duplicate option) is pretty easy to use.

If you want subsets of data, or other variations, than datapump might be required.


More to Explore

Data Pump

All of the database utilities including Data Pump are explained in the Utilities guide.