EBS在線克隆DB和應(yīng)用的實(shí)例分析

這篇文章將為大家詳細(xì)講解有關(guān)EBS在線克隆DB和應(yīng)用的實(shí)例分析,文章內(nèi)容質(zhì)量較高,因此小編分享給大家做個(gè)參考,希望大家閱讀完這篇文章后對(duì)相關(guān)知識(shí)有一定的了解。

創(chuàng)新互聯(lián)主要從事做網(wǎng)站、成都網(wǎng)站制作、網(wǎng)頁(yè)設(shè)計(jì)、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務(wù)。立足成都服務(wù)天峻,十載網(wǎng)站建設(shè)經(jīng)驗(yàn),價(jià)格優(yōu)惠、服務(wù)專(zhuān)業(yè),歡迎來(lái)電咨詢(xún)建站服務(wù):18982081108

本次克隆學(xué)習(xí)到的有1點(diǎn)
只要A數(shù)據(jù)庫(kù)可以正常啟動(dòng),保證A數(shù)據(jù)庫(kù)文件(redo、undo、datafile、archivelog、tempfile)和控制文件不在ORACLE_HOME目錄情況下,
備份好A數(shù)據(jù)庫(kù)的pfile,可以隨便刪除A的ORACLE_HOME并從別的地方拷貝ORACLE_HOME過(guò)來(lái)進(jìn)行軟件克隆操作,軟件克隆過(guò)程中會(huì)產(chǎn)生新的pfile,把原來(lái)的pfile拿過(guò)來(lái)覆蓋就可以了


本次克隆從21.16克隆到128.118,克隆為測(cè)試環(huán)境,所以DB duplicate后測(cè)試環(huán)境關(guān)閉了歸檔
21.16服務(wù)器信息
96CPU、256G、CentOS release 6.5 (Final)、hostname是ebsdba、base是/db/PROD,SID是PROD、數(shù)據(jù)文件路徑/db/prod/db/apps_st/data、oracle用戶(hù)oraprod,應(yīng)用用戶(hù)是applprod
128.118服務(wù)器信息
48CPU、64G、Red Hat Enterprise Linux Server release 5.4 (Tikanga)、hostname是ebsdev、base是/db/DEV,SID是DEV、數(shù)據(jù)文件路徑/db/DEV/db/apps_st/data、oracle用戶(hù)oradev、應(yīng)用用戶(hù)是appldev、ORACLE_HOME是/u01/DEV/db/tech_st/11.2.0/


一:ORACLE軟件克?。ù诉^(guò)程會(huì)生成新的pfile文件,一般克隆時(shí)不需這一步,除非如下兩種情況)
1、新搭建的OS環(huán)境,沒(méi)有安裝ORACLE軟件;
2、DB軟件已經(jīng)安裝好了,并且DB已經(jīng)duplicate好了,但是需要再次克隆軟件,比如DB的數(shù)據(jù)文件目錄和軟件環(huán)境變量DATA_TOP不一樣,比如duplicate過(guò)程中發(fā)現(xiàn)目標(biāo)數(shù)據(jù)庫(kù)的/u02目錄空間不夠,新增了一個(gè)目錄/u03,但是目標(biāo)數(shù)據(jù)庫(kù)的DATA_TOP還是duplicate之前的一個(gè)目錄/u02,此時(shí)DB的pfile要先備份一遍,因?yàn)檐浖寺〉倪^(guò)程中會(huì)生成新的pfile文件

1.
128.118服務(wù)器建立/db/DEV/db/tech_st、/db/DEV/apps、/db/DEV/inst并分別授權(quán)為oradev.dba、appldev.dba、appldev.dba

2.
21.16對(duì)ORACLE_HOME打包
cd /db/prod/db/tech_st
tar -zcvf primy.tar.gz 11.2.0
并把該包拷貝到128.118的/db/DEV/db/tech_st

