I just do some tests with the Oracle 12.2 Release and while doing tests it is all the time better to have a second database and that is the time for rman. So I looked around and found an easy way to duplicate a database from a Backup. Here the details:
OL 7.3 with an Oracle 12.2 + DATABASE BUNDLE PATCH: 18.104.22.168.170516 (25862693)
I setup an database via dbca and use Standards including the fast recovery area. Oh yes the FRA is a standard now
Next I did a backup and here I did a few tests with image copied and „backup as copy database“. While doing this I had a full backup on disk and that is the point to start with the duplicate.
What are the steps?
First I created a initdb2.dup
Yes, for testing I create only one controlfile initdb2.dup *.audit_file_dest='/u01/app/oracle/admin/db2_s1/adump' *.audit_trail='NONE' *.db_name='db2' *.db_unique_name='db2_s1' *.control_files='/u01/app/oracle/fast_recovery_area/db2_s1.ctl' *.db_create_file_dest='/u01/app/oracle/oradata' *.db_recovery_file_dest_size=8G *.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area' *.enable_pluggable_database=true *.large_pool_size=256M *.sga_target=2G
Next I created a few directories and then I started the new instance
sqlplus / as sysdba startup nomount pfile=/u01/app/oracle/admin/db2/pfile/initd2.dup'
finally I start the duplicate from „BACKUP LOCATION“
rman auxiliary / RMAN>duplicate database to db2 backup location '/u01/app/oracle/fast_recovery_area';
That’s it finished :-)
Keep in mind that I set my environment before starting the rman duplicate and the connection is done against the auxiliary instance. Yes, it is very easy to do a duplicate to a new database when you have a full backup on disc.