BANCO ====== 1. ANTES DO DUPLICATE ======================= ORIGEM ======= cd $ORACLE_HOME/appsutil/scripts/$CONTEXT_NAME perl adpreclone.pl dbTier
RESULTADO DA LOG ================= ############################################################ # StageDBTier Finished at Fri Jul 24 21:08:21 ART 2009 Status: Completed Successfully ############################################################ #
2. dbtier (PEGAR O ARQUIVO GERADO NO ITEM 2 ABAIXO E EXECUTAR ASSIM JA NO DESTINO) ----------unzip -o appsutil.zip -d $ORACLE_HOME
3. PREPARANDO O DUPLICATE ========================== a) ALTERE O PARAMETER FILE
db_file_name_convert= '/u01/oracle/EBS/db/apps_st/data','/u04/db/oradata', '/u02/oracle/EBS/db/apps_st/data','/u04/db/oradata'
e
log_file_name_convert= '/u01/oracle/EBS/db/apps_st/data','/u04/db/oradata'
VALIDANDO O QUE FOI FEITO ACIMA
No sqlplus digite
show parameter convert;
B) CONFIGURE O TNSNAMES COM O BANCO TARGET EBS= (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=hodb004wtr)(PORT=1551)) (CONNECT_DATA= (SID=EBS) ) )
C) CONFIGURE O TNSNAMES COM O BANCO DO RMAN
RMAN = (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=hodb003wtr)(PORT=1729)) (CONNECT_DATA= (SID=RMAN) ) )
D) o parameter file no final adicionar db_file_name_convert= '/u01/oracle/EBS/db/apps_st/data','/u04/db/oradata', '/u02/oracle/EBS/db/apps_st/data','/u04/db/oradata' log_file_name_convert= '/u01/oracle/EBS/db/apps_st/data','/u04/db/oradata'
E) CONECTANDO NO RMAN RMAN> connect target sys/f9v3h1@EBS connected to target database: EBS (DBID=1821636664) RMAN>
RMAN> connect auxiliary / connected to auxiliary database: EBSWB (not mounted)
RMAN> connect catalog rmanebs/rman@rman connected to recovery catalog database RMAN>
SCRIPT DO DUPLICATE ==================== run { allocate auxiliary channel t1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'; set until time "to_date('24 07 2009 20:05:00','DD MM YYYY HH24:MI:SS')"; duplicate target database to "EBSWB" LOGFILE GROUP 1 ( '/u04/db/log/log01b.dbf' ) size 100M reuse, GROUP 2 ( '/u04/db/log/log02b.dbf' ) size 100M reuse, GROUP 3 ( '/u04/db/log/log03b.dbf' ) size 100M reuse; release channel t1; }
F) APĂ&#x201C;S O DUPLICATE cd <RDBMS ORACLE_HOME>/appsutil/clone/bin $ perl adcfgclone.pl dbTechStack
SAIDA DO PERL ============
Log file located at /u04/10.2.0/appsutil/clone/bin/CloneContext_0725011133.log Provide the values required for creation of the new Database Context file. Target System Hostname (virtual or normal) [hodb004wtr] : Target Instance is RAC (y/n) [n] : n Target System Database SID : EBSWB Target System Base Directory : /u04/base Target System utl_file_dir Directory List : /usr/tmp Number of DATA_TOP's on the Target System [3] : 1 Target System DATA_TOP Directory 1 : /u04/db/oradata Target System RDBMS ORACLE_HOME Directory [/u04/base/db/tech_st/10.2.0] : /u04/10.2.0 Target System Archive Log Directory [/u04/db/oradata/archive] : /u04/db/oradata/archive Do you want to preserve the Display [hodb004wtr:0.0] (y/n) ? : y Target System Port Pool [0-99] : 1 Checking the port pool 1 RC-50221: Warning: Port Pool 1 is not free. Please check logfile /u04/10.2.0/appsutil/clone/bin/CloneContext_0725011133.log for conflicts. Target System Port Pool [0-99] : 2 Checking the port pool 2 FINAL ====== Skipping Profile Phase Skipping Apply Phase Completed runAutoConfig...
ApplyDBTechStack Completed Successfully. =========================================== G) CLEAN DAS FILAS
SQL> select node_name from applsys.fnd_nodes; NODE_NAME -----------------------------AUTHENTICATION HOAS006WTR HODB004WTR SQL> conn apps Enter password: Connected.
SQL> exec fnd_conc_clone.setup_clean; PL/SQL procedure successfully completed. SQL> SQL> select node_name from applsys.fnd_nodes; no rows selected
H) CRIAR A LIB ================ $ cd <RDBMS ORACLE_HOME>/appsutil/install/<CONTEXT NAME> $ sqlplus "/ as sysdba" @adupdlib.sql <libext>
cd /u04/10.2.0/appsutil/install/EBSWB_hodb004wtr sqlplus "/ as sysdba" @adupdlib.sql so
SAIDA ========= hodb004wtr[/u04/10.2.0/appsutil/install/EBSWB_hodb004wtr] sqlplus "/ as sysdba" @adupdlib.sql so SQL*Plus: Release 10.2.0.4.0 - Production on Sat Jul 25 01:28:26 2009 Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
PL/SQL procedure successfully completed.
I) DB CONFIG ============== $ cd <RDBMS ORACLE_HOME>/appsutil/clone/bin $ perl adcfgclone.pl dbconfig <Database target context file> Where Database target context file is: <RDBMS ORACLE_HOME>/appsutil/<Target CONTEXT_NAME>.xml. cd /u04/10.2.0/appsutil/ perl adcfgclone.pl dbconfig EBSWB_hodb004wtr.xml
J) AUTOCONFIG NO BANCO ------------------------cd $ORACLE_HOME/appsutil/scripts/<CONTEXT_DB> cd /u04/10.2.0/appsutil/scripts/EBSWB_hodb004wtr ./adautocfg.sh appspass=App54us
APLICACAO ========= ORIGEM ======= 1. PRĂ&#x2030; CLONE ============ cd $INST_TOP/admin/scripts perl adpreclone.pl appsTier
2.Gerar o appsutil pra copiar para o dbtier target perl $AD_TOP/bin/admkappsutil.pl copiar para o dbtier o appsutil.zip gerado 1. COPIA MANUAL DO APPTIER ===========================
tar -cvf /u03/EBS.tar EBS --> isso no /u01
L) CLONE APPSTIER =================
$COMMON_TOP/clone/bin
perl ./adcfgclone.pl appsTier
exemplo =======
Obs:
se ficar no 3% parado execute o procedimento
hodb001wtr[/u03/oracle/CRP3/apps/tech_st/10.1.2/bin] ps -ef | grep opmn | grep ping applcrp3 1958142 1478708 0 18:30:21 pts/1 0:00 /u03/oracle/CRP3/apps/tech_st/10.1.2/opmn/bin/opmn -a -q ping kill -9 1958142
hodb001wtr[/u03/oracle/CRP3/apps/apps_st/comn/clone/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.20.12000000.12 Enter the APPS password :
Running: /u03/oracle/CRP3/apps/apps_st/comn/clone/bin/../jre/bin/java -Xmx600M -cp /u03/oracle/CRP3/apps/apps_st/comn/clone/jlib/java:/u03/oracle/CRP3/apps/apps_st/comn/clone/jlib/xmlpar /jlib/ojdbc14.jar oracle.apps.ad.context.CloneContext -e /u03/oracle/CRP3/apps/apps_st/comn/clone/bin/../co /tmp/adpairsfile_3219602.lst -stage /u03/oracle/CRP3/apps/apps_st/comn/clone 2> /tmp/adcfgclone_321960 Log file located at /u03/oracle/CRP3/apps/apps_st/comn/clone/bin/CloneContext_0823031042.log Provide the values required for creation of the new APPL_TOP Context file. Target System Hostname (virtual or normal) [hodb001wtr] : hodb001wtr Target System Database SID : CRP3 Target System Database Server Node [hodb001wtr] : hodb001wtr Target System Base Directory : /u03/oracle/CRP3/apps/tech_st
Target System Tools ORACLE_HOME Directory [/u03/oracle/CRP3/apps/tech_st/apps/tech_st/10.1.2] : /u03/o
Target System Web ORACLE_HOME Directory [/u03/oracle/CRP3/apps/tech_st/apps/tech_st/10.1.3] : /u03/or
Target System APPL_TOP Directory [/u03/oracle/CRP3/apps/tech_st/apps/apps_st/appl] : /u03/oracle/CRP3/a
Target System COMMON_TOP Directory [/u03/oracle/CRP3/apps/tech_st/apps/apps_st/comn] : /u03/oracle/C Target System Instance Home Directory [/u03/oracle/CRP3/apps/tech_st/inst] : /u03/oracle/CRP3/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 [hoas006wtr:0.0] (y/n) ? : n Target System Display [hodb001wtr:0.0] : :1
RC-00217: Warning: Configuration home directory (s_config_home) evaluates to /u03/oracle/CRP3/inst/apps/ exists and is not empty. Do you want to continue (y/n) ? : y
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] : 3
L) Alterando profile de banner
select * from applsys.fnd_profile_option_values where PROFILE_OPTION_VALUE LIKE '%WTORRE %'; APPLICATION_ID PROFILE_OPTION_ID LEVEL_ID LEVEL_VALUE LAST_UPDA LAST_UPDATED_BY CREATION_ CREATED_BY LAST_UPDATE_LOGIN PROFILE_OPTION_VALUE LEVEL_VALUE_APPLICATION_ID LEVEL_VALUE2 -------------- ----------------- ---------- ----------- --------- --------------- --------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------- -----------0 125 10001 0 05-JUN-09 0 22-JAN-09 0 71538 WTORRE - >>> PRODUCAO <<<
Fazendo o update =====================
update applsys.fnd_profile_option_values set PROFILE_OPTION_VALUE = '>> WTORRE - AMBIENTE HOMOLOGAÇÃO << ' WHERE PROFILE_OPTION_VALUE = 'WTORRE - >>> PRODUCAO <<<';