3.
128.118使用oradev登錄
cd /db/DEV/db/tech_st
tar -zxvf primy.tar.gz
cd /db/DEV/db/tech_st/11.2.0/appsutil/clone/bin
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:/db/DEV/db/tech_st/11.2.0/appsutil/perl
PATH=/u01/DEV/db/tech_st/11.2.0/perl/bin:$PATH
--PERL5LIB,不是代表linux5,所以遇到克隆的目標(biāo)環(huán)境的OS版本為linux6時(shí),不能設(shè)置為PERL6LIB,如果/u01/DEV/db/tech_st/11.2.0/perl/lib/5.10.0目錄不存在,而只存在/u01/DEV/db/tech_st/11.2.0/perl/lib/5.8.3,則先設(shè)置為/u01/DEV/db/tech_st/11.2.0/perl/lib/5.10.0,沒(méi)有報(bào)錯(cuò)不管,遇到報(bào)錯(cuò)再設(shè)置為/u01/DEV/db/tech_st/11.2.0/perl/lib/5.8.3

perl adcfgclone.pl dbTechStack(此過(guò)程會(huì)新建pfile)
Enter the APPS password :
Target System Hostname (virtual or normal) [ebsdev] :
Target Instance is RAC (y/n) [n] :
Target System Database SID : DEV
Target System Base Directory : /u01/DEV
Target System utl_file_dir Directory List : /usr/tmp
Number of DATA_TOP's on the Target System [2] : 1
Target System DATA_TOP Directory 1 : /u01/DEV/db/apps_st/data
Target System RDBMS ORACLE_HOME Directory [/u01/DEV/db/db/tech_st/11.1.0] : /u01/DEV/db/tech_st/11.2.0
Do you want to preserve the Display [0.0] (y/n)  : n
Target System Display [ebsdev:0.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] : 30
--以上,如果數(shù)據(jù)文件存在兩個(gè)目錄,u01和u02,則
Number of DATA_TOP's on the Target System [2] : 2
Target System DATA_TOP Directory 2 : /u01/DEV/db/apps_st/data,/u02/DEV/db/apps_st/data
4.
再重新使用原來(lái)的數(shù)據(jù)庫(kù)pfile備份覆蓋新生成的數(shù)據(jù)庫(kù)pfile

5.oradev的~/.bash_profle增加
. /u01/DEV/db/tech_st/11.2.0/DEV_ebsdev.env


二:數(shù)據(jù)庫(kù)duplicate(查看克隆環(huán)境DB的補(bǔ)丁是否和正式環(huán)境DB的補(bǔ)丁一樣,不一樣,先打好補(bǔ)丁再進(jìn)行克隆)(21.16在27號(hào)重新生成了一個(gè)生命周期5,25號(hào)有個(gè)0級(jí)備份,28號(hào)重新1級(jí)備份了)
1.
nohup rman target sys/XX@prod auxiliary sys/XX@8030_DEV_DUPlICATE cmdfile=duplica_8030_dev_from_backup.rman msglog=duplica_8030_dev_from_backup.log &

duplicate的內(nèi)容如下(使用了生命周期4)
run {
duplicate database PROD incarnation 4 to DEV
pfile=/ebsbak/rmanbackup/duplicate/initDEV.ora
db_file_name_convert=('/db/prod/db/apps_st/','/u01/DEV/db/apps_st/')
LOGFILE
  '/u01/DEV/db/apps_st/data/log01.dbf' size 1024M,
  '/u01/DEV/db/apps_st/data/log02.dbf' size 1024M,
  '/u01/DEV/db/apps_st/data/log03.dbf' size 1024M
NOFILENAMECHECK UNTIL TIME "TO_DATE('2016-11-29 10:00:00','YYYY-MM-DD hh34:mi:ss')";
}

