Cloning Oracle EBS using RMAN

Oracle My Support Document: Cloning Oracle Applications Release 12 with Rapid Clone: Doc ID:  406982.1 describes advance ways to clone Oracle EBS. Section 6 of the document illustrates the way to clone an Oracle EBS database separately.

I tried using the same process on an Oracle Database for EBS R12 in no archivelog mode on IBM AIX where I used RMAN to backup and restore.

First the database was restarted and placed in a nomount state.

SQL> shutdown;

SQL> startup nomount;

Copied the controlfiles and redo logs to a backup location.  Brought the database in mount state as;

SQL> alter databse mount;

Connected with RMAN on the source database and  took a backup.

run

{

allocate channel c1 type disk;

allocate channel c2 type disk;

backup as compressed backupset

filesperset 30

format ‘/dev1/backup/%d_%u.bkp’

database;

}

Once backup was completed then the backup files were moved to another server. On the target server the adcfgclone script had to be executed as;

oradev@test /dev2/oracle/proddb/10.2.0/appsutil/clone/bin ->perl adcfgclone.pl dbTechStack

Once script completed the listener would be started.  Now the parameter had to editted with the new location of the controlfiles and the database was mounted and then RMAN backups were cataloged as;

connected to target database: CLONE (DBID=52110679, not open)

RMAN> run
2> {
3> catalog backuppiece ‘/dev5/backup/CLONE_06lpi3e4.bkp’;
4> catalog backuppiece ‘/dev5/backup/CLONE_0glpi5jg.bkp’;
5> catalog backuppiece ‘/dev5/backup/CLONE_0elpi55n.bkp’;
6> catalog backuppiece ‘/dev5a/backup/CLONE_0flpi58h.bkp’;

After cataloging the RMAN backups. The restore process was started. First identiying the new locations, restoring the files and then recovering the files.

RMAN> run
2> {
3> set newname for datafile 396 to ‘/dev10/oracle/proddata/lotus.dbf’;
4> set newname for datafile 380 to ‘/dev10/oracle/proddata/system11.dbf’;
5> set newname for datafile 379 to ‘/dev10/oracle/proddata/system10.dbf’;
6> set newname for datafile 1 to ‘/dev10/oracle/proddata/system01.dbf’;
7> set newname for datafile 2 to ‘/dev10/oracle/proddata/system02.dbf’;
8> set newname for datafile 3 to ‘/dev10/oracle/proddata/system03.dbf’;

450> restore database;
451> switch datafile all;
452> recover database;

453>}

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 06-OCT-10
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00204 to /dev11/oracle/proddata/oex01.dbf

Now the database had been restored and recovered. Then the redologs were checked

SQL> SELECT member FROM v$logfile;

MEMBER
——————————————————————————–
/qa11/oracle/proddata/log04a.dbf
/qa11/oracle/proddata/log04b.dbf

They were being shown in the old locations so had to be updated with new ones as;
SQL> ALTER DATABASE RENAME FILE ‘/qa11/oracle/proddata/log04a.dbf’ to ‘/dev11/oracle/proddata/log04a.dbf’;

Database altered.

SQL> ALTER DATABASE RENAME FILE ‘/qa11/oracle/proddata/log04b.dbf’ to ‘/dev11/oracle/proddata/log04b.dbf’;

Database altered.

The old temp files had to be dropped and then recreated again.  After recreating the temp files the database could be opened

SQL> alter database open;

Database altered.

After the database had been opened, a script to update the libarry had to be executed as also mentioned in Doc ID 406982.1

SQL> @/dev2/oracle/proddb/10.2.0/appsutil/install/CLONE_dev/adupdlib.sql so

PL/SQL procedure successfully completed.
SQL> exit

Finally the adcfgclone script had to be executed  along with the database context file as;

oradev@test /dev2/oracle/proddb/10.2.0/appsutil/clone/bin ->perl adfgcloneclone.pl dbconfig /dev2/oracle/proddb/10.2.0/appsutil/CLONE_dev.xml

Once the script completes, the database and listener were started. The complete steps have been documented and listed in Oracle My Support Doc ID: 406982.1 for cloning Oracle EBS.

Advertisement

One Response to Cloning Oracle EBS using RMAN

  1. so saad finally you got some time out of your busy schedule to post something nice. Thanks. Keep doing.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.