Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Use RMAN to copy/clone a database

Alex2068May 14 2019 — edited May 16 2019

I wanted to clone a database using RMAN. Found this http://www.dba-oracle.com/t_rman_clone_copy_database.htm

It is divided into two sections. If you clone to maintaining the same folder structure or using another folder structure. I am interested in the second part.

My source database (A) is on Windows Server 2012, Oracle 12.2.0.1 Standard Edition. Data files are on drive X, oracle software on V.

My destination database (B) is on Windows Server 2016, Oracle 12.2.0.1 Standard Edition. Data files are on drive Y, oracle software on W.

I actually created both database using the same template, only needed to modify files location from X to Y, and V to W. So database names are the same.

Now, using RMAN, I want to overwrite database B with A. They are both container databases (one pluggable database) in noarchive log mode.

So my steps were, while A was mounted, backup database using RMAN. As a result I get four files containing CDB, SEED, PDB and Control-Spfile and I and move them to destination server.

On destination server, using RMAN I shutdown B and bring it to nomount state so I can start overwriting it, by cloning A to B.

So from that article link, my very first serious RMAN step is:

5. Restore the controlfile from the backup piece.

RMAN> restore controlfile from '/u01/oracle/product/ora10g/dbs/c-3932056136-20070213-02';

This gives me (using my real file name):

RMAN> restore controlfile from 'F:\Test\IFSLCDB_D_20190425_0MTVSSLU_S22_P1';

Starting restore at 10-MAY-19

restore not done; all files read only, offline, excluded, or already restored

Finished restore at 10-MAY-19

RMAN>

What is missing here? I am failing on the very first step.

I even tried to set on B, DBID, using the one from A, no joy.

Any help please?

Comments
Post Details
Added on May 14 2019
9 comments
5,332 views