2.重建tempfile
alter  tablespace temp1 drop tempfile '/u01/DEV/db/apps_st/data/temp01.dbf';
alter  tablespace temp1 drop tempfile '/u01/DEV/db/apps_st/data/temp03.dbf';
alter tablespace temp1 add tempfile '/u01/DEV/db/apps_st/data/temp01.dbf';
alter database tempfile '/u01/DEV/db/apps_st/data/temp01.dbf' autoextend on next 64m maxsize 8g;
alter tablespace temp1 add tempfile '/u01/DEV/db/apps_st/data/temp03.dbf';
alter database tempfile '/u01/DEV/db/apps_st/data/temp03.dbf' autoextend on next 64m maxsize 8g;
alter  tablespace temp1 drop tempfile '/u01/DEV/db/apps_st/data/temp05.dbf';
alter tablespace temp1 add tempfile '/u01/DEV/db/apps_st/data/temp05.dbf';
alter database tempfile '/u01/DEV/db/apps_st/data/temp05.dbf' autoextend on next 64m maxsize 8g;

alter  tablespace temp2 drop tempfile '/u01/DEV/db/apps_st/data/temp02.dbf';
alter  tablespace temp2 drop tempfile '/u01/DEV/db/apps_st/data/temp04.dbf';
alter tablespace temp2 add tempfile '/u01/DEV/db/apps_st/data/temp02.dbf';
alter database tempfile '/u01/DEV/db/apps_st/data/temp02.dbf' autoextend on next 64m maxsize 8g;
alter tablespace temp2 add tempfile '/u01/DEV/db/apps_st/data/temp04.dbf';
alter database tempfile '/u01/DEV/db/apps_st/data/temp04.dbf' autoextend on next 64m maxsize 8g;
alter  tablespace temp2 drop tempfile '/u01/DEV/db/apps_st/data/temp06.dbf';
alter tablespace temp2 add tempfile '/u01/DEV/db/apps_st/data/temp06.dbf';
alter database tempfile '/u01/DEV/db/apps_st/data/temp06.dbf' autoextend on next 64m maxsize 8g;

3.關(guān)閉歸檔


三:數(shù)據(jù)庫(kù)克隆配置(此過(guò)程會(huì)修改數(shù)據(jù)庫(kù)pfile文件,所以要用備份pfile覆蓋新生成的pfile)
1.
cd $ORACLE_HOME/appsutil/install/DEV_ebsdev
sqlplus "/ as sysdba" @adupdlib.sql 'so'

2.
cd $ORACLE_HOME/appsutil/clone/bin
mv /u01/DEV/db/tech_st/11.2.0/bin/unzip /u01/DEV/db/tech_st/11.2.0/bin/unzip_6.00
scp orapft@192.168.3.1:/u03/PFT/db/tech_st/11.2.0/bin/unzip $ORACLE_HOME/bin/
which unzip必須是來(lái)自$ORACLE_HOME/bin/unzip
which perl必須是來(lái)自$ORACLE_HOME/perl/bin/perl
--Unzip必須5.52(or higher),但是不能高于6.0

perl adcfgclone.pl dbconfig $ORACLE_HOME/appsutil/DEV_ebsdev.xml(此過(guò)程必須使用到$ORACLE_HOME/bin/unzip,不會(huì)使用/usr/bin/unzip)
Enter the APPS password :

3.重新使用原來(lái)的數(shù)據(jù)庫(kù)pfile備份覆蓋新生成的數(shù)據(jù)庫(kù)pfile


四:應(yīng)用克隆(使用應(yīng)用用戶(hù)appldev)
1.
21.16對(duì)應(yīng)用目錄/app/prod/apps、 /app/prod/inst打包
cd /app/prod
tar -zcvf prod_erp_20161126.tar.gz apps inst
并把該包拷貝到128.118的/u01/DEV

128.118解壓應(yīng)用包
cd /db/DEV
tar -zxvf prod_erp_20161126.tar.gz

2.(最后一步不用啟動(dòng)應(yīng)用)
cd /u01/DEV/apps/apps_st/comn/clone/bin
perl adcfgclone.pl appsTier(不需要使用自己的/u01/NPS/apps/tech_st/10.1.3/perl/bin/perl,自己找到/usr/bin/perl)

