EBS RAC One Node on Oracle Database Appliance

I will be creating Oracle Home on Oracle Database Appliance bare metal infrastructure.

Soruce Database Tier – run adpreclone.pl dbTier

Soruce Application Tier – run adpreclone.pl appsTier

Database Migration to Oracle Database Appliance (Single >>> RAC OneNode)

create oracle_home using odacli

odacli create-database -n ADT -cl OLTP -s odb16 -dh dce00acd-ea37-4949-8e60-d49b767dfceb -y RACONE -r ACFS -m

-dh : Oracle Home ID, you can obtained this by running odacli list-dbhomes

-y RACONE   (SI, RAC, RACONE)

-r ACFS  : We will be playing around with gDBClone utility in the future, So ACFS is a must.

Once odacli create-database command is finish, soruce ADT environment

srvctl stop database -d ADT

SQL> create pfile=’/u02/app/oracle/oradata/ADT/dbs/initADT.ora’ from spfile=’/u02/app/oracle/oradata/ADT/dbs/spfileADT.ora’;

Use ASMCA to resize /dev/asm/datadt-196 from DEFAULT 100GB to  1400GB (1.4TB) at least.

Remove datafile and controlfile created by odacli command

/u02/app/oracle/oradata/ADT/ADT/datafile
/u03/app/oracle/fast_recovery_area/ADT/archivelog
/u03/app/oracle/fast_recovery_area/ADT/controlfile
/u04/app/oracle/redo/ADT/onlinelog
/u04/app/oracle/redo/ADT/controlfile

Using odacli created database as a shell database is a better way to migrate the database to ODA since odacli create-database command also register database with cluster.

Create ADT_1_zsc-oda0-0 directory under $ORACLE_HOME/network/admin

export TNS_ADMIN=/u01/app/oracle/product/12.1.0.2/dbhome_13/network/admin/ADT_1_zsc-oda0-0

tnsnames.ora under TNS_ADMIN, ensure you have tns alias for source database

source = (DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=source-host)(PORT=1521))
(CONNECT_DATA=(SID=source))
)

listener.ora under $TNS_ADMIN (Create database listener from database Oracle Home)

ADT =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= TCP)(Host= target-host )(Port= 1581))
)
SID_LIST_ADT =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME= /u01/app/oracle/product/12.1.0.2/dbhome_13)
(SID_NAME = ADT)
)
)

sqlnet.ora under $TNS_ADMIN

###############################################################
NAMES.DIRECTORY_PATH=(TNSNAMES, ONAMES, HOSTNAME)
SQLNET.EXPIRE_TIME= 10
SQLNET.INBOUND_CONNECT_TIMEOUT =120
SQLNET.ALLOWED_LOGON_VERSION_SERVER=10
IFILE=/u01/app/oracle/product/12.1.0.2/dbhome_13/network/admin/ADT_1_zsc-oda0-0/sqlnet_ifile.ora
 Source database – source
 Target database – ADT
