码迷,mamicode.com
首页 > 其他好文 > 详细

EBS系统克隆

时间:2014-11-19 12:36:53      阅读:243      评论:0      收藏:0      [点我收藏+]

标签:style   blog   io   ar   color   os   sp   java   for   

EBS系统克隆主要分为三个步骤来做:准备源系统-》拷贝源系统-》配置目标系统


一。准备源系统

主要操作如下:

1.        prepare操作,需要source环境处于Databaserunning的状态。

2.        prepare操作,可以在EBS所有服务处于运行的状态下运行。

3.        每次source的更新都需要更新prepare的操作,比如增加datafile、执行EBSpatch。建议在每次clone前,都执             行prepare的操作

4.        如果source未及时更新prepare操作,而已经copyfiles到target环境。则可以在source中进行prepare操作,将              prepare更新的内容覆盖target环境即可。Prepare更新的文件目录如下:

           dbtier:$ORACLE_HOME/appsutil/clone

          apptier:$OAD_TOP/clone

          目标系统一定要安装安装EBS系统的要求对操作系统做全面检查


准备:

(1)在源EBS系统上为EBS系统做数据库预隆

1.        用orapord用户登录到数据库服务器(192.168.0.203)。

2.        进入到克隆脚本目录。

           先加载数据库的环境变量。

           cd $ORACLE_HOME/appsutil/scripts/PROD_ebsdb

3.        运行数据库预克隆。

           perl adpreclone.pl dbTier


(2)在源EBS系统上为EBS系统做应用库预隆

1.       用applprod用户登录到应用服务器(192.168.0.203)

2.       进入到应用克隆脚本路径:

           加载应用的环境变量。

         cd $ADMIN_SCRIPTS_HOME

3.      perl adpreclone.pl appsTier



二。拷贝源系统

注意:

1.        文件的一致性,尤其是datafile的一致性。如果datafile是不一致的,则在db tier的adclone操作将会出错。

          说明:在数据库采用abort方式关闭、数据库异常关闭下、以及数据库处于运行状态下的数据库文件复制都将是           不一致的。

2.        切记正常关闭源系统。


拷贝:

1.        db tier文件:

           将数据库服务器192.168.0.203这台机器上/oracle/PROD/db整个目录打包压缩。

           参考语句如下:

           cd /oracle/PROD

           tar cvf - db|gzip > PROD.db.tar.gz

2.        app tier文件:

           将应用库服务器192.168.0.203这台机器上/u01/PROD/apps整个目录打包压缩。

           参考语句如下:

          cd /u01/PROD

           tar cvf - apps|gzip > PROD.apps.tar.gz

3.        将上两步中的tar.gz文件分别上传至目标系统的机器,并解压。

           ftp 192.168.0.202(目标环境的IP地址)

          (提示输入用户名,然后是密码)

          !ls查看要上传的文件是不是在当前路径下面

          pwd查看目标机器的路径,如果不对,更改到目标目录

         put 文件名   (如果是从服务器上下载就是 get)

          gunzip -c db.tar.gz|tar  xvf -           (解压)

4.        更改target以上文件的属主和权限

          如:

          chown–R oratest:dba /u01/TEST/db

          chown–R appltest:dba /u01/TEST/apps


三。配置目标系统

步骤:

1.        执行adclone的顺序:

           首先,在db server上执行db tier的clone操作。

           其次,在app server上执行app tier的clone操作。

           说明:如果是将多节点clone为单节点,那么只需要在单节点主机上分别执行db Tier 和apps Tier操作即可。

2.        每步clone完成后,会自动启动该clone内容的service。


STEP_BY_STEP:

配置数据库服务器:

注意:操作前请确认unzipccPERL5LIBperlLD_LIBRARY_PAT等环境变量设置好。(一般情况下,参照源环境,设置这些环境变量为目录系统中的路径)

1.        用数据库用户,如oratest登录到数据库服务器

2.        设置perl的路径:

           export PATH=/u01/TEST/db/tech_st/11.2.0/perl/bin/:$PATH

          which perl

3.        确保PERL5LIB的环境变量如下:

            Export PERL5LIB=                            /u01/DEV/db/tech_st/11.2.0/perl/lib/5.10.0:/u01/DEV/db/tech_st/11.2.0/perl/lib/site_perl/5.10.0:/u01/DEV/db/tech_st/11.2.0/appsutil/perl

4.        进入脚本所在路径:

           cd /oracle/PROD/db/tech_st/11.2.0/appsutil/clone/bin

5.        perl adcfgclone.pl dbTier

例如:

