【APP_ORACLE】Oracle EBS R12.1標準克隆(包括資料庫層和應用層)
準備步驟
實驗環境
APP:EBS 12.1.1
DB:Oracle DB 11.1(此文件同樣適用於DB 11.2)
OS:AIX 5.3 (此文件同樣適用於Linux)
一、在源系統執行預克隆指令碼
首先,先停應用層,再停資料庫層,應用層啟停命令:
啟動:$ADMIN_SCRIPTS_HOME/adstrtal.sh apps/xxx
停止:$ADMIN_SCRIPTS_HOME/adstpall.sh apps/xxx
DB 層:
cd $ORACLE_HOME/appsutil/scripts/<context> perl adpreclone.pl dbTier
APP層:
cd $INST_TOP/admin/scripts perl adpreclone.pl appsTier
二、複製源應用層和資料庫層檔案到目標端
注:源端和目標端的路徑最好一致(後面有針對不同路徑的解決辦法)
APP層:
將apps整個目錄 tar後 copy到目標機器( 主要資料夾包含APPL_TOP,COMMON_TOP,ORACLE_HOME,IAS_ORACLE_HOME;只有INST_TOP資料夾不需要打包)
另,應用層的環境變數暫時不需要新增,等克隆完成後新增並source(後文有說明)
DB層:
1. Tar 原資料庫 oracle_home到新機器(資料庫包括所有11g版本都適用)
2. 建立使用者如 oratest
3. 設定環境變數 ORACLE_BASE,ORACLE_HOME,PER5LIB, PATH
4. 修改$ORACLE_HOME/oraInst.loc 將Inventory指向新目錄
5. 執行資料庫HOME Clone(用一個ORALCE_HOME可不做)
cd $ORACLE_HOME/clone/bin
$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/clone/bin/clone.pl ORACLE_BASE=$ORACLE_BASE ORACLE_HOME=$ORACLE_HOME OSDBA_GROUP=dba OSOPER_GROUP=dba ORACLE_HOME_NAME=${ORACLE_SID}_DB_HOME
orapwd file=$ORACLE_HOME/dbs/orapwEBSTEST password=oracle force=y ignorecase=n
修改TNS_ADMIN下 listener.ora, tnsnames.ora, sqlnet.ora中的目錄
修改$ORACLE_HOME/dbs/init<SID>.ora, init<SID>_noaq.ora中的目錄
6. 源資料庫rman備份資料庫,archive log和control file做rman全備份( 3個都要備份; 也可以選擇停機冷備)
7. RMAN目標恢復資料庫
Copy 備份檔案到測試機
Oracle DB 11.2 新功能 不需要連線target database (這裡只是展示一下11.2的新功能,此文件DB版本預設基於11.1)
特殊ASM對ASM 架構中也有2個檔案建立時指定了資料檔名,需強制寫set newname
SQL>startup nomount RMAN>connect auxiliary / RMAN>run { set newname for database to '+RECO'; set newname for datafile 15 to '+RECO/ebstest/datafile/cuxd01.dbf'; set newname for datafile 16 to '+RECO/ebstest/datafile/cuxx01.dbf'; set until time "to_date('20201012 10:00','YYYYMMDD HH24:MI')"; duplicate database to EBSTEST backup location '+RECO/prod/backupset'; }
執行克隆
三、配置目標資料庫層autoconfig
1) 設定環境變數
export ORACLE_SID=EBSTEST cd $ORACLE_HOME/appsutil export TNS_ADMIN=$ORACLE_HOME/network/admin/$ORACLE_SID cd $ORACLE_HOME/appsutil/bin
2)生成新的XML檔案(可選)
perl adbldxml.pl ##根據提示輸入相關資訊,生成的XML檔案可以自定義路徑、埠和應用簡稱等。但如果源端和目標端路徑和埠一致,無需執行此指令碼,直接呼叫源端的xml
3) 執行adconfig
$ORACLE_HOME/appsutil/bin/adconfig.sh contextfile=$ORACLE_HOME/appsutil/${ORACLE_SID}_`hostname`.xml ##這個xml就是上一步生成的
4) 啟動listener
Lsnrctl start EBSTEST
5) 清理FND_NODES
connect apps/apps ##使用apps使用者登入 EXEC FND_CONC_CLONE.SETUP_CLEAN; ##建議多執行幾次 Commit;
6) 重新執行adconfig
cd $ORACLE_HOME/appsutil/scripts/${ORACLE_SID}_`hostname` ./adautocfg.sh contextfile=$ORACLE_HOME/appsutil/${ORACLE_SID}_`hostname`.xml
注意:以上除設定環境變數步驟以外,都是非標準克隆方式
=============================== 標準克隆方式(推薦)===================================
如果DB源端和目標端路徑不一致則採取下面的“標準克隆”方法一步搞定(該步驟是標準克隆步驟,並且無需生成XML檔案,無需執行adconfig.sh):
cd $ORACLE_HOME/appsutil/clone/bin 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.1 Enter the APPS password : Running: /proddb/db/tech_st/11.1.0/appsutil/clone/bin/../jre/bin/java -Xmx600M -cp /prodd b/db/tech_st/11.1.0/appsutil/clone/jlib/java:/proddb/db/tech_st/11.1.0/appsutil/ clone/jlib/xmlparserv2.jar:/proddb/db/tech_st/11.1.0/appsutil/clone/jlib/ojdbc5. jar oracle.apps.ad.context.CloneContext -e /proddb/db/tech_st/11.1.0/appsutil/cl one/bin/../context/db/CTXORIG.xml -validate -pairsfile /tmp/adpairsfile_249862.l st -stage /proddb/db/tech_st/11.1.0/appsutil/clone 2> /tmp/adcfgclone_249862.er r; echo $? > /tmp/adcfgclone_249862.res Log file located at /proddb/db/tech_st/11.1.0/appsutil/clone/bin/CloneContext_08 26131233.log Provide the values required for creation of the new Database Context file. Target System Hostname (virtual or normal) [ebsapp01] : Target Instance is RAC (y/n) [n] : n Target System Database SID : prod Target System Base Directory : /proddb Target System utl_file_dir Directory List : /usr/tmp/prod Number of DATA_TOP's on the Target System [1] : Target System DATA_TOP Directory 1 [/proddb/db/apps_st/data] : Target System RDBMS ORACLE_HOME Directory [/proddb/db/tech_st/11.1.0] : Do you want to preserve the Display [ebsdb01:0.0] (y/n) ? : n Target System Display [ebsapp01:0.0] : ebsapp01:1 ##選“1” Do you want the the target system to have the same port values as the source sys tem (y/n) [y] ? : y Complete port information available at /proddb/db/tech_st/11.1.0/appsutil/clone/ bin/out/prod_ebsapp01/portpool.lst Creating the new Database Context file from : /proddb/db/tech_st/11.1.0/appsutil/template/adxdbctx.tmp The new database context file has been created : /proddb/db/tech_st/11.1.0/appsutil/prod_ebsapp01.xml Log file located at /proddb/db/tech_st/11.1.0/appsutil/clone/bin/CloneContext_08 26131233.log Check Clone Context logfile /proddb/db/tech_st/11.1.0/appsutil/clone/bin/CloneCo ntext_0826131233.log for details. Running Rapid Clone with command: perl /proddb/db/tech_st/11.1.0/appsutil/clone/bin/adclone.pl java=/proddb/db/tec h_st/11.1.0/appsutil/clone/bin/../jre mode=apply stage=/proddb/db/tech_st/11.1.0 /appsutil/clone component=dbTier method=CUSTOM dbctxtg=/proddb/db/tech_st/11.1.0 /appsutil/prod_ebsapp01.xml showProgress contextValidated=true Running: perl /proddb/db/tech_st/11.1.0/appsutil/clone/bin/adclone.pl java=/proddb/db/tec h_st/11.1.0/appsutil/clone/bin/../jre mode=apply stage=/proddb/db/tech_st/11.1.0 /appsutil/clone component=dbTier method=CUSTOM dbctxtg=/proddb/db/tech_st/11.1.0 /appsutil/prod_ebsapp01.xml showProgress contextValidated=true APPS Password : Setting LIBPATH to /proddb/db/tech_st/11.1.0/appsutil/clone/oui/lib/aix Beginning database tier Apply - Thu Aug 26 13:14:05 2010 /proddb/db/tech_st/11.1.0/appsutil/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_ VALIDATED=true -Doracle.installer.oui_loc=/proddb/db/tech_st/11.1.0/oui -classp ath /proddb/db/tech_st/11.1.0/appsutil/clone/jlib/xmlparserv2.jar:/proddb/db/tec h_st/11.1.0/appsutil/clone/jlib/ojdbc6.jar:/proddb/db/tech_st/11.1.0/appsutil/cl one/jlib/java:/proddb/db/tech_st/11.1.0/appsutil/clone/jlib/oui/OraInstaller.jar :/proddb/db/tech_st/11.1.0/appsutil/clone/jlib/oui/ewt3.jar:/proddb/db/tech_st/1 1.1.0/appsutil/clone/jlib/oui/share.jar:/proddb/db/tech_st/11.1.0/appsutil/clone /jlib/oui/srvm.jar:/proddb/db/tech_st/11.1.0/appsutil/clone/jlib/ojmisc.jar or acle.apps.ad.clone.ApplyDBTier -e /proddb/db/tech_st/11.1.0/appsutil/prod_ebsapp 01.xml -stage /proddb/db/tech_st/11.1.0/appsutil/clone -showProgress APPS Password : Log file located at /proddb/db/tech_st/11.1.0/appsutil/log/prod_ ebsapp01/ApplyDBTier_08261314.log \ 15% completed Completed Apply... Thu Aug 26 13:22:02 2010 Starting database listener for prod: Running: /proddb/db/tech_st/11.1.0/appsutil/scripts/prod_ebsapp01/addlnctl.sh start prod You are running addlnctl.sh version 120.1.12010000.2 Logfile: /proddb/db/tech_st/11.1.0/appsutil/log/prod_ebsapp01/addlnctl.txt Starting listener process prod ... Listener prod has already been started. addlnctl.sh: exiting with status 0
重要:
最後需要把“. /proddb/db/tect_st/11.1.0/prod_ebsdb01.env”這句話(檔案路徑預設在ORACLE_HOME下)新增到環境變數中並重新應用環境變數
7) 修改system口令(可選)
sqlplus / as sysdba alter user system identified by manager;
四、配置目標應用層autoconfig
cd $ADMIN_SCRIPTS_HOME ./adautocfg.sh ##預設目標端和源端埠和檔案路徑一致,否則手動編輯CONTEXT_FILE檔案內容如埠、軟體別名和檔案路徑等(路徑在$INST_TOP/appl/admin/${ORACLE_SID}_`hostname`.xml))
=============================== 標準克隆方式(推薦)===================================
如果APP源端和目標端路徑不一致則採取下面的“標準克隆”方法 一步搞定(該步驟是標準克隆步驟,並且無需生成XML檔案,無需執行adconfig.sh,並且自動啟動應用層):
cd $COMMON_TOP/clone/bin 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.1 Enter the APPS password : Running: /prodapp/apps/apps_st/comn/clone/bin/../jre/bin/java -Xmx600M -cp /prodapp/apps/ apps_st/comn/clone/jlib/java:/prodapp/apps/apps_st/comn/clone/jlib/xmlparserv2.j ar:/prodapp/apps/apps_st/comn/clone/jlib/ojdbc14.jar oracle.apps.ad.context.Clon eContext -e /prodapp/apps/apps_st/comn/clone/bin/../context/apps/CTXORIG.xml -va lidate -pairsfile /tmp/adpairsfile_360666.lst -stage /prodapp/apps/apps_st/comn/ clone 2> /tmp/adcfgclone_360666.err; echo $? > /tmp/adcfgclone_360666.res Log file located at /prodapp/apps/apps_st/comn/clone/bin/CloneContext_0826132503 .log Provide the values required for creation of the new APPL_TOP Context file. Target System Hostname (virtual or normal) [ebsapp01] : Target System Database SID : prod Target System Database Server Node [ebsapp01] : Target System Base Directory : /prodapp Target System Tools ORACLE_HOME Directory [/prodapp/apps/tech_st/10.1.2] : Target System Web ORACLE_HOME Directory [/prodapp/apps/tech_st/10.1.3] : Target System APPL_TOP Directory [/prodapp/apps/apps_st/appl] : Target System COMMON_TOP Directory [/prodapp/apps/apps_st/comn] : Target System Instance Home Directory [/prodapp/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 [enabled] : Do you want to preserve the Display [ebsapp01:1] (y/n) ? : y ##預設是“1”就行 Target System Port Pool [0-99] : 0 ##此處如果埠衝突,選擇其他數字即可 Checking the port pool 0 done: Port Pool 0 is free Report file located at /prodapp/inst/apps/prod_ebsapp01/admin/out/portpool.lst Complete port information available at /prodapp/inst/apps/prod_ebsapp01/admin/ou t/portpool.lst UTL_FILE_DIR on database tier consists of the following directories. 1. /usr/tmp 2. /usr/tmp/prod 3. /proddb/db/tech_st/11.1.0/appsutil/outbound/prod_ebsapp01 4. /usr/tmp Choose a value which will be set as APPLPTMP value on the target node [1] : 1 Creating the new APPL_TOP Context file from : /prodapp/apps/apps_st/appl/ad/12.0.0/admin/template/adxmlctx.tmp The new APPL_TOP context file has been created : /prodapp/inst/apps/prod_ebsapp01/appl/admin/prod_ebsapp01.xml Log file located at /prodapp/apps/apps_st/comn/clone/bin/CloneContext_0826132503 .log Check Clone Context logfile /prodapp/apps/apps_st/comn/clone/bin/CloneContext_08 26132503.log for details. Running Rapid Clone with command: perl /prodapp/apps/apps_st/comn/clone/bin/adclone.pl java=/prodapp/apps/apps_st/ comn/clone/bin/../jre mode=apply stage=/prodapp/apps/apps_st/comn/clone componen t=appsTier method=CUSTOM appctxtg=/prodapp/inst/apps/prod_ebsapp01/appl/admin/pr od_ebsapp01.xml showProgress contextValidated=true Running: perl /prodapp/apps/apps_st/comn/clone/bin/adclone.pl java=/prodapp/apps/apps_st/ comn/clone/bin/../jre mode=apply stage=/prodapp/apps/apps_st/comn/clone componen t=appsTier method=CUSTOM appctxtg=/prodapp/inst/apps/prod_ebsapp01/appl/admin/pr od_ebsapp01.xml showProgress contextValidated=true APPS Password : Setting LIBPATH to /prodapp/apps/apps_st/comn/clone/oui/lib/aix Beginning application tier Apply - Thu Aug 26 13:26:19 2010 /prodapp/apps/apps_st/comn/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATE D=true -Doracle.installer.oui_loc=/oui -classpath /prodapp/apps/apps_st/comn/cl one/jlib/xmlparserv2.jar:/prodapp/apps/apps_st/comn/clone/jlib/ojdbc14.jar:/prod app/apps/apps_st/comn/clone/jlib/java:/prodapp/apps/apps_st/comn/clone/jlib/oui/ OraInstaller.jar:/prodapp/apps/apps_st/comn/clone/jlib/oui/ewt3.jar:/prodapp/app s/apps_st/comn/clone/jlib/oui/share.jar:/prodapp/apps/apps_st/comn/clone/jlib/ou i/srvm.jar:/prodapp/apps/apps_st/comn/clone/jlib/ojmisc.jar oracle.apps.ad.clon e.ApplyAppsTier -e /prodapp/inst/apps/prod_ebsapp01/appl/admin/prod_ebsapp01.xml -stage /prodapp/apps/apps_st/comn/clone -showProgress APPS Password : Log file located at /prodapp/inst/apps/prod_ebsapp01/admin/log/A pplyAppsTier_08261326.log \ 73% completed Completed Apply... Thu Aug 26 13:35:39 2010 Starting application Services for prod: ##自動啟動應用 Running: /prodapp/inst/apps/prod_ebsapp01/admin/scripts/adstrtal.sh -nopromptmsg You are running adstrtal.sh version 120.15 The logfile for this session is located at /prodapp/inst/apps/prod_ebsapp01/logs /appl/admin/log/adstrtal.log Executing service control script: /prodapp/inst/apps/prod_ebsapp01/admin/scripts/adopmnctl.sh start script returned: **************************************************** You are running adopmnctl.sh version 120.6 Starting Oracle Process Manager (OPMN) ... adopmnctl.sh: exiting with status 0 adopmnctl.sh: check the logfile /prodapp/inst/apps/prod_ebsapp01/logs/appl/admin /log/adopmnctl.txt for more information ... .end std out. .end err out. **************************************************** Executing service control script: /prodapp/inst/apps/prod_ebsapp01/admin/scripts/adalnctl.sh start script returned: **************************************************** adalnctl.sh version 120.3 Checking for FNDFS executable. Starting listener process APPS_prod. adalnctl.sh: exiting with status 0 adalnctl.sh: check the logfile /prodapp/inst/apps/prod_ebsapp01/logs/appl/admin/ log/adalnctl.txt for more information ... .end std out. .end err out. **************************************************** Executing service control script: /prodapp/inst/apps/prod_ebsapp01/admin/scripts/adapcctl.sh start script returned: **************************************************** You are running adapcctl.sh version 120.7.12010000.2 Starting OPMN managed Oracle HTTP Server (OHS) instance ... adapcctl.sh: exiting with status 0 adapcctl.sh: check the logfile /prodapp/inst/apps/prod_ebsapp01/logs/appl/admin/ log/adapcctl.txt for more information ... .end std out. .end err out. **************************************************** Executing service control script: /prodapp/inst/apps/prod_ebsapp01/admin/scripts/adoacorectl.sh start script returned: **************************************************** You are running adoacorectl.sh version 120.13 Starting OPMN managed OACORE OC4J instance ... adoacorectl.sh: exiting with status 0 adoacorectl.sh: check the logfile /prodapp/inst/apps/prod_ebsapp01/logs/appl/adm in/log/adoacorectl.txt for more information ... .end std out. .end err out. **************************************************** Executing service control script: /prodapp/inst/apps/prod_ebsapp01/admin/scripts/adcmctl.sh start script returned: **************************************************** You are running adcmctl.sh version 120.17.12010000.3 Starting concurrent manager for prod ... Starting prod_0826@prod Internal Concurrent Manager Default printer is noprint adcmctl.sh: exiting with status 0 adcmctl.sh: check the logfile /prodapp/inst/apps/prod_ebsapp01/logs/appl/admin/l og/adcmctl.txt for more information ... .end std out. .end err out. **************************************************** Executing service control script: /prodapp/inst/apps/prod_ebsapp01/admin/scripts/jtffmctl.sh start script returned: **************************************************** You are running jtffmctl.sh version 120.3 Validating Fulfillment patch level via /prodapp/apps/apps_st/comn/java/classes Fulfillment patch level validated. Starting Fulfillment Server for prod on port 9300 ... jtffmctl.sh: exiting with status 0 .end std out. .end err out. **************************************************** Executing service control script: /prodapp/inst/apps/prod_ebsapp01/admin/scripts/adformsrvctl.sh start script returned: **************************************************** You are running adformsrvctl.sh version 120.15.12010000.2 Starting FORMS Server in Socket Mode... adformsrvctl.sh: exiting with status 0 adformsrvctl.sh: check the logfile /prodapp/inst/apps/prod_ebsapp01/logs/ora/10. 1.2/forms/socket.log for more information ... .end std out. .end err out. **************************************************** All enabled services for this node are started. adstrtal.sh: Exiting with status 0 ##“status=0”就代表所有服務啟動成功 adstrtal.sh: check the logfile /prodapp/inst/apps/prod_ebsapp01/logs/appl/admin/ log/adstrtal.log for more information ...
重要:
最後需要把“. /prodapp/app/apps_st/apps/APPSprod_ebsapp01.env”這句話(檔案路徑預設在APPL_TOP下)新增到環境變數中並重新應用環境變數
CLONE 後續步驟
1.登入EBS系統更新 profile: 地點名 (location)
2. 更改Workflow配置(可選)
Table Name |
Column Name |
Column Value Details |
WF_NOTIFICATION_ATTRIBUTES |
TEXT_VALUE |
Value starts with web host>: Update to new web host. |
WF_ITEM_ATTRIBUTE_VALUES |
TEXT_VALUE |
Value starts with " web host>: Update to new web host. |
WF_SYSTEMS |
GUID |
Using the Workflow Administrator Web Applications responsibility, create a new system defined as the new global database name. |
WF_SYSTEMS |
NAME |
Replace value with the database global name. |
WF_AGENTS |
ADDRESS |
Update database link with the new database global name. |
FND_FORM_FUNCTIONS |
WEB_HOST_NAME |
Update with the new web host name. |
FND_FORM_FUNCTIONS |
WEB_AGENT_NAME |
Update to point at the new PL/SQL listener name. |
FND_CONCURRENT_REQUESTS |
LOGFILE_NAME |
Update with the correct path to the logfile directory. |
FND_CONCURRENT_REQUESTS |
OUTFILE_NAME |
Update with the new directory path on the target system. |
3.檢查環境變數 APPLCSF是否正確
4.更改apps使用者的表ICX_PARAMETERS中的SESSION_COOKIE_DOMAIN=<new domain name>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69992972/viewspace-2749438/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 06_應用層和核心層實現資料互動
- 瞭解安卓架構(linux核心層、系統執行庫層、應用框架層、應用層)安卓架構Linux框架
- EBS:Oracle 資料庫執行慢SQLOracle資料庫SQL
- SAP Netweaver和Hybris的資料庫層資料庫
- 資料庫索引層級資料庫索引
- Oracle 資料庫安全許可權配置標準Oracle資料庫
- oracle資料庫資料字典應用Oracle資料庫
- 庫存系統:應用層、領域層、對接層的架構設計架構
- 2.10.3 使用 Oracle Automatic Storage Management (Oracle ASM) 克隆資料庫OracleASM資料庫
- 庫存系統:倉庫層、排程層、銷售層的庫存資料模型設計模型
- Oracle EBS 資料庫密碼複雜度設定Oracle資料庫密碼複雜度
- 9、如何理解應用層、傳輸層、網路層、鏈路層、物理層
- SpringBoot資料響應、分層解耦、三層架構Spring Boot解耦架構
- 分層架構在資料倉儲的應用架構
- GBASE資料實現資料層面同城雙活之應用
- 來聊聊 應用層
- 應用層協議協議
- Oracle EBS基礎學習:Oracle EBS啟用診斷功能Oracle
- 2.10 克隆資料庫資料庫
- 應用層總結-全球資訊網
- TCP/IP五層模型-應用層-DNS協議TCP模型DNS協議
- Java刷題時常用的標準庫資料結構和相應操作Java資料結構
- TCP應用層協議TCP協議
- Profile標準化資料庫管理資料庫
- Java與資料庫 —— JDBC標準Java資料庫JDBC
- 資料分層 ODS DW DM層級
- 【配置上線】Linux克隆安裝Oracle資料庫軟體LinuxOracle資料庫
- 【資料質量】--認知指標的層次指標
- HashMap原理詳解,包括底層原理HashMap
- 資料庫層面問題解決思路資料庫
- 疊層電感的優點和應用gujing
- 基於"堆"的底層實現和應用
- iOS標準庫中常用資料結構和演算法之KV資料庫iOS資料結構演算法資料庫
- CRM, C4C和SAP Hybris的資料庫層設計資料庫
- Oracle 12.2 新特性:線上PDB資料庫克隆(Pluggable Hot Clone)Oracle資料庫
- # MySQL server 層和儲存引擎層是怎麼互動資料的?MySqlServer儲存引擎
- TCP與應用層協議TCP協議
- HCIA—應用層常用協議協議