initADT.ora
[oracle@zsc-oda0-0 dbs]$ cat initADT.ora
*.audit_file_dest='/u01/app/oracle/admin/ADT/adump'
*._adg_parselock_timeout=500# dataguard editioning fix
*._b_tree_bitmap_plans=FALSE#MP
*._direct_read_decision_statistics_driven=FALSE#Sales order analysis fallout from 11.1.0.7 to 11.2.0.4 RDBMS upgrade
*._fast_full_scan_enabled=FALSE#MP
*._gby_hash_aggregation_enabled=FALSE
*._kghdsidx_count=2
*._kks_obsolete_dump_threshold=0
*._like_with_bind_as_equality=TRUE#MP
*._memory_broker_shrink_java_heaps=0
*._mv_refresh_use_stats=FALSE
*._optimizer_autostats_job=false#MP Turn off automatic statistics.
*._pga_max_size=2147483648
*._sort_elimination_cost_ratio=5#MP
*._system_trig_enabled=TRUE#MP
*._trace_files_public=TRUE
*.aq_tm_processes=4
*.archive_lag_target=0
*.audit_trail='none'#TRUE/Uncomment if you want to enable audit_trail.
*.cluster_database=FALSE#MP
*.compatible='12.1.0'#MP
*.control_files='/u04/app/oracle/redo/ADT/controlfile/ADT_control1.ctl','/u03/app/oracle/fast_recovery_area/ADT/controlfile/ADT_control2.ctl','/u02/app/oracle/oradata/ADT/controlfile/ADT_control3.ctl'
*.cursor_sharing='exact'#MP
*.db_block_checking='TRUE'# Oracle recommends FALSE, do this for the advanced compression bug
*.db_block_checksum='TRUE'
*.db_block_size=8192
*.db_create_file_dest='/u02/app/oracle/oradata/ADT'
*.db_create_online_log_dest_1='/u04/app/oracle/redo/'
*.db_files=1000# Max. no. of database files
*.db_name='ADT'
*.db_unique_name='ADT'
*.db_writer_processes=1
*.dg_broker_config_file1='/u02/app/oracle/oradata/ADT/dbs/dr1ADT.dat'
*.dg_broker_config_file2='/u02/app/oracle/oradata/ADT/dbs/dr2ADT.dat'
*.dg_broker_start=TRUE
*.db_recovery_file_dest='/u03/app/oracle/fast_recovery_area/'
*.db_recovery_file_dest_size=174080m
*.diagnostic_dest='/u01/app/oracle'
*.disk_asynch_io=true
*.dml_locks=10000
*.event='16717701 trace name context forever, level 104887600'# dataguard fix
*.filesystemio_options='SETALL'
*.inmemory_size=8589934592
*.job_queue_processes=10
*.local_listener='ADT_LOCAL'
*.log_archive_config='dg_config=(ADT,ADTDG)'
*.log_archive_dest_1='location=use_db_recovery_file_dest valid_for=(all_logfiles,all_roles) db_unique_name=ADT'
*.log_archive_dest_3='service="SOURCEDGODA"','ASYNC NOAFFIRM delay=0 optional compression=disable max_failure=0 max_connections=1 reopen=300 db_unique_name="PRODDG2" net_timeout=30','valid_for=(online_logfile,all_roles)'
*.log_archive_dest_state_1='enable'
*.log_archive_dest_state_3='defer'
*.log_archive_format='ADT%T%R__%s.arc'
*.log_archive_max_processes=4
*.log_archive_min_succeed_dest=1
*.log_buffer=10485760
*.log_checkpoint_interval=100000
*.log_checkpoint_timeout=1200# Checkpoint at least every 20 mins.
*.log_checkpoints_to_alert=TRUE
*.max_dump_file_size='unlimited'#Limit default trace file size to10 MB.
*.nls_comp='binary'# MP
*.nls_date_format='DD-MON-RR'# MP
*.nls_length_semantics='BYTE'# MP
*.nls_numeric_characters='.,'
*.nls_sort='binary'# MP
*.nls_territory='america'
*.o7_dictionary_accessibility=FALSE#MP
*.olap_page_pool_size=4194304
*.open_cursors=1600#Consumes process memory, unless using MTS.
*.optimizer_adaptive_features=FALSE#MP
*.optimizer_secure_view_merging=false#MP
*.parallel_force_local=TRUE#MP
*.parallel_max_servers=8# Max. value should be 2 x no. of CPUs.
*.parallel_min_servers=0
*.pga_aggregate_limit=0#MP
*.pga_aggregate_target=42949672960
*.plsql_code_type='native'#Uncomment if you want to use NATIVE compilation.
*.pre_page_sga=true
*.processes=3200# Max. no. of users.
*.recyclebin='off'
*.remote_login_passwordfile='EXCLUSIVE'
*.remote_os_roles=false
*.resource_limit=TRUE
*.resource_manager_plan='ERP_BI_PLAN'
*.sec_case_sensitive_logon=false#We may need to get rid of thisparameter soon
*.service_names='ADT','ebs_patch','ADT.fully qualify domain'
*.session_cached_cursors=500
*.sessions=64002 x no. of processes.
*.sga_max_size=64G
*.sga_target=64G
*.shared_pool_size=0
*.smtp_out_server='smtp.myoraclejourney.com'
*.standby_archive_dest=''
*.standby_file_management='AUTO'
*.temp_undo_enabled=FALSE
*.undo_management='AUTO'#MP
*.undo_tablespace='APPS_UNDOTS1'
*.utl_file_dir='/usr/tmp','/usr/tmp','/scratch/transfer/','/scratch/transfer/IREAIB/','/usr/tmp'
*.workarea_size_policy='AUTO'#MP

create spfile=’/u02/app/oracle/oradata/ADT/dbs/spfileADT.ora’ from pfile=’/u02/app/oracle/oradata/ADT/dbs/initADT.ora’;

startup nomount

There are multiple ways to move the database to Target host.

Active dataguard from source -> ADT, then failover

  • Pros : less down time
  • Cons : more configurations involved. I’m also not sure if you can leverage active dataguard, if you don’t own active dataguard license.

Conventional RMAN Dupe

  • Pros : Simpler, Straightforward
  • Cons : Required more down time
rman auxiliary / target /@source
Recovery Manager: Release 12.1.0.2.0 - Production on Mon Oct 109:09:09 2018
Copyright (c) 19822014, Oracle and/or its affiliates.  All rights reserved.
connected to target database: soruce (DBID=4098162468)
connected to auxiliary database: ADT (not mounted)

run
{
set until time “to_date(’10/01/2018 05:00:00′,’MM/DD/YYYY HH24:MI:SS’)”;
allocate auxiliary channel d1 type disk;
allocate auxiliary channel d2 type disk;
allocate auxiliary channel d3 type disk;
allocate auxiliary channel d4 type disk;
duplicate target database to ‘ADT’ nofilenamecheck;
}

Open another SSH to track of RMAN restore progress

 SET LINE 132

