Prerequisite Steps
1. If your target server holds at least one Oracle Apps R12.1.3 instance, you can skip for any OS patch or software requirement section. As the server is running a Oracle Apps instance, we can assume the server has all the
mandatory OS patch and required software. Else look into the metalink for platform specific requirements.
如何克隆的目标主机含有Oracle EBS的运行实例,那么可以跳过操作系统补丁和一些必要软件的检查,否则需要查询Oracle EBS安装前必要的一些软件是否安装全或者操作系统参数是否配置。(如果已经有Oracle EBS正在运行,证明这些软件都已经安装了,不用检查。具体请查看Oracle EBS安装文档。)
本文地址:http://blog.csdn.net/sunansheng/article/details/52218289
2. Apply Latest AD patch
Check whether AD patch version is atleast R12.AD.B.3. You can check that using following query.
SELECT patch_level FROM fnd_product_installations WHERE patch_level LIKE 'R12.AD%'
If it is below that level apply patch 9239089.
检查现在的EBS系统是否安装AD patch补丁 R12.AD.B.3(一般都回安装的)可以通过上面的SQL语句查看是否安装该补丁。
3. Apply the latest AutoConfig template patch
Update the Oracle Applications file system with the AutoConfig files by applying the latest AutoConfig Template patch (Patch 9386653 for 12.0.X customers and Patch 8919489 for 12.1.X customers) to all application tier nodes in the Applications instance. You can check whether this patch is already there or not in your system by the following sql.
SELECT * FROM ad_applied_patches WHERE patch_name = '8919489'
[忽略]
4. Apply the latest Rapid Clone patches
For Release 12.1 apply following patches.
9171651:R12.OAM.B 12.1 RAPIDCLONE CONSOLIDATED FIXES JUL/2010
9833058:R12.OAM.B HOT CLONE FAILS WITH ORA-00201 DURING RECOVERY MANAGER
12404574:R12.OAM.B ORACLE_HOME REGISTRATION DOES NOT HAPPEN WITH CENTRAL INVENTORY ON LOZ
12598630:R12.OAM.B R12.1 ONE-OFF FOR S_DB_LISTENER BUG 12362010
[忽略]
5. Run AutoConfig on the application tiers
Follow the steps under section " Run AutoConfig on the Application Tiers " in My Oracle Support Knowledge Document 387859.1 to run AutoConfig on all application tier nodes.
[忽略]
6. Synchronize appsutil on the database tier nodes
Follow the steps under section "Copy AutoConfig to the RDBMS ORACLE_HOME" in My Oracle Support Knowledge Document 387859.1 to copy AutoConfig and Rapid Clone files to each database node via the admkappsutil.pl utility.
[忽略]
7. Run AutoConfig on the database tier
Follow the steps under section "Run AutoConfig on the Database Tier" in My Oracle Support Knowledge Document 387859.1 to run AutoConfig on the database tier nodes.
[忽略]
8. Maintain Snapshot Information
Log in to each application tier node as the APPLMGR user, and run "Maintain Snapshot Information" in AD Administration. To update the snapshot, please select the following options "Update Current View Snapshot" and "Update Complete APPL_TOP".
[忽略]
Cloning Steps
9. Prepare the source system
Execute the following commands to prepare the source system for cloning.
9.1 数据库层预克隆
Prepare the source system database tier for cloning
Log on to the source system as the ORACLE user, and run the following commands.
[plain]
view plain
copy
cd [RDBMS ORACLE_HOME]/appsutil/scripts/[CONTEXT_NAME] perl adpreclone.pl dbTier
切换到EBS的ORACLE用户,并切换到脚本目录,运行
perl adpreclone.pl dbTier 进行数据库层预克隆
9.2 应用层预克隆
Prepare the source system application tier for cloning
Log on to the source system as the APPLMGR user, and run the following commands on each node that contains an APPL_TOP:
[plain]
view plain
copy
$ cd [INST_TOP]/admin/scripts $ perl adpreclone.pl appsTier
切换到EBS的APPL用户,并切换到脚本目录,运行
perl adpreclone.pl appsTier 进行应用层预克隆
10. Shutdown the source system. Copy full directory "apps" and "db" from source system to target system. Use the following command for copy.
关闭EBS的应用与数据库,并复制apps、db两个目录到目标系统。
$ cp -RH
设置apps、db文件夹及子文件的所属用户
chown -R appl01:dba apps
11.
Configure the target system
Run the following commands to configure the target system. You will be prompted for specific target system values such as SID, paths, and ports.
11.1 数据库层克隆
a.Configure the target system database server
Log on to the target system as the ORACLE user and enter the following commands.
$ cd [RDBMS ORACLE_HOME]/appsutil/clone/bin
$ perl adcfgclone.pl dbTier
登录到目标系统的ORACLE用户下,切换到对应目录,运行脚本,进行数据库层的克隆。
[plain]
view plain
copy
[ora01@erptest bin]$ perl adcfgclone.pl dbTier Copyright (c) 2002 Oracle Corporation Redwood Shores, California, USA Oracle Applications Rapid Clone Version 12.0.0 adcfgclone Version 120.31.12010000.8 Enter the APPS password : Running: /u01/EBS02/db/tech_st/11.2.0/appsutil/clone/bin/../jre/bin/java -Xmx600M -cp /u01/EBS02/db/tech_st/11.2.0/appsutil/clone/jlib/java:/u01/EBS02/db/tech_st/11.2.0/appsutil/clone/jlib/xmlparserv2.jar:/u01/EBS02/db/tech_st/11.2.0/appsutil/clone/jlib/ojdbc5.jar oracle.apps.ad.context.CloneContext -e /u01/EBS02/db/tech_st/11.2.0/appsutil/clone/bin/../context/db/CTXORIG.xml -validate -pairsfile /tmp/adpairsfile_4889.lst -stage /u01/EBS02/db/tech_st/11.2.0/appsutil/clone 2> /tmp/adcfgclone_4889.err; echo $? > /tmp/adcfgclone_4889.res Log file located at /u01/EBS02/db/tech_st/11.2.0/appsutil/clone/bin/CloneContext_0817093648.log Provide the values required for creation of the new Database Context file. Target System Hostname (virtual or normal) [erptest] :[默认,回车] Target Instance is RAC (y/n) [n] : n Target System Database SID : EBSTEST【新的数据库SID】 Target System Base Directory : /u01/EBS02 Target System utl_file_dir Directory List : /u01/EBS02/temp Number of DATA_TOP's on the Target System [1] : Target System DATA_TOP Directory 1 [/u01/TEST/db/apps_st/data] : /u01/EBS02/db/apps_st/data Target System RDBMS ORACLE_HOME Directory [/u01/EBS02/db/tech_st/11.1.0] : /u01/EBS02/db/tech_st/11.2.0/ Do you want to preserve the Display [erptest:1.0] (y/n) : n Target System Display [erptest:0.0] : erptest:2.0 Target System Port Pool [0-99] : 5【端口号,为1521+输入的端口[0-99]】 Checking the port pool 5 RC-50221: Warning: Port Pool 5 is not free. Please check logfile /u01/EBS02/db/tech_st/11.2.0/appsutil/clone/bin/CloneContext_0817093648.log for conflicts. Target System Port Pool [0-99] : 6 Checking the port pool 6
如果遇到错误ERROR: Failed to execute /d01/PREPROD/oradb/11.2.0.3/appsutil/clone/bin/adclone.pl ,请查看本博客另外一篇文章:http://blog.csdn.net/sunansheng/article/details/52227829
如果以上步骤成功,切换到cd [RDBMS ORACLE_HOME]/appsutil/scripts/[CONTEXT_NAME] ,进行AUTOCONFIG
[plain]
view plain
copy
cd [RDBMS ORACLE_HOME]/appsutil/scripts/[CONTEXT_NAME] EG.cd /u01/EBS02/db/tech_st/11.2.0/appsutil/scripts/TEST02_erptestsh adautocfg.sh
在.bash_profile 中添加环境变量
. /u01/EBS02/db/tech_st/11.2.0/TEST02_erptest.env
可以再Oracle用户根目录下新建 startdb.sh stopdb.sh来方便以后启动、停止数据库
[ora01@erptest ~]$ cat startdb.sh
/u01/EBS02/db/tech_st/11.2.0/appsutil/scripts/TEST02_erptest/addlnctl.sh start TEST02
/u01/EBS02/db/tech_st/11.2.0/appsutil/scripts/TEST02_erptest/addbctl.sh start
[ora01@erptest ~]$ cat stopdb.sh
/u01/EBS02/db/tech_st/11.2.0/appsutil/scripts/TEST02_erptest/addlnctl.sh stop TEST02
/u01/EBS02/db/tech_st/11.2.0/appsutil/scripts/TEST02_erptest/addbctl.sh stop immediate
11.2 应用层
克隆
b.Configure the target system application tier server nodes
Log on to the target system as the APPLMGR user and enter the following commands:
$ cd [COMMON_TOP]/clone/bin
$ perl adcfgclone.pl appsTier
登录到目标系统的APPL用户下,切换到对应目录,运行脚本,进行应用层的克隆。
[plain]
view plain
copy
[appl01@erptest bin]$ perl adcfgclone.pl appsTier Copyright (c) 2002 Oracle Corporation Redwood Shores, California, USA Oracle Applications Rapid Clone Version 12.0.0 adcfgclone Version 120.31.12010000.8 Enter the APPS password : Running: /u01/EBS02/apps/apps_st/comn/clone/bin/../jre/bin/java -Xmx600M -cp /u01/EBS02/apps/apps_st/comn/clone/jlib/java:/u01/EBS02/apps/apps_st/comn/clone/jlib/xmlparserv2.jar:/u01/EBS02/apps/apps_st/comn/clone/jlib/ojdbc14.jar oracle.apps.ad.context.CloneContext -e /u01/EBS02/apps/apps_st/comn/clone/bin/../context/apps/CTXORIG.xml -validate -pairsfile /tmp/adpairsfile_23301.lst -stage /u01/EBS02/apps/apps_st/comn/clone 2> /tmp/adcfgclone_23301.err; echo $? > /tmp/adcfgclone_23301.res Log file located at /u01/EBS02/apps/apps_st/comn/clone/bin/CloneContext_0817170043.log Provide the values required for creation of the new APPL_TOP Context file. Target System Hostname (virtual or normal) [erptest] : 【回车】 Target System Database SID : TEST02 【数据库SID】 Target System Database Server Node [erptest] : Target System Database Domain Name [gtig.com] : Target System Base Directory : /u01/EBS02 Target System Tools ORACLE_HOME Directory [/u01/EBS02/apps/tech_st/10.1.2] : Target System Web ORACLE_HOME Directory [/u01/EBS02/apps/tech_st/10.1.3] : Target System APPL_TOP Directory [/u01/EBS02/apps/apps_st/appl] : Target System COMMON_TOP Directory [/u01/EBS02/apps/apps_st/comn] : Target System Instance Home Directory [/u01/EBS02/inst] : Target System Root Service [enabled] : Target System Web Entry Point Services [enabled] : Target System Web Application Services [enabled] : Target System Batch Processing Services [enabled] : Target System Other Services [disabled] : Do you want to preserve the Display [erptest:1.0] (y/n) : y Target System Port Pool [0-99] : 3 Checking the port pool 3 done: Port Pool 3 is free Report file located at /u01/EBS02/inst/apps/TEST02_erptest/admin/out/portpool.lst Complete port information available at /u01/EBS02/inst/apps/TEST02_erptest/admin/out/portpool.lst UTL_FILE_DIR on database tier consists of the following directories. 1. /usr/tmp 2. /u01/EBS02/temp 3. /u01/EBS02/db/tech_st/11.2.0//appsutil/outbound/TEST02_erptest 4. /usr/tmp Choose a value which will be set as APPLPTMP value on the target node [1] : 2 Creating the new APPL_TOP Context file from : /u01/EBS02/apps/apps_st/appl/ad/12.0.0/admin/template/adxmlctx.tmp
新建应用层用户 startapp.sh stopapp.sh脚本,快速启动 关闭应用
[appltest@erptest ~]$ cat startapp.sh
/u01/TEST/inst/apps/TEST_erptest/admin/scripts/adstrtal.sh apps/apps
[appltest@erptest ~]$ cat stopapp.sh
/u01/TEST/inst/apps/TEST_erptest/admin/scripts/adstpall.sh apps/apps
转载请注明原文地址: https://ju.6miu.com/read-1308058.html