Home » Server Options » Multitenant » Refresh exisitng PDB from local PDB (Oracle CDB 12c )
Refresh exisitng PDB from local PDB [message #664171] Thu, 06 July 2017 02:38 Go to next message
mstrakow
Messages: 3
Registered: July 2017
Junior Member

Hello everyone,

I would like to ask , If there is any possibility to copy one PDB to another on local CBD - instead off using datapump tool ?
I read about cloning , but in this approach we always must create a new PDB.

So, my situation is :
I have PDB1 with data, and I want to copy those data to PBD2 - which is also exists.PDB2 has it`s own tablespaces - same as in PDB1.
For this two PDB`s a created a common users.

Thanks in advance for any prompt.
Re: Refresh exisitng PDB from local PDB [message #664172 is a reply to message #664171] Thu, 06 July 2017 03:11 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

You have 2 choices:
1/ Copy the PDB
2/ Copy the content of the PDB

The tool for point 1/ is RMAN (easiest way) and duplication and so create a new PDB.
The tool for point 2/ is Data Pump.

If you want PDB2 the same as PDB1 then why not duplication (which is far faster than the other way)?

Re: Refresh exisitng PDB from local PDB [message #664177 is a reply to message #664171] Thu, 06 July 2017 05:17 Go to previous messageGo to next message
mstrakow
Messages: 3
Registered: July 2017
Junior Member

Hello Michel,
thanks You for quick response .

As I mentioned , I would like to avoid using Data Pump, so point 2 falls off.

Using RMAN requires to have DB in archivelog mode (I don`t have it, but it`s not a problem).
Anyway, I found something like this in doc :
"When you duplicate one or more PDBs, RMAN also duplicates the root (CDB$ROOT) and the CDB seed (PDB$SEED)." (https://docs.oracle.com/database/122/BRADV/rman-duplicating-databases.htm#BRADV760)

My two PDB`s are on the same CDB so I don`t need to duplicate CDB$ROOT and PDB$SEED.

Maybe I was not very detailed earlier, so I describe it once more.

Both PDB`s are in the same CDB.
PDB1 is used by one dev team1.
PDB2 is used by second dev team2.

Both team`s have configured their connection to proper services dedicated to indicated PDB (srv1 for PDB1 & svr2 for PDB2 ) . Suppose team2 asked for refresh their PDB2 using data from PDB1.
In approach You suggest in point 1, I will create new PDB, with new name, new service etc. - or maybe I wrong and I don`t understand this mechanism.

I want to avoid situation, when dev team`s have to make some changes in their config files. And in above solution (if I not wrong) they should change service name for new one.
From their perspective, after refreshing, nothing should change excepts data in PDB.
I this possible using RMAN ?

Thanks in advance for reply.
Re: Refresh exisitng PDB from local PDB [message #664183 is a reply to message #664177] Thu, 06 July 2017 06:10 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

You can use transportable tablespaces.

Re: Refresh exisitng PDB from local PDB [message #664185 is a reply to message #664183] Thu, 06 July 2017 06:22 Go to previous messageGo to next message
mstrakow
Messages: 3
Registered: July 2017
Junior Member

That`s true, but it`s similar scenario as using Data Pump .
Re: Refresh exisitng PDB from local PDB [message #664186 is a reply to message #664185] Thu, 06 July 2017 06:25 Go to previous message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Except that you export only the metadata and copy the files, so it is faster.
Of course, it assumes that your team2 does not add some of their private objects into these (target) tablespaces.

Previous Topic: Oracle 12c Multi Tenancy -Data Separation
Next Topic: Share data between PDB's in the same CDB
Goto Forum:
  


Current Time: Thu Mar 28 05:13:37 CDT 2024