Prepare Source System
(Usually Production)
Prepare the source system database for cloning:
• Log on to the source system database node as the database software owner
• cd to the $ORACLE_HOME/appsutil/scripts/ directory
• execute the perl script adpreclone.pl
$ perl adpreclone.pl dbTier
Prepare the source system application nodes for cloning (this step must be run on all application nodes):
• Log on to the source system application nodes as the application software owner
• cd to the $INST_TOP/admin/scripts directory
• execute the perl script adpreclone.pl
$ perl adpreclone.pl appsTier
2. Take a backup of Database:
You may do this usuing RMAN or conventional Hot backup(alter tablespace begin backup;)
Take the controlfile backup using the following:
SQL>alter database backup controlfile to trace as '/tmp/control.sql';
3. Take a backup of Apps Tier:
Tar the apps_st and tech_st directories of Source system.
4. Copy/Restore Source System to the Target System
You may use SCP or sfftp to do it if it's on unix based OS.
5. Hot Backup DB Clone:
Make sure that the directories needed for oracle files are created already.
Make sure ORACLE_HOME, PATH and LD_LIBRARY_PATH and ORACLE_SID are set appropriately.
Start the database in nomount state.
exit;
Create the controlfile from previously taken trace backup from source system(Refer Step 2)
Change the necessary sections of the controlfile based on the target database requirements.
CREATE CONTROLFILE SET DATABASE "TEST" RESETLOGS FORCE LOGGING NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 4
MAXDATAFILES 512
MAXINSTANCES 8
MAXLOGHISTORY 15000
LOGFILE
GROUP 1 (
'/u01/app/oracle/TEST/db/apps_st/data/log01a.log',
'/u01/app/oracle/TEST/db/apps_st/data/log01b.log'
) SIZE 2000M BLOCKSIZE 512,
GROUP 2 (
'/u01/app/oracle/TEST/db/apps_st/data/log02a.log',
'/u01/app/oracle/TEST/db/apps_st/data/log02b.log'
) SIZE 2000M BLOCKSIZE 512
DATAFILE
'/u01/app/oracle/TEST/db/apps_st/data/system01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system02.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system03.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system04.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system05.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/ctxd01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/owad01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_queue02.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/odm.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/olap.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/sysaux01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/apps_ts_tools01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system12.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data04.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind06.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_ref03.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_int02.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/sysaux02.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_ref04.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data05.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/sysaux03.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data06.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind07.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_ref05.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data07.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system10.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system06.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/portal01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system07.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system09.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system08.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/undo01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_ref01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_int01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_summ01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_archive01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_queue01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_media01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data02.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data03.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind02.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind03.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind04.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind05.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_ref02.dbf'
CHARACTER SET UTF8
;
add_temp.sql (extract the TEMP creation section):
ALTER TABLESPACE TEMP1 ADD TEMPFILE '/u01/app/oracle/TEST/db/apps_st/data/temp01.dbf'
SIZE 5120M REUSE AUTOEXTEND OFF;
ALTER TABLESPACE TEMP2 ADD TEMPFILE '/u01/app/oracle/TEST/db/apps_st/data/temp02.dbf'
SIZE 4096M REUSE AUTOEXTEND OFF;
• Log on to the target system database node as the database software owner
• cd to the $ORACLE_HOME/appsutil/clone/bin directory
• execute the perl script adcfgclone.pl
$ perl adcfgclone.pl dbTechStack
• Below is the adcfgclone.pl dialogue and example responses:
$ perl adcfgclone.pl dbTechStack
Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA
Oracle Applications Rapid Clone
Version 12.0.0
adcfgclone Version 120.20.12000000.11
Enter the APPS password :
Target System Hostname (virtual or normal) [prod1] : test01
Target Instance is RAC (y/n) [n] : n
Target System Database SID : TEST
Target System Base Directory : /u01/app/oracle/TEST
Target System utl_file_dir Directory List : /usr/tmp
Number of DATA_TOP's on the Target System [1] : 1
Target System DATA_TOP Directory 1 [/u01/app/oracle/PROD/db/apps_st/data] : /u01/app/oracle/TEST/db/apps_st/data
Target System RDBMS ORACLE_HOME Directory [/u01/app/oracle/TEST/db/tech_st/11.1.0] : /u01/app/oracle/TEST/db/tech_st/11.2.0
Do you want to preserve the Display [null] (y/n) ? : n
Target System Display [prod1:0.0] : test1:0.0
Do you want the target system to have the same port values as the source system (y/n) [y] ? : n
Target System Port Pool [0-99] : 2
• Edit the following two parameters in the init.ora file on the target system with the correct path and format for the archivelogs
log_archive_dest_1='LOCATION=<>’ -- location of archive logs on destination server for the the specific instance
log_archive_dest_1=’LOCATION=/u03/oracle/TEST/oradata/archive’
log_archive_format='TEST%t_%s_%r.log'
• Login to the target instance as sysdba:
Run CreateControl.sql
By now the database will be mounted(If all the parameters mentioned above are correct)
Recover database using backup controlfile until cancel or time:
Open the database with the following command
SQL>alter database open resetlogs;
• Execute the add_temp.sql script that was created in a previous step:
SQL> @add_temp.sql
• Bounce database (shutdown and start):
• Execute the adupdlib.sql script (with the “so” option) located in the $ORACLE_HOME/appsutil/install/ directory as sysdba:
SQL> @adupdlib.sql so
• cd to the $ORACLE_HOME/appsutil/clone/bin directory
• execute the perl script adcfgclone.pl
$ perl adcfgclone.pl dbconfig $ORACLE_HOME/appsutil/.xml
6. Configure the target system application server nodes (this step must be run on all application nodes):
• Log onto the target system application nodes as the application software owner
• cd to the $COMMON_TOP/clone/bin directory
• execute the perl script adpreclone.pl
perl adcfgclone.pl appsTier
• Below is the adcfgclone.pl dialogue and example responses:
$ perl adcfgclone.pl appsTier
Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA
Oracle Applications Rapid Clone
Version 12.0.0
adcfgclone Version 120.20.12000000.11
Enter the APPS password :
PROMPT :
Target System Hostname (virtual or normal) [test1]
PROMPT :
Target System Domain Name
test.oracle.com
PROMPT :
Target System Database SID
TEST
PROMPT :
Target System Database Server Node [testdb01]
PROMPT :
Target System Database Domain Name [testdb01.oracle.com]
PROMPT :
Target System Base Directory
/u01/app/oracle/TEST
Tools Oracle Home default value/u01/app/oracle/TEST/apps/tech_st/10.1.2
PROMPT :
Target System Tools ORACLE_HOME Directory [/u01/app/oracle/TEST/apps/tech_st/10.1.2]
ANSWER :
/u01/app/oracle/TEST/apps/tech_st/10.1.2
Web Oracle Home:/u01/app/oracle/TEST/apps/tech_st/10.1.3
Target System Web ORACLE_HOME Directory [/u01/app/oracle/TEST/apps/tech_st/10.1.3]
Appl TOP:/u01/app/oracle/TEST/apps/apps_st/appl
PROMPT :
Target System APPL_TOP Directory [/u01/app/oracle/TEST/apps/apps_st/appl]
/u01/app/oracle/TEST/apps/apps_st/appl
COMMON TOP:/u01/app/oracle/TEST/apps/apps_st/comn
PROMPT :
Target System COMMON_TOP Directory [/u01/app/oracle/TEST/apps/apps_st/comn]
PROMPT :
Target System Instance Home Directory [/u01/app/oracle/TEST/inst]
/u01/app/oracle/TEST/inst
PROMPT :
Target System Root Service [enabled]
enabled
PROMPT :
Target System Web Entry Point Services [enabled]
enabled
PROMPT :
Target System Web Application Services [enabled]
enabled
PROMPT :
Target System Batch Processing Services [enabled]
enabled
Target System Other Services [disabled]
disabled
PROMPT :
Do you want to preserve the Display [192.168.1.150:0.0] (y/n)
n
PROMPT :
Target System Display [test1.oracle:0.0]
PROMPT :
Do you want the the target system to have the same port values as the source system (y/n) [y] ?
n
Started testing the availabilty of ports in port pool 2
Post Cloning Tasks:
Shutdown Applications
Shutdown the database and put the database in archivelog mode
Startup Database
Startup Applications
Change the Profile option: Site_name to the TEST Instance name
Configure Workflow
Configure Concurrent Managers
Change Apps and SYSADMIN passwords
Prepare the source system database for cloning:
• Log on to the source system database node as the database software owner
• cd to the $ORACLE_HOME/appsutil/scripts/ directory
• execute the perl script adpreclone.pl
$ perl adpreclone.pl dbTier
Prepare the source system application nodes for cloning (this step must be run on all application nodes):
• Log on to the source system application nodes as the application software owner
• cd to the $INST_TOP/admin/scripts directory
• execute the perl script adpreclone.pl
$ perl adpreclone.pl appsTier
2. Take a backup of Database:
You may do this usuing RMAN or conventional Hot backup(alter tablespace begin backup;)
Take the controlfile backup using the following:
SQL>alter database backup controlfile to trace as '/tmp/control.sql';
3. Take a backup of Apps Tier:
Tar the apps_st and tech_st directories of Source system.
4. Copy/Restore Source System to the Target System
You may use SCP or sfftp to do it if it's on unix based OS.
5. Hot Backup DB Clone:
Make sure that the directories needed for oracle files are created already.
Make sure ORACLE_HOME, PATH and LD_LIBRARY_PATH and ORACLE_SID are set appropriately.
Start the database in nomount state.
exit;
Create the controlfile from previously taken trace backup from source system(Refer Step 2)
Change the necessary sections of the controlfile based on the target database requirements.
CREATE CONTROLFILE SET DATABASE "TEST" RESETLOGS FORCE LOGGING NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 4
MAXDATAFILES 512
MAXINSTANCES 8
MAXLOGHISTORY 15000
LOGFILE
GROUP 1 (
'/u01/app/oracle/TEST/db/apps_st/data/log01a.log',
'/u01/app/oracle/TEST/db/apps_st/data/log01b.log'
) SIZE 2000M BLOCKSIZE 512,
GROUP 2 (
'/u01/app/oracle/TEST/db/apps_st/data/log02a.log',
'/u01/app/oracle/TEST/db/apps_st/data/log02b.log'
) SIZE 2000M BLOCKSIZE 512
DATAFILE
'/u01/app/oracle/TEST/db/apps_st/data/system01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system02.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system03.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system04.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system05.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/ctxd01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/owad01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_queue02.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/odm.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/olap.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/sysaux01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/apps_ts_tools01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system12.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data04.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind06.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_ref03.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_int02.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/sysaux02.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_ref04.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data05.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/sysaux03.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data06.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind07.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_ref05.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data07.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system10.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system06.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/portal01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system07.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system09.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/system08.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/undo01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_ref01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_int01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_summ01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_archive01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_queue01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_media01.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data02.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_data03.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind02.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind03.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind04.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_txn_ind05.dbf',
'/u01/app/oracle/TEST/db/apps_st/data/a_ref02.dbf'
CHARACTER SET UTF8
;
add_temp.sql (extract the TEMP creation section):
ALTER TABLESPACE TEMP1 ADD TEMPFILE '/u01/app/oracle/TEST/db/apps_st/data/temp01.dbf'
SIZE 5120M REUSE AUTOEXTEND OFF;
ALTER TABLESPACE TEMP2 ADD TEMPFILE '/u01/app/oracle/TEST/db/apps_st/data/temp02.dbf'
SIZE 4096M REUSE AUTOEXTEND OFF;
• Log on to the target system database node as the database software owner
• cd to the $ORACLE_HOME/appsutil/clone/bin directory
• execute the perl script adcfgclone.pl
$ perl adcfgclone.pl dbTechStack
• Below is the adcfgclone.pl dialogue and example responses:
$ perl adcfgclone.pl dbTechStack
Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA
Oracle Applications Rapid Clone
Version 12.0.0
adcfgclone Version 120.20.12000000.11
Enter the APPS password :
Target System Hostname (virtual or normal) [prod1] : test01
Target Instance is RAC (y/n) [n] : n
Target System Database SID : TEST
Target System Base Directory : /u01/app/oracle/TEST
Target System utl_file_dir Directory List : /usr/tmp
Number of DATA_TOP's on the Target System [1] : 1
Target System DATA_TOP Directory 1 [/u01/app/oracle/PROD/db/apps_st/data] : /u01/app/oracle/TEST/db/apps_st/data
Target System RDBMS ORACLE_HOME Directory [/u01/app/oracle/TEST/db/tech_st/11.1.0] : /u01/app/oracle/TEST/db/tech_st/11.2.0
Do you want to preserve the Display [null] (y/n) ? : n
Target System Display [prod1:0.0] : test1:0.0
Do you want the target system to have the same port values as the source system (y/n) [y] ? : n
Target System Port Pool [0-99] : 2
• Edit the following two parameters in the init.ora file on the target system with the correct path and format for the archivelogs
log_archive_dest_1='LOCATION=<>’ -- location of archive logs on destination server for the the specific instance
log_archive_dest_1=’LOCATION=/u03/oracle/TEST/oradata/archive’
log_archive_format='TEST%t_%s_%r.log'
• Login to the target instance as sysdba:
Run CreateControl.sql
By now the database will be mounted(If all the parameters mentioned above are correct)
Recover database using backup controlfile until cancel or time:
Open the database with the following command
SQL>alter database open resetlogs;
• Execute the add_temp.sql script that was created in a previous step:
SQL> @add_temp.sql
• Bounce database (shutdown and start):
• Execute the adupdlib.sql script (with the “so” option) located in the $ORACLE_HOME/appsutil/install/ directory as sysdba:
SQL> @adupdlib.sql so
• cd to the $ORACLE_HOME/appsutil/clone/bin directory
• execute the perl script adcfgclone.pl
$ perl adcfgclone.pl dbconfig $ORACLE_HOME/appsutil/.xml
6. Configure the target system application server nodes (this step must be run on all application nodes):
• Log onto the target system application nodes as the application software owner
• cd to the $COMMON_TOP/clone/bin directory
• execute the perl script adpreclone.pl
perl adcfgclone.pl appsTier
• Below is the adcfgclone.pl dialogue and example responses:
$ perl adcfgclone.pl appsTier
Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA
Oracle Applications Rapid Clone
Version 12.0.0
adcfgclone Version 120.20.12000000.11
Enter the APPS password :
PROMPT :
Target System Hostname (virtual or normal) [test1]
PROMPT :
Target System Domain Name
test.oracle.com
PROMPT :
Target System Database SID
TEST
PROMPT :
Target System Database Server Node [testdb01]
PROMPT :
Target System Database Domain Name [testdb01.oracle.com]
PROMPT :
Target System Base Directory
/u01/app/oracle/TEST
Tools Oracle Home default value/u01/app/oracle/TEST/apps/tech_st/10.1.2
PROMPT :
Target System Tools ORACLE_HOME Directory [/u01/app/oracle/TEST/apps/tech_st/10.1.2]
ANSWER :
/u01/app/oracle/TEST/apps/tech_st/10.1.2
Web Oracle Home:/u01/app/oracle/TEST/apps/tech_st/10.1.3
Target System Web ORACLE_HOME Directory [/u01/app/oracle/TEST/apps/tech_st/10.1.3]
Appl TOP:/u01/app/oracle/TEST/apps/apps_st/appl
PROMPT :
Target System APPL_TOP Directory [/u01/app/oracle/TEST/apps/apps_st/appl]
/u01/app/oracle/TEST/apps/apps_st/appl
COMMON TOP:/u01/app/oracle/TEST/apps/apps_st/comn
PROMPT :
Target System COMMON_TOP Directory [/u01/app/oracle/TEST/apps/apps_st/comn]
PROMPT :
Target System Instance Home Directory [/u01/app/oracle/TEST/inst]
/u01/app/oracle/TEST/inst
PROMPT :
Target System Root Service [enabled]
enabled
PROMPT :
Target System Web Entry Point Services [enabled]
enabled
PROMPT :
Target System Web Application Services [enabled]
enabled
PROMPT :
Target System Batch Processing Services [enabled]
enabled
Target System Other Services [disabled]
disabled
PROMPT :
Do you want to preserve the Display [192.168.1.150:0.0] (y/n)
n
PROMPT :
Target System Display [test1.oracle:0.0]
PROMPT :
Do you want the the target system to have the same port values as the source system (y/n) [y] ?
n
Started testing the availabilty of ports in port pool 2
Post Cloning Tasks:
Shutdown Applications
Shutdown the database and put the database in archivelog mode
Startup Database
Startup Applications
Change the Profile option: Site_name to the TEST Instance name
Configure Workflow
Configure Concurrent Managers
Change Apps and SYSADMIN passwords
Hi i need expdb/impdb oracle 11g document for export/ import database/datafile .. pls help me ..my mail id jayachandran4242@gmail.com
ReplyDelete