SELECT opname, round(sofar/totalwork*100) “% Complete”
  FROM gv$session_longops
 WHERE opname LIKE ‘RMAN%’
   AND totalwork != 0
   AND sofar totalwork
 ORDER BY 1;

OPNAME % Complete
—————————————————————- ———-
RMAN: aggregate input 51
RMAN: full datafile restore 19
RMAN: full datafile restore 86
RMAN: full datafile restore 56
RMAN: full datafile restore 43
.......
datafile 410 switched to datafile copy
input datafile copy RECID=154 STAMP=988373006 file name=/u02/app/oracle/oradata/ADT/ADT/datafile/o1_mf_apps_ts__fv4h98mb_.dbf
Reenabling controlfile options for auxiliary database
Executing: alter database force logging
Executing: alter database enable block change tracking
contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script
database opened
Finished Duplicate Db at 01-OCT-18

alter system set cluster_database=true scope=spfile;

create undo tablespace APPS_UNDOTS2;

alter system set undo_tablespace=’APPS_UNDOTS1′ sid=’ADT_1′ scope=spfile;

alter system set undo_tablespace=’APPS_UNDOTS2′ sid=’ADT_2′ scope=spfile;

alter system set thread=1 sid=’ADT_1′ scope=spfile;

alter system set thread=2 sid=’ADT_2′ scope=spfile;

set echo off
set feedback off
set linesize 120
set pagesize 35
set trim on
set trims on
set lines 120
col group# format 999
col thread# format 999
col member format a60 wrap
col status format a10
col archived format a10
col fsize format 999 heading "Size (MB)"
select l.group#, l.thread#,f.member,l.archived, l.status, (bytes/1024/1024) fsize from v$log l, v$logfile f where f.group# = l.group# order by 1,2;
GROUP# THREAD# MEMBER                                                       ARCHIVED   STATUS     Size (MB)
------ ------- ------------------------------------------------------------ ---------- ---------- ---------
    31       1 /u04/app/oracle/redo/ADT/onlinelog/o1_mf_31_fv4kbs2y_.log    NO         CURRENT          100
    32       1 /u04/app/oracle/redo/ADT/onlinelog/o1_mf_32_fv4kbs5x_.log    YES        UNUSED           100
    33       1 /u04/app/oracle/redo/ADT/onlinelog/o1_mf_33_fv4kbs8y_.log    YES        UNUSED           100
    34       1 /u04/app/oracle/redo/ADT/onlinelog/o1_mf_34_fv4kbsd3_.log    YES        UNUSED           100

 

alter database add logfile thread 2 group 35;

 

alter database add logfile thread 2 group 36;

 

alter database add logfile thread 2 group 37;

 

alter database add logfile thread 2 group 38;

 

alter database enable thread 2;

 

GROUP# THREAD# MEMBER                                                       ARCHIVED   STATUS     Size (MB)
------ ------- ------------------------------------------------------------ ---------- ---------- ---------
31       1 /u04/app/oracle/redo/ADT/onlinelog/o1_mf_31_fv4kbs2y_.log    NO         CURRENT          100
32       1 /u04/app/oracle/redo/ADT/onlinelog/o1_mf_32_fv4kbs5x_.log    YES        UNUSED           100
33       1 /u04/app/oracle/redo/ADT/onlinelog/o1_mf_33_fv4kbs8y_.log    YES        UNUSED           100
34       1 /u04/app/oracle/redo/ADT/onlinelog/o1_mf_34_fv4kbsd3_.log    YES        UNUSED           100
35       2 /u04/app/oracle/redo/ADT/onlinelog/o1_mf_35_fv4o845s_.log    YES        INACTIVE         100
36       2 /u04/app/oracle/redo/ADT/onlinelog/o1_mf_36_fv4o87hs_.log    YES        UNUSED           100
37       2 /u04/app/oracle/redo/ADT/onlinelog/o1_mf_37_fv4o8bf9_.log    YES        UNUSED           100
38       2 /u04/app/oracle/redo/ADT/onlinelog/o1_mf_38_fv4o8fp9_.log    YES        UNUSED           100

 

 

 

srvctl stop database -d ADT create pfile=’/u02/app/oracle/oradata/ADT/dbs/initADT.ora’ from spfile=’/u02/app/oracle/oradata/ADT/dbs/spfileADT.ora’;     (sanity check  to make sure enabling cluster related parameters are in spfile, this will also serves as backup) Source ADT environment, export ORACLE_SID=ADT_1 startup the database

SQL> show parameter instance
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
active_instance_count                integer
cluster_database_instances           integer     2
instance_groups                      string
instance_name                        string      ADT_1
instance_number                      integer     1
instance_type                        string      RDBMS
open_links_per_instance              integer     4
parallel_instance_group              string
parallel_server_instances            integer     2

shutdown the database

Source ADT environment, export ORACLE_SID=ADT_2

startup the database