$  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:
/oracle/PROD/db/tech_st/11.2.0/appsutil/clone/bin/../jre/bin/java -Xmx600M -cp /oracle/PROD/db/tech_st/11.2.0/appsutil/clone/jlib/java:/oracle/PROD/db/tech_st/11.2.0/appsutil/clone/jlib/xmlparserv2.jar:/oracle/PROD/db/tech_st/11.2.0/appsutil/clone/jlib/ojdbc5.jar oracle.apps.ad.context.CloneContext -e /oracle/PROD/db/tech_st/11.2.0/appsutil/clone/bin/../context/db/CTXORIG.xml -validate -pairsfile /tmp/adpairsfile_11403756.lst -stage /oracle/PROD/db/tech_st/11.2.0/appsutil/clone  2> /tmp/adcfgclone_11403756.err; echo $? > /tmp/adcfgclone_11403756.res

Log file located at /oracle/PROD/db/tech_st/11.2.0/appsutil/clone/bin/CloneContext_0829234612.log

Provide the values required for creation of the new Database Context file.

Target System Hostname (virtual or normal) [ebsdb-test] : (回车)

Target Instance is RAC (y/n) [n] : (回车)

Target System Database SID : TEST

Target System Base Directory : /oracle/PROD

Target System utl_file_dir Directory List :/u01/DEV/tmp

Number of DATA_TOP's on the Target System [1] : (回车)

Target System DATA_TOP Directory 1 [/oracle/PROD/db/apps_st/data] : (回车)

Target System RDBMS ORACLE_HOME Directory [/oracle/TEST/db/tech_st/11.1.0] : /oracle/PROD/db/tech_st/11.2.0

Do you want to preserve the Display [ebsdb:1.0] (y/n)  : n

Target System Display [ebsdb-test:0.0] : ebsdb-test:1.0

Do you want the the target system to have the same port values as the source system (y/n) [y] ? : n

Target System Port Pool [0-99] : 2

Checking the port pool 2
done: Port Pool 2 is free
Report file located at /oracle/PROD/db/tech_st/11.2.0/appsutil/temp/portpool.lst
Complete port information available at /oracle/PROD/db/tech_st/11.2.0/appsutil/temp/portpool.lst

Creating the new Database Context file from :
  /oracle/PROD/db/tech_st/11.2.0/appsutil/template/adxdbctx.tmp

The new database context file has been created :
  /oracle/PROD/db/tech_st/11.2.0/appsutil/TEST_ebsdb-test.xml

Log file located at /oracle/PROD/db/tech_st/11.2.0/appsutil/clone/bin/CloneContext_0829234612.log
Check Clone Context logfile /oracle/PROD/db/tech_st/11.2.0/appsutil/clone/bin/CloneContext_0829234612.log for details.

Running Rapid Clone with command:
perl /oracle/PROD/db/tech_st/11.2.0/appsutil/clone/bin/adclone.pl java=/oracle/PROD/db/tech_st/11.2.0/appsutil/clone/bin/../jre mode=apply stage=/oracle/PROD/db/tech_st/11.2.0/appsutil/clone component=dbTier method=CUSTOM dbctxtg=/oracle/PROD/db/tech_st/11.2.0/appsutil/TEST_ebsdb-test.xml showProgress contextValidated=true
Running:
perl /oracle/PROD/db/tech_st/11.2.0/appsutil/clone/bin/adclone.pl java=/oracle/PROD/db/tech_st/11.2.0/appsutil/clone/bin/../jre mode=apply stage=/oracle/PROD/db/tech_st/11.2.0/appsutil/clone component=dbTier method=CUSTOM dbctxtg=/oracle/PROD/db/tech_st/11.2.0/appsutil/TEST_ebsdb-test.xml showProgress contextValidated=true
APPS Password : 
Setting LIBPATH to /oracle/PROD/db/tech_st/11.2.0/appsutil/clone/oui/lib/aix

Beginning database tier Apply - Thu Aug 29 23:47:11 2013
… …

配置应用:

注意:操作前请确认unzipccPERL5LIBperlLD_LIBRARY_PAT等环境变量设置好。

1.        用应用用户,如appltest登录应用服务器

2.        设置perl的路径:

             export PATH=/u01/PROD/apps/tech_st/10.1.3/perl/bin:$PATH

3.        确保PERL5LIB的环境变量如下:

exportPERL5LIB=/u01/PROD/apps/tech_st/10.1.3/perl/lib/5.8.3:/u01/PROD/apps/tech_st/10.1.3/perl/lib/site_perl/5.8.3:/u01/PROD/apps/apps_st/appl/au/12.0.0/perl:/u01/PROD/apps/tech_st/10.1.3/Apache/Apache/mod_perl/lib/site_perl/5.8.3/aix-thread-multi

       进入脚本所在路径:

            cd /u01/PROD/apps/apps_st/comn/clone/bin

4.        perl adcfgclone.pl appsTier


例如:

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/PROD/apps/apps_st/comn/clone/bin/../jre/bin/java -Xmx600M -cp /u01/PROD/apps/apps_st/comn/clone/jlib/java:/u01/PROD/apps/apps_st/comn/clone/jlib/xmlparserv2.jar:/u01/PROD/apps/apps_st/comn/clone/jlib/ojdbc14.jar oracle.apps.ad.context.CloneContext -e /u01/PROD/apps/apps_st/comn/clone/bin/../context/apps/CTXORIG.xml -validate -pairsfile /tmp/adpairsfile_12976162.lst -stage /u01/PROD/apps/apps_st/comn/clone  2> /tmp/adcfgclone_12976162.err; echo $? > /tmp/adcfgclone_12976162.res

