Oracle Database Appliance (ODA) (MOSC)

MOSC Banner

How to clone CDB to same ODA with different CDB name and different PDB name

My goal is to create a clone of our production database to be used for testing. I have an x8-2s running ODA 19.18. All my databases are running bare metal.

I have an existing production tde-enabled CDB named cdb1 and a PDB named pdb1. I would like to clone cdb1 to cdb2 and clone pdb1 to pdb2. 

Would this plan work?

1. Backup CDB and restore it as a copy to same ODA:

odacli irestore-database -r (json backup report from cdb1) -u cdb2 -t -dh xxxxxx -fd

2. Rename pdb1 to pdb2 on cdb2

connect to cdb2...

alter session set container=pdb1;
alter system enable restricted session;
alter database rename global_name to pdb2;
alter system disable restricted session;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center