Enter the APPS password :
Target System Hostname (virtual or normal) [ebsdev] :
Target System Database SID : DEV
Target System Database Server Node [ebsdev] :
Target System Database Domain Name [huaqin.com] :
Target System Base Directory : /u01/DEV
Target System Tools ORACLE_HOME Directory [/u01/DEV/apps/tech_st/10.1.2] :
Target System Web ORACLE_HOME Directory [/u01/DEV/apps/tech_st/10.1.3] :
Target System APPL_TOP Directory [/u01/DEV/apps/apps_st/appl] :
Target System COMMON_TOP Directory [/u01/DEV/apps/apps_st/comn] :
Target System Instance Home Directory [/u01/DEV/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 [proderp:0.0] (y/n)  : n
Target System Display [ebsdev:0.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] : 30

Checking the port pool 30
done: Port Pool 30 is free
Report file located at /u01/DEV/inst/apps/DEV_ebsdev/admin/out/portpool.lst
Complete port information available at /u01/DEV/inst/apps/DEV_ebsdev/admin/out/portpool.lst

UTL_FILE_DIR on database tier consists of the following directories.

1. /usr/tmp
2. /u01/DEV/db/tech_st/11.2.0/appsutil/outbound/DEV_ebsdev
Choose a value which will be set as APPLPTMP value on the target node [1] : 1
...
Completed Apply...
Mon Feb 26 16:59:27 2018
Do you want to startup the Application Services for NAS? (y/n) [y] : n
Services not started


3.appldev的~/.bash_profle增加
. /u01/DEV/apps/apps_st/appl/APPSDEV_ebsdev.env


五:收尾工作(應(yīng)用沒(méi)有啟動(dòng)的情況下)
1.
數(shù)據(jù)庫(kù)修改信息(修改system的密碼)
su - oradev
sqlplus / as sysdba
alter user system identified by kkk;

2.
應(yīng)用修改信息
su - appldev
source ~/.bash_profile
vi $AF_JRE_TOP/lib/xdo.cfg修改path路徑
vi $FORMS_WEB_CONFIG_FILE增加archive2=,/OA_JAVA/hand.jar.sig

3.修改目標(biāo)測(cè)試環(huán)境的所有ERP相關(guān)的數(shù)據(jù)庫(kù)用戶(hù)密碼為yyy,包括apps用戶(hù)的密碼也從原來(lái)的xxx修改為yyy
FNDCPASS apps/xxx 0 Y system/kkk SYSTEM APPLSYS yyy
FNDCPASS apps/yyy 0 Y system/kkk ALLORACLE yyy

4.
sqlplus apps/apps
update FND_FORM_FUNCTIONS_TL set user_function_name='8030 ERP測(cè)試' where function_id=20569;
commit;
UPDATE fnd_concurrent_requests SET phase_code ='C', status_code = 'X' WHERE phase_code ='P';
COMMIT;

5.
cd ~
sqlplus apps/apps
@cmclean.sql  --這個(gè)動(dòng)作絕對(duì)不能在正式環(huán)境操作

6.
--如果開(kāi)啟了asadmin功能的話,配置asadmin的密碼xxx
vi $INST_TOP/ora/10.1.3/j2ee/oafm/config/system-jazn-data.xml修改ASADMIN對(duì)應(yīng)的credentials值為!XXX

7.
如果源端和目標(biāo)端的OS版本不一樣的話,需要做如下兩句
After installation, users must update the stub libraries in the 10.1.2 and 10.1.3 Oracle Homes using the patch 12415211. In following the instructions below, please note that Opatch should not be used to install this patch.
Users must specifically copy the files in the patch to the specified directories as follows for the 10.1.2 Oracle Home:
$ cd <12.1_INSTALL_DIR>/apps/tech_st/10.1.2/lib
$ cp -p -R stubs stubsORIG
$ cd stubs
$ cp /12415211/files/lib/stubs/libgcc_s-2.3.2-stub.so .
$ ln -s libgcc_s-2.3.2-stub.so libgcc_s.so.1
$ ln -s libgcc_s.so.1 libgcc_s.so
After this is done and sourcing the APPS.env file, users should relink all 10.1.2 executables by running the $ORACLE_HOME/appsutil/clone/adlnktools.sh script and ensuring that there are now no errors in the make log file output from the script.

The instructions for the 10.1.3 Oracle Home are:
$ cd <12.1_INSTALL_DIR>/apps/tech_st/10.1.3/lib
$ cp -p -R stubs stubsORIG
$ cd stubs
$ cp /12415211/files/lib/stubs/libgcc_s-2.3.2-stub.so .
$ ln -s libgcc_s-2.3.2-stub.so libgcc_s.so.1
$ ln -s libgcc_s.so.1 libgcc_s.so
After this, users should relink sqlplus by running the /apps/tech_st/10.1.3/appsutil/clone/adlnkweboh.sh script and ensuring that there are now no errors in the make log file output from the script.


8.啟動(dòng)ERP
su - appldev
cd $ADMIN_SCRIPTS_HOME
./adstrtal.sh apps/apps

9.
配置ASADMIN集成SOA網(wǎng)關(guān)的
find $APPL_TOP -name "soagenerate.sh"
/u01/DEV/apps/apps_st/appl/fnd/12.0.0/bin/soagenerate.sh
cd /u01/DEV/apps/apps_st/appl/fnd/12.0.0/bin
soagenerate.sh irepname=CUX_FND_MSG_CALL_CENTER_PKG

登錄ERP的WEB頁(yè)面,看上面第6步的配置是否正常
asadmin/XXX
集成SOA網(wǎng)關(guān)-集成信息庫(kù)-CUX Developer-CUX Developer-CUX Developer-SOAP Web服務(wù)-查看WSDL-點(diǎn)擊出現(xiàn)頁(yè)面就可以了

10.
進(jìn)入窗口修改如下信息
ERP--配置文件--系統(tǒng)--配置文件框中輸入%地點(diǎn)名%--點(diǎn)擊查找--把地點(diǎn)修改為XX測(cè)試環(huán)境(8030) 2016-11-18
ERP--配置文件--系統(tǒng)--配置文件框中輸入%Java 色彩設(shè)計(jì)%--點(diǎn)擊查找--把地點(diǎn)選擇為紫色





備注
如果是現(xiàn)有應(yīng)用要改服務(wù)器名,改域名,改db_name,改端口,執(zhí)行步驟如下
1、數(shù)據(jù)庫(kù)軟件克隆
2、數(shù)據(jù)庫(kù)重建控制文件修改db_name,把數(shù)據(jù)庫(kù)拉起來(lái),增加tempfile
3、數(shù)據(jù)庫(kù)克隆
4、應(yīng)用克隆

如果是duplicate到目標(biāo)服務(wù)器,目標(biāo)服務(wù)器要改服務(wù)器名,改域名,改db_name,改端口,執(zhí)行步驟如下
1、duplicate目標(biāo)服務(wù)器后,再目前服務(wù)器拉起數(shù)據(jù)庫(kù)
2、數(shù)據(jù)庫(kù)軟件克隆
3、數(shù)據(jù)庫(kù)重建控制文件修改db_name,把數(shù)據(jù)庫(kù)拉起來(lái),增加tempfile
4、數(shù)據(jù)庫(kù)克隆
5、應(yīng)用克隆

關(guān)于EBS在線克隆DB和應(yīng)用的實(shí)例分析就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,可以學(xué)到更多知識(shí)。如果覺(jué)得文章不錯(cuò),可以把它分享出去讓更多的人看到。

分享文章:EBS在線克隆DB和應(yīng)用的實(shí)例分析
轉(zhuǎn)載注明:http://muchs.cn/article26/pdpijg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供外貿(mào)建站、網(wǎng)站排名、品牌網(wǎng)站制作靜態(tài)網(wǎng)站、微信公眾號(hào)自適應(yīng)網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

外貿(mào)網(wǎng)站建設(shè)