Log file located at /u01/PROD/apps/apps_st/comn/clone/bin/CloneContext_0829235559.log

Provide the values required for creation of the new APPL_TOP Context file.

Target System Hostname (virtual or normal) [ebsapp-test] : (回车)

Target System Database SID : TEST

Target System Database Server Node [ebsapp-test] : ebsdb-test

Target System Database Domain Name [qlbchina.com] : (回车)

Target System Base Directory : /u01/PROD

Target System Tools ORACLE_HOME Directory [/u01/PROD/apps/tech_st/10.1.2] : (回车)

Target System Web ORACLE_HOME Directory [/u01/PROD/apps/tech_st/10.1.3] : (回车)

Target System APPL_TOP Directory [/u01/PROD/apps/apps_st/appl] : (回车)

Target System COMMON_TOP Directory [/u01/PROD/apps/apps_st/comn] : (回车)

Target System Instance Home Directory [/u01/PROD/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 [ebsapp:0.0] (y/n)  : n

Target System Display [ebsapp-test:0.0] : ebsapp-test:1.0

Do you want the the target system to have the same port values as the source system (y/n) [y] ? : n

Target System Port Pool [0-99] : 2

Checking the port pool 2
done: Port Pool 2 is free
Report file located at /u01/PROD/inst/apps/TEST_ebsapp-test/admin/out/portpool.lst
Complete port information available at /u01/PROD/inst/apps/TEST_ebsapp-test/admin/out/portpool.lst

UTL_FILE_DIR on database tier consists of the following directories.

1. /usr/tmp
2. /tmp
3. /oracle/PROD/db/tech_st/11.2.0/appsutil/outbound/TEST_ebsdb-test
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/PROD/apps/apps_st/appl/ad/12.0.0/admin/template/adxmlctx.tmp

The new APPL_TOP context file has been created :
  /u01/PROD/inst/apps/TEST_ebsapp-test/appl/admin/TEST_ebsapp-test.xml

Log file located at /u01/PROD/apps/apps_st/comn/clone/bin/CloneContext_0829235559.log
Check Clone Context logfile /u01/PROD/apps/apps_st/comn/clone/bin/CloneContext_0829235559.log for details.

Running Rapid Clone with command:
perl /u01/PROD/apps/apps_st/comn/clone/bin/adclone.pl java=/u01/PROD/apps/apps_st/comn/clone/bin/../jre mode=apply stage=/u01/PROD/apps/apps_st/comn/clone component=appsTier method=CUSTOM appctxtg=/u01/PROD/inst/apps/TEST_ebsapp-test/appl/admin/TEST_ebsapp-test.xml showProgress contextValidated=true
Running:
perl /u01/PROD/apps/apps_st/comn/clone/bin/adclone.pl java=/u01/PROD/apps/apps_st/comn/clone/bin/../jre mode=apply stage=/u01/PROD/apps/apps_st/comn/clone component=appsTier method=CUSTOM appctxtg=/u01/PROD/inst/apps/TEST_ebsapp-test/appl/admin/TEST_ebsapp-test.xml showProgress contextValidated=true
APPS Password : 
Setting LIBPATH to /u01/PROD/apps/apps_st/comn/clone/oui/lib/aix

Beginning application tier Apply - Thu Aug 29 23:56:45 2013

/u01/PROD/apps/apps_st/comn/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=true  -Doracle.installer.oui_loc=/oui -classpath /u01/PROD/apps/apps_st/comn/clone/jlib/xmlparserv2.jar:/u01/PROD/apps/apps_st/comn/clone/jlib/ojdbc14.jar:/u01/PROD/apps/apps_st/comn/clone/jlib/java:/u01/PROD/apps/apps_st/comn/clone/jlib/oui/OraInstaller.jar:/u01/PROD/apps/apps_st/comn/clone/jlib/oui/ewt3.jar:/u01/PROD/apps/apps_st/comn/clone/jlib/oui/share.jar:/u01/PROD/apps/apps_st/comn/clone/jlib/oui/srvm.jar:/u01/PROD/apps/apps_st/comn/clone/jlib/ojmisc.jar  oracle.apps.ad.clone.ApplyAppsTier -e /u01/PROD/inst/apps/TEST_ebsapp-test/appl/admin/TEST_ebsapp-test.xml -stage /u01/PROD/apps/apps_st/comn/clone    -showProgress
dmin/log/ApplyAppsTier_05271600.log
  /      0% completed       
… …







EBS系统克隆

标签:style   blog   io   ar   color   os   sp   java   for   

原文地址:http://blog.csdn.net/cai_xingyun/article/details/41279595

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!