SQL> show parameter instance
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
active_instance_count                integer
cluster_database_instances           integer     2
instance_groups                      string
instance_name                        string      ADT_2
instance_number                      integer     2
instance_type                        string      RDBMS
open_links_per_instance              integer     4
parallel_instance_group              string
parallel_server_instances            integer     2

OPTIONAL: shutdown instance 2 and startup instance 1

At this point We have RAC ONE Node EBS database

EBS autoconfig configuration

To clarify something, there are two possible options that could happen,

Option 1 : You are Cloning both database and Front End

Option 2 : You are migrating database from Single Instance to RAC, with Front-End still intact

I will be doing Option 1.
as apps user

SQL> exec fnd_conc_clone.setup_clean;     (applsys.FND_OAM_CONTEXT_FILES is empty)

scp -r source database-home@source-host:/$ORACLE_HOME/appsutil/* $ORACLE_HOME/appsutil/.

cd $ORACLE_HOME/appsutil/     (symbolic link jre or actual jre directory exists under $ORACLE_HOME/appsutil/ and $ORACLE_HOME/appsutil/clone)

tar -xvzf /scratch/Software/oracle/12c/12.1.0.2/jre8/8u151/jre-8u151-linux-x64.tar.gz

ln -s jre1.8.0_151/ jre

Following environment parameters are set

echo $ORACLE_HOME
/u01/app/oracle/product/12.1.0.2/dbhome_13
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/u01/app/oracle/product/12.1.0.2/dbhome_13/ctx/lib/
echo $ORACLE_SID
ADT_1
echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/u01/app/oracle/product/12.1.0.2/dbhome_13/bin:/home/oracle/bin
perl /u01/app/oracle/product/12.1.0.2/dbhome_13/nls/data/old/cr9idata.pl
Creating directory /u01/app/oracle/product/12.1.0.2/dbhome_13/nls/data/9idata ...
Copying files to /u01/app/oracle/product/12.1.0.2/dbhome_13/nls/data/9idata...
Copy finished.
Please reset environment variable ORA_NLS10 to /u01/app/oracle/product/12.1.0.2/dbhome_13/nls/data/9idata!
export ORA_NLS10=/u01/app/oracle/product/12.1.0.2/dbhome_13/nls/data/9idata
export TNS_ADMIN=/u01/app/oracle/product/12.1.0.2/dbhome_13/network/admin/ADT_1_zsc-oda0-0

Ensure each instance local_listener is set in the database and in tnsnames.ora

ADT_1 instance  :  ADT_1_LOCAL

ADT_2 instance : ADT_2_LOCAL

(alter system set local_listener='ADT_1_LOCAl'scope=both sid='ADT_1';)

SQL> alter system set remote_listener=’ADT_REMOTE’ scope=both;   (if you haven’t done it yet)

Temporary listener.ora configuration
ADT =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= TCP)(Host= host0-vip )(Port= 1581))
)
SID_LIST_ADT =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME= /u01/app/oracle/product/12.1.0.2/dbhome_13)
(SID_NAME = ADT_1)
)
)
tnsnames.ora
ADT =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = host0-vip)(PORT = 1581))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ADT.fully qualify domain)    
)
)
ADT_1_LOCAL=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=host0-vip)(PORT=1581))
)
ADT_REMOTE=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=scan address)(PORT=1521))
(ADDRESS=(PROTOCOL=tcp)(HOST=scan address)(PORT=1521))
)
)
start the database listener ADT, Sanity check
lsnrctl status ADT
All the other  serives from database parameter will register with thislistener EVENTUALLY
Connecting to (ADDRESS=(PROTOCOL=TCP)(Host=host0.vip)(Port=1581))
STATUS of the LISTENER
------------------------
Alias                     ADT
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                03-OCT-2018 14:44:20
Uptime                    0 days 0 hr. 0 min. 48 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.1.0.2/dbhome_13/network/admin/ADT_1_zsc-oda0-0/listener.ora
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ip)(PORT=1581)))
Services Summary...
Service "ADT" has 1 instance(s).
Instance "ADT_1", status READY, has 4 handler(s) for thisservice...
Service "ADT.fully qualify domain" has 1 instance(s).
Instance "ADT_1", status READY, has 4 handler(s) for thisservice...
Service "ADT_1" has 1 instance(s).
Instance "ADT_1", status UNKNOWN, has 1 handler(s) for thisservice...
Service "ADT_racone" has 1 instance(s).
Instance "ADT_1", status READY, has 4 handler(s) for thisservice...
Service "ebs_patch" has 1 instance(s).
Instance "ADT_1", status READY, has 4 handler(s) for thisservice...
The command completed successfully

sqlnet.ora

###############################################################
#
# Do not edit settings in this file manually. They are managed
# automatically and will be overwritten when AutoConfig runs.
# For more information about AutoConfig, refer to the Oracle
# E-Business Suite Setup Guide.
#
#$Header: NetServiceHandler.java 120.28.12020000.8 2016/03/3011:22:32 kmandal ship $
#
###############################################################
NAMES.DIRECTORY_PATH=(TNSNAMES, ONAMES, HOSTNAME)
SQLNET.EXPIRE_TIME= 10
SQLNET.INBOUND_CONNECT_TIMEOUT =60
SQLNET.ALLOWED_LOGON_VERSION_SERVER=8
tcp.invited_nodes=(host0,host0-vip,host1,host1-vip)
IFILE=/u01/app/oracle/product/12.1.0.2/dbhome_13/network/admin/ADT_1_zsc-oda0-0/sqlnet_ifile.ora
Create database CONTEXT_FILE

perl /u01/app/oracle/product/12.1.0.2/dbhome_13/appsutil/bin/adbldxml.pl

Starting context file generation for db tier.. Using JVM from /u01/app/oracle/product/12.1.0.2/dbhome_13/appsutil/jre/bin/java to execute java programs.. APPS Password:
The log file for this adbldxml session is located at: /u01/app/oracle/product/12.1.0.2/dbhome_13/appsutil/log/adbldxml_10020850.log
Enter Database Service Name: ADT.fully qualify domain
Do you want to enable SCAN addresses[N]:
The context file has been created at: /u01/app/oracle/product/12.1.0.2/dbhome_13/appsutil/ADT_1_zsc-oda0-0.xml
Once context file is created under $ORACLE_HOME/appsutil
make the following changes to the following parameters
<host oa_var="s_virtual_hostname">host0 to <host oa_var="s_virtual_hostname">host0-vip
<DB_LISTENER oa_var="s_db_listener"> to <DB_LISTENER oa_var="s_db_listener">ADT

$ORACLE_HOME/oraInst.loc  (Change from Global to Local)

#Oracle Installer Location File Location
#Wed Sep 05 14:13:36 EDT 2018
inst_group=oinstall
#inventory_loc=/u01/app/oraInventory (DEFAULT)
inventory_loc=/u01/app/oracle/product/12.1.0.2/dbhome_13/oraInventory (CHANGE)
Also rip out the information relating to this particular oracle home (dbhome_13) from original /u01/app/oraInventory/ContentsXML/inventory.xml
 Run adcfgclone dbTechStack

perl /u01/app/oracle/product/12.1.0.2/dbhome_13/appsutil/clone/bin/adcfgclone.pl dbTechStack /u01/app/oracle/product/12.1.0.2/dbhome_13/appsutil/ADT_1_zsc-oda0-0.xml

sqlplus / as sysdba @/u01/app/oracle/product/12.1.0.2/dbhome_13/appsutil/install/ADT_1_zsc-oda0-0/adupdlib.sql so

Make the following changes under $ORACLE_HOME/network/admin

Node 0

echo IFILE=/u01/app/oracle/product/12.1.0.2/dbhome_13/network/admin/ADT_1_zsc-oda0-0/tnsnames.ora>>tnsnames.ora

echo IFILE=/u01/app/oracle/product/12.1.0.2/dbhome_13/network/admin/ADT_1_zsc-oda0-0/listener.ora>>listener.ora

echo IFILE=/u01/app/oracle/product/12.1.0.2/dbhome_13/network/admin/ADT_1_zsc-oda0-0/sqlnet.ora>>sqlnet.ora

Node 1

echo IFILE=/u01/app/oracle/product/12.1.0.2/dbhome_13/network/admin/ADT_2_zsc-oda0-1/tnsnames.ora >> tnsnames.ora

echo IFILE=/u01/app/oracle/product/12.1.0.2/dbhome_13/network/admin/ADT_2_zsc-oda0-1/listener.ora >> listener.ora

echo IFILE=/u01/app/oracle/product/12.1.0.2/dbhome_13/network/admin/ADT_2_zsc-oda0-1/sqlnet.ora >> sqlnet.ora

[oracle@zsc-oda0-1 admin]$ srvctl relocate database -d ADT -n zsc-oda0-0   

Relocate database at will between node0 and node1

Node 1 Configuration

Add following to /etc/oraab file ADT:/u01/app/oracle/product/12.1.0.2/dbhome_13:N
source ADT environment
export ORACLE_SID=ADT_2
cd $ORACLE_HOME/network/admin 
mkdir ADT_2_zsc-oda0-1
export TNS_ADMIN=/u01/app/oracle/product/12.1.0.2/dbhome_13/network/admin/ADT_2_zsc-oda0-1/
scp -r appsutil directory fom SOURCE database home
Ensure $ORACLE_HOME/appsutil and $ORACLE_HOME/appsutil/clone has smbolic link for jre or actual jre diretory
tar -xvzf /scratch/Software/oracle/12c/12.1.0.2/jre8/8u151/jre-8u151-linux-x64.tar.gz
ln -s jre1.8.0_151/ jr
Ensure following envorinment variables are set
echo $ORACLE_HOME
/u01/app/oracle/product/12.1.0.2/dbhome_13
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/u01/app/oracle/product/12.1.0.2/dbhome_13/ctx/lib/
echo $ORACLE_SID
ADT_2
echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/u01/app/oracle/product/12.1.0.2/dbhome_13/bin:/home/oracle/bin
perl /u01/app/oracle/product/12.1.0.2/dbhome_13/nls/data/old/cr9idata.pl
Creating directory /u01/app/oracle/product/12.1.0.2/dbhome_13/nls/data/9idata ...
Copying files to /u01/app/oracle/product/12.1.0.2/dbhome_13/nls/data/9idata...
Copy finished.
Please reset environment variable ORA_NLS10 to /u01/app/oracle/product/12.1.02/dbhome_13/nls/data/9idata!
export ORA_NLS10=/u01/app/oracle/product/12.1.02/dbhome_13/nls/data/9idata
export TNS_ADMIN=/u01/app/oracle/product/12.1.0.2/dbhome_13/network/admin/ADT_2_zsc-oda0-0

 Stop the current running database listener from node1

listener.ora

ADT =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= TCP)(Host= host1-vip)(Port= 1581))
)
SID_LIST_ADT =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME= /u01/app/oracle/product/12.1.0.2/dbhome_13)
(SID_NAME = ADT_2)
)
)

tnsnames.ora

ADT =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = host1-vip)(PORT = 1581))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ADT.fully qualify domain)
)
)
ADT_2_LOCAL=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=host1-vip)(PORT=1581))
)
ADT_REMOTE=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=scan address)(PORT=1521))
(ADDRESS=(PROTOCOL=tcp)(HOST=scan address)(PORT=1521))
)
)

sqlnet.ora

###############################################################
#
# Do not edit settings in this file manually. They are managed
# automatically and will be overwritten when AutoConfig runs.
# For more information about AutoConfig, refer to the Oracle
# E-Business Suite Setup Guide.
#
#$Header: NetServiceHandler.java 120.28.12020000.8 2016/03/3011:22:32 kmandal ship $
#
###############################################################
NAMES.DIRECTORY_PATH=(TNSNAMES, ONAMES, HOSTNAME)
SQLNET.EXPIRE_TIME= 10
SQLNET.INBOUND_CONNECT_TIMEOUT =60
SQLNET.ALLOWED_LOGON_VERSION_SERVER=8
tcp.invited_nodes=(host0,host0-vip, host1,host1-vip)
IFILE=/u01/app/oracle/product/12.1.0.2/dbhome_13/network/admin/ADT_2_zsc-oda0-1//sqlnet_ifile.ora

add ADT_LOCAL, tnsalias to $TNS_ADMIN/tnsnames.ora
SQL> alter system set local_listener=’ADT_2_LOCAL’ scope=both sid=’ADT_2′;
SQL> show parameter local

[oracle@zsc-oda0-1 dbhome_13]$ cat oraInst.loc
#inventory_loc=/u01/app/oraInventory
inst_group=oinstall
inventory_loc=/oraInventory
rip out dbhome_13 related entries from old inventory.xml
/u01/app/oraInventory/ContentsXML/inventory.xml   (from here)
 Create database CONTEXT_FILE for node1

perl /u01/app/oracle/product/12.1.0.2/dbhome_13/appsutil/bin/adbldxml.pl

Starting context file generation for db tier..
Using JVM from /u01/app/oracle/product/12.1.0.2/dbhome_13/appsutil/jre/bin/java to execute java programs..
APPS Password:
The log file for this adbldxml session is located at:
/u01/app/oracle/product/12.1.0.2/dbhome_13/appsutil/log/adbldxml_10020933.log
Enter Database Service Name: ADT.fully qualify domain
Do you want to enable SCAN addresses[N]:N
The context file has been created at:
/u01/app/oracle/product/12.1.0.2/dbhome_13/appsutil/ADT_2_zsc-oda0-1.xml
Once context file is created under $ORACLE_HOME/appsutil
make the following changes to the following parameters
<host oa_var="s_virtual_hostname">host1 to <host oa_var="s_virtual_hostname">host1-vip
<DB_LISTENER oa_var="s_db_listener"> to <DB_LISTENER oa_var="s_db_listener">ADT

 Run adcfgclone dbTechStack

perl /u01/app/oracle/product/12.1.0.2/dbhome_13/appsutil/clone/bin/adcfgclone.pl dbTechStack /u01/app/oracle/product/12.1.0.2/dbhome_13/appsutil/ADT_2_zsc-oda0-1.xml

Run adautocfg.sh or adconfig.sh

/u01/app/oracle/product/12.1.0.2/dbhome_13/appsutil/scripts/ADT_2_zsc-oda0-1/adautocfg.sh  

srvctl relocate database -d ADT -n zsc-oda0-0

Node 0

 Perl /u01/app/oracle/product/12.1.0.2/dbhome_13/appsutil/clone/bin/adcfgclone.pl dbconfig /u01/app/oracle/product/12.1.0.2/dbhome_13/appsutil/ADT_1_zsc-oda0-0.xml

Run adautocfg.sh or adconfig.sh

/u01/app/oracle/product/12.1.0.2/dbhome_13/appsutil/scripts/ADT_1_zsc-oda0-0/adautocfg.sh

EBS Front-end Cloning/Configuration

Always clone from Source RUN file system to Target.

rsync -avP –delete –exclude=*.log –exclude=*.t –exculde*.out  source@source_host:/ .

remove FMW_HOME from Target after rsync is finish.
remove all references to Target from “inventory.xml”
su –     (So that you will have no environment)

perl /u02/appadt/fs1/EBSapps/comn/clone/bin/adcfgclone.pl appsTier dualfs

Copyright (c) 20022015 Oracle Corporation
Redwood Shores, California, USA
Oracle E-Business Suite Rapid Clone
Version 12.2
adcfgclone Version 120.63.12020000.56
Enter the APPS password :
Enter the Weblogic AdminServer password :
Do you want to add a node (yes/no) [no] :
Running: Context clone...
Log file located at /u02/appadt/fs1/EBSapps/comn/clone/bin/CloneContext_1004150502.log
Provide the values required for creation of the new APPL_TOP Context file.
Target System Hostname (virtual or normal) [apps-host] :
Target System Database SID : ADT
Target System Database Server Node [apps-host] : host0-vip
Target System Database Domain Name [fully qualify domain] :
Target System Base Directory : /u02/appadt
Target System Base Directory set to /u02/appadt
Target System Current File System Base set to /u02/appadt/fs1
Target System Other File System Base set to /u02/appadt/fs2
Target System Fusion Middleware Home set to /u02/appadt/fs1/FMW_Home
Target System Other File System Fusion Middleware Home set to /u02/appadt/fs2/FMW_Home
Target System Web Oracle Home set to /u02/appadt/fs1/FMW_Home/webtier
Target System Other File System Web Oracle Home set to /u02/appadt/fs2/FMW_Home/webtier
Target System Appl TOP set to /u02/appadt/fs1/EBSapps/appl
Target System Other File System Appl TOP set to /u02/appadt/fs2/EBSapps/appl
Target System COMMON TOP set to /u02/appadt/fs1/EBSapps/comn
Target System Other File System COMMON TOP set to /u02/appadt/fs2/EBSapps/comn
Target System Instance Home Directory [/u02/appadt] :
Target System Current File System Instance Top set to /u02/appadt/fs1/inst/apps/ADT_zsc-oradev-02
Do you want to preserve the Display [] (y/n)  : n
Target System Display [] : zsc-oradev-02:15
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 the target system to have the same port values as the source system (y/n) [y] ? : n
Target System Port Pool [0-99] : 60
Checking the port pool 60
done: Port Pool 60 is free
Report file located at /u02/appadt/fs1/inst/apps/ADT_zsc-oradev-02/temp/portpool.lst
Target System proxy hostname [proxy] :
Target System proxy port [3128] :
UTL_FILE_DIR on database tier consists of the following directories.
1. /usr/tmp
2. /usr/tmp
3. /scratch/transfer/
4. /scratch/transfer/IREAIB/
5. /usr/tmp
Choose a value which will be set as APPLPTMP value on the target node [1] :
The new APPL_TOP context file has been created :
/u02/appadt/fs1/inst/apps/ADT_zsc-oradev-02/appl/admin/ADT_zsc-oradev-02.xml
Check Clone Context logfile /u02/appadt/fs1/EBSapps/comn/clone/bin/CloneContext_1004150502.log fordetails.
Creating Patch file system context file.....
Log file located at /u02/appadt/fs1/EBSapps/comn/clone/bin/CloneContextPatch_1004150544.log
Target System Other File System Instance Top set to /u02/appadt/fs2/inst/apps/ADT_zsc-oradev-02
Target System Port Pool [0-99] : 61
Checking the port pool 61
done: Port Pool 61 is free
Report file located at /u02/appadt/fs2/inst/apps/ADT_zsc-oradev-02/admin/out/portpool.lst
The new APPL_TOP context file has been created :
/u02/appadt/fs2/inst/apps/ADT_zsc-oradev-02/appl/admin/ADT_zsc-oradev-02.xml
Check Clone Context logfile /u02/appadt/fs1/EBSapps/comn/clone/bin/CloneContextPatch_1004150544.logfor details.
FMW Pre-requisite check log file location : /u02/appadt/fs1/EBSapps/comn/clone/FMW/logs/prereqcheck.log
Running: FMW pre-req check...
Configuring: Run file system....
LogFile located at /u02/appadt/fs1/inst/apps/ADT_zsc-oradev-02/admin/log/clone/run/RCloneApplyAppstier_10041506.log
AutoConfig has completed with errors for run You can review AutoConfig portion log later
Continuing with Patch file system configuration
Configuring: Patch file system.... LogFile located at /u02/appadt/fs1/inst/apps/ADT_zsc-oradev-02/admin/log/clone/patch/RCloneApplyAppstier_10041544.log

RUN file system autoconfig error

adexecsql.pl started at Thu, 10 Oct 2018 15:15:04 -0400
File System type : run
The environment settings are as follows ...
ORACLE_HOME : /u02/appadt/fs1/EBSapps/10.1.2
TWO_TASK : ADT
PATH : /u02/appadt/fs1/EBSapps/10.1.2/bin:/usr/bin:/usr/sbin:/u02/appadt/fs1/EBSapps/comn/util/jdk32/jre/bin:$PATH:/u02/appadt/fs1/EBSapps/comn/clone/bin/../jre/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oraaudit/bin
TNS_ADMIN : /u02/appadt/fs1/inst/apps/ADT_zsc-oradev-02/ora/10.1.2/network/admin
LD_LIBRARY_PATH : /u02/appadt/fs1/EBSapps/10.1.2/lib32:/u02/appadt/fs1/EBSapps/10.1.2/lib:/usr/X11R6/lib:/usr/openwin/lib:/u02/appadt/fs1/EBSapps/10.1.2/jdk/jre/lib/i386:/u02/appadt/fs1/EBSapps/10.1.2/jdk/jre/lib/i386/server:/u02/appadt/fs1/EBSapps/10.1.2/jdk/jre/lib/i386/native_threads:/u02/appadt/fs1/EBSapps/appl/sht/12.0.0/lib
SQLPLUS Executable : /u02/appadt/fs1/EBSapps/10.1.2/bin/sqlplus
SQL*Plus: Release 10.1.0.5.0 - Production on Thu Oct 415:15:04 2018
Copyright (c) 19822005, Oracle.  All rights reserved.Enter valuefor 1: Enter value for 2: Enter value for 3: ERROR:
ORA-12505: TNS:listener does not currently know of SID given in connect
descriptor
Error encountered while running /u02/appadt/fs1/inst/apps/ADT_zsc-oradev-02/admin/install/cseadmprf.sql
ERRORCODE = 1 ERRORCODE_END
.end std out.
So I open another ssh session, source RUN file system (while adcfgclone.pl appsTier still running for Patch file system), I found the culpirt of why adautocfg.sh failed.
cd $TNS_ADMIN
tnsalias ADT is all wrong.
#ADT = (DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=host0-vip)(PORT=1581))
(CONNECT_DATA=(SID=ADT))
)
 I made the changes so that any tnsalias for database connection would have two addresses host0-vip and host1-vip. All database connection will use one of the services that my database “SERVICE_NAMES”.
ADT=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=host0)(PORT=1581))
(ADDRESS=(PROTOCOL=tcp)(HOST=host1)(PORT=1581))
(CONNECT_DATA=
(SERVICE_NAME=ADT.fully qualify domain)
)
)
Once adcfgclone.pl is finish, run adautocfg.sh.
Sanity Check!
Apps tier $CONTEXT_FILE’s parameter “s_apps_jdbc_connect_descriptor” should have two addresses and uses correct SERVICE_NAME.

 

<TWO_TASK oa_var=”s_tools_twotask” osd=”unix”>ADT_BALANCE</TWO_TASK>
<CP_TWOTASK oa_var=”s_cp_twotask”>ADT_BALANCE</CP_TWOTASK>
<TWO_TASK oa_var=”s_weboh_twotask” osd=”unix”>ADT_BALANCE</TWO_TASK>

(APPS Tier $TNS_ADMIN, tnsnames.ora has ADT_BALANCE alias)

ADT_BALANCE=
(DESCRIPTION=
(ADDRESS_LIST=
(LOAD_BALANCE=YES)
(FAILOVER=YES)
(ADDRESS=(PROTOCOL=tcp)(HOST=host1-vip)(PORT=1581))
(ADDRESS=(PROTOCOL=tcp)(HOST=host2-vip)(PORT=1581))
)
(CONNECT_DATA=
(SERVICE_NAME=ADT.fully qualify domain)
)
)

 

startup the EBS front end

ADT_1

srvctl relocate database -d ADT -n zsc-oda0-1
It kicked me out from current EBS session, log back in. EBS database is now pointing to ADT_2.
ADT_2
Registering database listener with GRID, so that you can manage it using srvctl
stop the current running database listener from all the nodes.

srvctl add listener -l listener_ADT -o /u01/app/oracle/product/12.1.0.2/dbhome_13 -p 1581

srvctl setenv listener -l listener_ADT -T TNS_ADMIN=/u01/app/oracle/product/12.1.0.2/dbhome_13/network/admin/

 

(If you haven’t done so, create tnsnmaes.ora,sqlnet.ora,listener.ora IFILE under $ORACLE_HOME/networ/admin to point to $ORACLE_HOME/network/admin/<instance>_<hostname>/)

srvctl setenv database -d ADT -t TNS_ADMIN=/u01/app/oracle/product/12.1.0.2/dbhome_13/network/admin/

 

srvctl setenv database -d ADT -t ORA_NLS10=/u01/app/oracle/product/12.1.0.2/dbhome_13/nls/data/9idata/

srvctl start listener -l listener_ADT

SANITY CHECK! lsnrctl status to ensure LISTENER_ADT is running and all the database services are register.

Leave a comment