Thanks for the question, Rafael.
Asked: February 14, 2023 - 10:28 pm UTC
Last updated: February 15, 2023 - 1:28 am UTC
Version: 19
Viewed 1000+ times
You Asked
Hi,
Let's say I have a production database running with multiple CDBs, but we need to refresh the data of a single PDB on a test database and on a different host. There's no network communication between production and test environment, so, cloning using a database link is not viable.
Currently, we are taking a backup of the required PDB with the root CDB and seed PDB, then, restoring it into another database instance. After the database is recovered and opened, we unplug the PDB and plug it into the required CDB, but this is very time consuming.
Based on this scenario, what's the best way to clone a single PDB into another CDB on a different host? The PDB has 6 TB.
Thanks
and Connor said...
Can you elaborate on "this is very time consuming." ?
If there is no network between the hosts, this suggests the time here is going to be the transport of the backup (which presumably is a physical activity if there is not network).
Assuming the steps are:
1. backup
2. transport backup
3. mount/restore backup
4. recover
5. unplug
6. plug
I imagine that steps 1,2,3 are 90% of the time.
If (2) is the dominant time, then nothing we can really do about that.
If its (1) and (3), then perhaps an option is to use incrementals, ie, you take that initial backup and transport it over. Now the steps become:
First time:
1. backup
2. transport backup
3. mount/restore backup
4. recover
5. (nex step) activate flashback logging
6. unplug
7. plug
All subsequent times
1. copy just archives from primary
2. on secondary, flashback to the recovery point
3. roll the archives forward to move the clone forward
4. activate flashback logging
5. unplug
6. plug
So you'll ovly ever be copying that 6TB once.
A lot here depends on the volume of archives you have.
Is this answer out of date? If it is, please let us know via a Comment