Database : 19c & Application : EBS 12.2.10 Oracle Linux 7.9
ORACLE MOS DOC. REFERENCE:
Cloning Oracle E-Business Suite Release 12.2 with Multitenant Database using Rapid Clone (Doc ID 2552208.1)
[oraprod@erpproddb ~]$ hostname
erpproddb.srrco.org.sa
[oraprod@erpproddb ~]$ cd $ORACLE_HOME
[oraprod@erpproddb 19.0.0]$ cd appsutil/scripts/ERPPROD_erpproddb/
[oraprod@erpproddb ERPPROD_erpproddb]$ perl adpreclone.pl dbTier
Copyright (c) 2011, 2014 Oracle Corporation
Redwood Shores, California, USA
Oracle E-Business Suite Rapid Clone
Version 12.2
adpreclone Version 120.31.12020000.25
Enter the APPS User Password:
Verifying if Database Patch checker (ETCC) exists in /u01/erpprod/db/19.0.0/appsutil/etcc
Running:
perl /u01/erpprod/db/19.0.0/appsutil/bin/adclone.pl java=/u01/erpprod/db/19.0.0/appsutil/jre mode=stage stage=/u01/erpprod/db/19.0.0/appsutil/clone component=dbTier method=CUSTOM dbctx=/u01/erpprod/db/19.0.0/appsutil/ERPPROD_erpproddb.xml showProgress
Beginning database tier Stage – Wed Feb 2 15:35:23 2022
/u01/erpprod/db/19.0.0/appsutil/jre/bin/java -Xmx600M -Doracle.jdbc.autoCommitSpecCompliant=false -DCONTEXT_VALIDATED=false -Doracle.installer.oui_loc=/u01/erpprod/db/19.0.0/oui -classpath /u01/erpprod/db/19.0.0/lib/xmlparserv2.jar:/u01/erpprod/db/19.0.0/jdbc/lib/ojdbc8.jar:/u01/erpprod/db/19.0.0/appsutil/java:/u01/erpprod/db/19.0.0/oui/jlib/OraInstaller.jar:/u01/erpprod/db/19.0.0/oui/jlib/ewt3.jar:/u01/erpprod/db/19.0.0/oui/jlib/share.jar:/u01/erpprod/db/19.0.0/oui/jlib/srvm.jar:/u01/erpprod/db/19.0.0/jlib/ojmisc.jar oracle.apps.ad.clone.StageDBTier -e /u01/erpprod/db/19.0.0/appsutil/ERPPROD_erpproddb.xml -stage /u01/erpprod/db/19.0.0/appsutil/clone -tmp /tmp -method CUSTOM -showProgress
APPS Password :
Log file located at /u01/erpprod/db/19.0.0/appsutil/log/ERPPROD_erpproddb/StageDBTier_02021535.log
/ 75% completed
Completed Stage…
Wed Feb 2 15:35:38 2022
This is a CDB instance. Hence not checking duplicate data files.
[oraprod@erpproddb ERPPROD_erpproddb]$
=========================================
[oraprod@erpproddb backup_db]$ hostname
erpproddb.srrco.org.sa
[oraprod@erpproddb backup_db]$ pwd
/backup_db
[oraprod@erpproddb backup_db]$ nohup tar -czf 19c_HOME.tgz /u01/erpprod/db/19.0.0 &
4.1.2 Create pairsfile.txt File
Create a <NEW_ORACLE_HOME>/appsutil/clone/pairsfile.txt text file.
For single-node database, if you want to generate the context file non-interactively, you can use the following content:
s_undo_tablespace=<Source (PDB) system undo tablespace name>
s_db_oh=<Location of new ORACLE_HOME>
s_dbhost=<Target hostname>
s_dbSid=<Target PDB name>
s_pdb_name=<Target PDB name>
s_cdb_name=<Target CDB SID>
s_base=<Base directory for DB Oracle Home>
s_dbuser=<DB User>
s_dbgroup=<DB group> (Not applicable on Windows)
s_dbhome1=<Data directory>
s_display=<Display>
s_dbCluster=false
s_isDBCluster=n
s_dbport=<DB port>
s_port_pool=<Port pool number>
SOURCE ENVIRONMENT | TARGET ENVIRONMENT | ||
PRODUCTION | DEVELOPMENT | ||
s_undo_tablespace | APPS_UNDOTS1 | APPS_UNDOTS1 | |
s_db_oh | /u01/erpprod/db/19.0.0 | /u01/DEV8010/db/19.0.0 | |
s_dbhost | erpproddb | erpdevdb | |
s_dbSid | ERPPROD | ERPDEV | |
s_pdb_name | ERPPROD | ERPDEV | |
s_cdb_name | ERPCDB | DEVCDB | |
s_base | /u01/erpprod | /u01/DEV8010 | |
s_dbuser | oraprod | oradev | |
s_dbgroup | dba | dba | |
s_dbhome1 | /u01/erpprod/db/ebs_data | /u01/DEV8010/db/ebs_data | |
s_dbhome2 | /u01/erpprod/db/cdb_data/ERPCDB | /u01/DEV8010/db/cdb_data/DEVCDB | |
s_display | localhost:0.0 | localhost:0.0 | |
s_dbCluster | false | False | |
s_isDBCluster | n | N | |
s_dbport | 1521 | 1531 | |
s_port_pool | 0 | 10 | |
========================
s_undo_tablespace=APPS_UNDOTS1
s_db_oh=/u01/DEV8010/db/19.0.0
s_dbhost=erpdevdb
s_dbSid=ERPDEV
s_pdb_name=ERPDEV
s_cdb_name=DEVCDB
s_base=/u01/DEV8010
s_dbuser=oradev
s_dbgroup=dba
s_dbhome1=/u01/DEV8010/db/ebs_data
s_dbhome2=/u01/DEV8010/db/cdb_data/DEVCDB
s_display=localhost:0.0
s_dbCluster=false
s_isDBCluster=n
s_dbport=1531
s_port_pool=10
vi /u01/DEV8010/db/19.0.0/appsutil/clone/pairsfile.txt
and insert the above target Parameter values to punch in the CTX File.
===================
4.1.3 Create Context File
[oradev@erpdevdb bin]$ pwd
/u01/DEV8010/db/19.0.0/appsutil/clone/bin
[oradev@erpdevdb bin]$ /u01/DEV8010/db/19.0.0/perl/bin/perl adclonectx.pl contextfile=/u01/DEV8010/db/19.0.0/appsutil/ERPPROD_erpproddb.xml template=/u01/DEV8010/db/19.0.0/appsutil/template/adxdbctx.tmp pairsfile=/u01/DEV8010/db/19.0.0/appsutil/clone/pairsfile.txt
Copyright (c) 2011, 2015 Oracle Corporation
Redwood Shores, California, USA
Oracle E-Business Suite Rapid Clone
Version 12.2
adclonectx Version 120.30.12020000.22
Enter the APPS passwd :
Executing command: /u01/DEV8010/db/19.0.0/appsutil/clone/bin/../jre/bin/java -Xmx600M -Doracle.jdbc.autoCommitSpecCompliant=false -classpath /u01/DEV8010/db/19.0.0/appsutil/clone/bin/../jlib/ojdbc8.jar:/u01/DEV8010/db/19.0.0/appsutil/clone/bin/../jlib/xmlparserv2.jar:/u01/DEV8010/db/19.0.0/appsutil/clone/bin/../jlib/java: oracle.apps.ad.context.CloneContext -e /u01/DEV8010/db/19.0.0/appsutil/ERPPROD_erpproddb.xml -tmpl /u01/DEV8010/db/19.0.0/appsutil/template/adxdbctx.tmp -pairsfile /u01/DEV8010/db/19.0.0/appsutil/clone/pairsfile.txt
Enter the APPS password :
Log file located at /u01/DEV8010/db/19.0.0/appsutil/clone/bin/CloneContext_0202132410.log
Provide the values required for creation of the new Database Context file.
Target System Hostname (virtual or normal) [erpdevdb] :
It is recommended that your inputs are validated by the program.
However you might choose not to validate them under following circumstances:
-If cloning a context on source system for a remote system.
-If cloning a context on a machine where the ports are taken and
you do not want to shutdown the services at this point.
-If cloning a context but the database it needs to connect is not available.
Do you want the inputs to be validated (y/n) [n] ? :
Role separation is supported y/n [n] ? :
Specify value for OSBACKUPDBA group [dba] :
Specify value for OSDGDBA group [dba] :
Specify value for OSKMDBA group [dba] :
Specify value for OSRACDBA group [dba] : Report file located at /u01/DEV8010/db/19.0.0/appsutil/temp/portpool.lst
New context path and file name [/u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml] : The new database context file has been created :
/u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml
contextfile=/u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml
Check Clone Context logfile /u01/DEV8010/db/19.0.0/appsutil/clone/bin/CloneContext_0202132410.log for details.
[oradev@erpdevdb bin]$
=========================================
4.1.4 Configure the Database Technology Stack
IMPORTANT: Ensure oraInventory pointed in /etc/oraInst.loc must not contain the Same target PATH OR same Target Oracle Home Names, If exist then it is better deAttach those which may conflict with your Cloning session.
( Example : /u01/orainventory/ContentsXML/inventory.xml can be reviewed before proceeding)
cd /u01/DEV8010/db/19.0.0/appsutil/clone/bin
perl adcfgclone.pl dbTechStack /u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml
[oradev@erpdevdb bin]$ perl adcfgclone.pl dbTechStack /u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml
Copyright (c) 2002, 2015 Oracle Corporation
Redwood Shores, California, USA
Oracle E-Business Suite Rapid Clone
Version 12.2
adcfgclone Version 120.63.12020000.65
Enter the APPS password :
Running Rapid Clone with command:
Running:
perl /u01/DEV8010/db/19.0.0/appsutil/clone/bin/adclone.pl java=/u01/DEV8010/db/19.0.0/appsutil/clone/bin/../jre mode=apply stage=/u01/DEV8010/db/19.0.0/appsutil/clone component=dbTechStack method=CUSTOM dbctxtg=/u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml showProgress contextValidated=false
Beginning rdbms home Apply – Wed Feb 2 15:14:35 2022
/u01/DEV8010/db/19.0.0/appsutil/clone/bin/../jre/bin/java -Xmx600M -Doracle.jdbc.autoCommitSpecCompliant=false -DCONTEXT_VALIDATED=false -Doracle.installer.oui_loc=/u01/DEV8010/db/19.0.0/oui -classpath /u01/DEV8010/db/19.0.0/appsutil/clone/jlib/xmlparserv2.jar:/u01/DEV8010/db/19.0.0/appsutil/clone/jlib/ojdbc8.jar:/u01/DEV8010/db/19.0.0/appsutil/clone/jlib/java:/u01/DEV8010/db/19.0.0/appsutil/clone/jlib/oui/OraInstaller.jar:/u01/DEV8010/db/19.0.0/appsutil/clone/jlib/oui/ewt3.jar:/u01/DEV8010/db/19.0.0/appsutil/clone/jlib/oui/share.jar:/u01/DEV8010/db/19.0.0/appsutil/clone/jlib/oui/srvm.jar:/u01/DEV8010/db/19.0.0/appsutil/clone/jlib/ojmisc.jar oracle.apps.ad.clone.ApplyDBTechStack -e /u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml -stage /u01/DEV8010/db/19.0.0/appsutil/clone -showProgress
APPS Password : Log file located at /u01/DEV8010/db/19.0.0/appsutil/log/ERPDEV_erpdevdb/ApplyDBTechStack_02021514.log
| 0% completed
Log file located at /u01/DEV8010/db/19.0.0/appsutil/log/ERPDEV_erpdevdb/ApplyDBTechStack_02021514.log
\ 0% completed
Completed Apply…
Wed Feb 2 15:17:09 2022
Running ETCC to check status of DB technology patches…
+===============================================================+
| Copyright (c) 2005, 2020 Oracle and/or its affiliates. |
| All rights reserved. |
| Oracle E-Business Suite Release 12.2 |
| Database EBS Technology Codelevel Checker |
+===============================================================+
Validating context file: /u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml
Using context file from command line argument:
/u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml
Starting Database EBS Technology Codelevel Checker, Version 120.86
Wed Feb 2 15:17:09 +03 2022
Log file for this session : /u01/DEV8010/db/19.0.0/appsutil/clone/bin/log/checkDBpatch_32571.log
Identifying database release.
Database release set to 19.12.0.0.
Multitenant identified.
– Container database (CDB) identified via s_cdb_name is DEVCDB
– Pluggable database (PDB) identified via s_pdb_name is ERPDEV
Connecting to database.
+—————————————————————————–+
[WARNING] DB-ETCC: Could not connect to database, so unable to check:
– Whether database is in READ-WRITE mode.
– Existence of table needed to store DB-ETCC results.
– Enablement of database In-Memory option.
If this feature is enabled, additional fixes need to be verified.
Resolve the database connectivity issue, and then rerun DB-ETCC.
+—————————————————————————–+
Bugfix file /u01/DEV8010/db/19.0.0/appsutil/etcc/db/onprem/txk_R1220_DB_base_bugs.xml : 120.0.12020000.60
This file will be used for identifying missing bugfixes.
Mapping file /u01/DEV8010/db/19.0.0/appsutil/etcc/db/onprem/txk_R1220_DB_mappings.xml : 120.0.12020000.35
This file will be used for mapping bugfixes to patches.
[WARNING] DB-ETCC: Bugfix XML file (/u01/DEV8010/db/19.0.0/appsutil/etcc/db/onprem/txk_R1220_DB_base_bugs.xml) is more than 90 days old.
Check if a newer version is available in patch 17537119.
Checking Bugfix XML file for 19.12.0.0_RU
Obtained list of bugfixes to be applied and the list to be rolled back.
Now checking Database ORACLE_HOME.
The opatch utility is version 12.2.0.1.27.
DB-ETCC is compatible with this opatch version.
Found patch records in the inventory.
Checking Mapping XML file for 19.12.0.0.210720DBRU
All the required one-off bugfixes are present in Database ORACLE_HOME.
[WARNING] Database not available. DB-ETCC results cannot be stored.
Finished checking fixes for Oracle Database: Wed Feb 2 15:17:23 +03 2022
Log file for this session: /u01/DEV8010/db/19.0.0/appsutil/clone/bin/log/checkDBpatch_32571.log
[oradev@erpdevdb bin]$
===============================
4.1.5 Create the listener.ora and tnsnames.ora for the Target Database
SET THE ENV:
cd /u01/DEV8010/db/19.0.0/appsutil
source ./txkSetCfgCDB.env -dboraclehome=/u01/DEV8010/db/19.0.0
Oracle Home being passed: /u01/DEV8010/db/19.0.0
4.1.5 Create the listener.ora and tnsnames.ora for the Target Database
TEMPLATE SAMPLE:
perl txkGenCDBTnsAdmin.pl -dboraclehome=<ORACLE_HOME> -cdbname=<Name of the target container database> \
-cdbsid=<SID of the target container database> -dbport=<Target DB port> -outdir=$ORACLE_HOME/appsutil/log \
-israc=<yes/no> [-virtualhostname=<virtual hostname>]
ACTUAL COMMAND
/u01/DEV8010/db/19.0.0/perl/bin/perl txkGenCDBTnsAdmin.pl -dboraclehome=/u01/DEV8010/db/19.0.0 -cdbname=DEVCDB -cdbsid=DEVCDB -dbport=1531 -outdir=/u01/DEV8010/db/19.0.0/appsutil/log -virtualhostname=erpdevdb.srrco.org.sa
[oradev@erpdevdb 19.0.0]$ hostname
erpdevdb.srrco.org.sa
[oradev@erpdevdb 19.0.0]$ pwd
/u01/DEV8010/db/19.0.0
[oradev@erpdevdb 19.0.0]$ ls -lrt *.env
-rw-r–r–. 1 oradev dba 2027 Jan 13 16:51 ERPCDB_erpproddb.env
-rw-r–r–. 1 oradev dba 4471 Feb 2 15:16 ERPDEV_erpdevdb.env
-rw-r–r–. 1 oradev dba 1756 Feb 2 15:17 DEVCDB_erpdevdb.env
[oradev@erpdevdb 19.0.0]$
[oradev@erpdevdb 19.0.0]$ cd /u01/DEV8010/db/19.0.0/appsutil
[oradev@erpdevdb appsutil]$
[oradev@erpdevdb appsutil]$ cd /u01/DEV8010/db/19.0.0/appsutil
[oradev@erpdevdb appsutil]$
[oradev@erpdevdb appsutil]$ source ./txkSetCfgCDB.env -dboraclehome=/u01/DEV8010/db/19.0.0
Oracle Home being passed: /u01/DEV8010/db/19.0.0
[oradev@erpdevdb appsutil]$ cd /u01/DEV8010/db/19.0.0/appsutil/bin
[oradev@erpdevdb bin]$ pwd
/u01/DEV8010/db/19.0.0/appsutil/bin
[oradev@erpdevdb bin]$ /u01/DEV8010/db/19.0.0/perl/bin/perl txkGenCDBTnsAdmin.pl -dboraclehome=/u01/DEV8010/db/19.0.0 -cdbname=DEVCDB -cdbsid=DEVCDB -dbport=1531 -outdir=/u01/DEV8010/db/19.0.0/appsutil/log -virtualhostname=erpdevdb.srrco.org.sa
Script Name : txkGenCDBTnsAdmin.pl
Script Version : 120.0.12020000.9
Started : Wed Feb 2 16:13:32 +03 2022
Log File : /u01/DEV8010/db/19.0.0/appsutil/log/TXK_CDB_TNS_ADMIN_Wed_Feb_2_16_13_32_2022/txkGenCDBTnsAdmin.log
———–
Values used
———–
Database Oracle Home : /u01/DEV8010/db/19.0.0
CDB NAME : DEVCDB
CDB SID : DEVCDB
Database port : 1531
OUT Directory : /u01/DEV8010/db/19.0.0/appsutil/log
Is RAC? : No
Virtual Hostname : erpdevdb.srrco.org.sa
=========================
Validating oracle home…
=========================
Oracle Home: /u01/DEV8010/db/19.0.0 exists.
===========================
Validating out directory…
===========================
Out directory: /u01/DEV8010/db/19.0.0/appsutil/log exists.
============================
Inside getDBHostDetails()…
============================
DB Hostname : erpdevdb
DB Domain : srrco.org.sa
=====================
Inside getDBPort()…
=====================
DB Port passed as an argument, using the same.
DB Port: 1531
======================================
Inside generateCDBTNSAdminContent()…
======================================
Creating the directory: /u01/DEV8010/db/19.0.0/appsutil/log/TXK_CDB_TNS_ADMIN_Wed_Feb_2_16_13_32_2022/tns_admin_cdb_bkp
Creating the directory: /u01/DEV8010/db/19.0.0/appsutil/log/TXK_CDB_TNS_ADMIN_Wed_Feb_2_16_13_32_2022/tns_admin_cdb_temp
listener_template: listener_ora_cdb_db19.tmp
sqlnet_template: sqlnet_ora_cdb_db19.tmp
Copying the file
—————-
SOURCE : /u01/DEV8010/db/19.0.0/appsutil/template/listener_ora_cdb_db19.tmp
TARGET : /u01/DEV8010/db/19.0.0/appsutil/log/TXK_CDB_TNS_ADMIN_Wed_Feb_2_16_13_32_2022/tns_admin_cdb_temp/listener.ora
===================================
Inside replaceContextVariables()…
===================================
Copying the file
—————-
SOURCE : /u01/DEV8010/db/19.0.0/network/admin/listener.ora
TARGET : /u01/DEV8010/db/19.0.0/appsutil/log/TXK_CDB_TNS_ADMIN_Wed_Feb_2_16_13_32_2022/tns_admin_cdb_bkp/listener.ora
Copying the file
—————-
SOURCE : /u01/DEV8010/db/19.0.0/appsutil/log/TXK_CDB_TNS_ADMIN_Wed_Feb_2_16_13_32_2022/tns_admin_cdb_temp/listener.ora
TARGET : /u01/DEV8010/db/19.0.0/network/admin/listener.ora
Copying the file
—————-
SOURCE : /u01/DEV8010/db/19.0.0/appsutil/template/tnsnames_ora_cdb_db121.tmp
TARGET : /u01/DEV8010/db/19.0.0/appsutil/log/TXK_CDB_TNS_ADMIN_Wed_Feb_2_16_13_32_2022/tns_admin_cdb_temp/tnsnames.ora
===================================
Inside replaceContextVariables()…
===================================
Copying the file
—————-
SOURCE : /u01/DEV8010/db/19.0.0/network/admin/tnsnames.ora
TARGET : /u01/DEV8010/db/19.0.0/appsutil/log/TXK_CDB_TNS_ADMIN_Wed_Feb_2_16_13_32_2022/tns_admin_cdb_bkp/tnsnames.ora
Copying the file
—————-
SOURCE : /u01/DEV8010/db/19.0.0/appsutil/log/TXK_CDB_TNS_ADMIN_Wed_Feb_2_16_13_32_2022/tns_admin_cdb_temp/tnsnames.ora
TARGET : /u01/DEV8010/db/19.0.0/network/admin/tnsnames.ora
Copying the file
—————-
SOURCE : /u01/DEV8010/db/19.0.0/appsutil/template/sqlnet_ora_cdb_db19.tmp
TARGET : /u01/DEV8010/db/19.0.0/appsutil/log/TXK_CDB_TNS_ADMIN_Wed_Feb_2_16_13_32_2022/tns_admin_cdb_temp/sqlnet.ora
===================================
Inside replaceContextVariables()…
===================================
Copying the file
—————-
SOURCE : /u01/DEV8010/db/19.0.0/network/admin/sqlnet.ora
TARGET : /u01/DEV8010/db/19.0.0/appsutil/log/TXK_CDB_TNS_ADMIN_Wed_Feb_2_16_13_32_2022/tns_admin_cdb_bkp/sqlnet.ora
Copying the file
—————-
SOURCE : /u01/DEV8010/db/19.0.0/appsutil/log/TXK_CDB_TNS_ADMIN_Wed_Feb_2_16_13_32_2022/tns_admin_cdb_temp/sqlnet.ora
TARGET : /u01/DEV8010/db/19.0.0/network/admin/sqlnet.ora
==============================
Inside updateCDBSqlNetOra()…
==============================
Updating the IFILE entry…
Exiting from the script.
Ended: Wed Feb 2 16:13:32 +03 2022
[oradev@erpdevdb bin]$
=======================
Start the listener for the target container database as follows:
[oradev@erpdevdb ~]$ cd /u01/DEV8010/db/19.0.0/appsutil/scripts/ERPDEV_erpdevdb
[oradev@erpdevdb ERPDEV_erpdevdb]$ ./adcdblnctl.sh start DEVCDB
[oradev@erpdevdb 19.0.0]$ lsnrctl start DEVCDB
LSNRCTL for Linux: Version 19.0.0.0.0 – Production on 03-FEB-2022 07:19:44
Copyright (c) 1991, 2021, Oracle. All rights reserved.
Starting /u01/DEV8010/db/19.0.0/bin/tnslsnr: please wait…
TNSLSNR for Linux: Version 19.0.0.0.0 – Production
System parameter file is /u01/DEV8010/db/19.0.0/network/admin/listener.ora
Log messages written to /u01/DEV8010/db/19.0.0/log/diag/tnslsnr/erpdevdb/devcdb/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=erpdevdb.srrco.org.sa)(PORT=1531)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=erpdevdb.srrco.org.sa)(PORT=1531)))
STATUS of the LISTENER
————————
Alias DEVCDB
Version TNSLSNR for Linux: Version 19.0.0.0.0 – Production
Start Date 03-FEB-2022 07:19:44
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/DEV8010/db/19.0.0/network/admin/listener.ora
Listener Log File /u01/DEV8010/db/19.0.0/log/diag/tnslsnr/erpdevdb/devcdb/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=erpdevdb.srrco.org.sa)(PORT=1531)))
The listener supports no services
The command completed successfully
[oradev@erpdevdb 19.0.0]$
=======================
Create PFILE for your Target CDB
Vi initDEVCDB.ora
INSERT BELOW ( CUSTOMIZED PARAMETERS AS PER TARGET DATABASE )
DEVCDB.__data_transfer_cache_size=0
DEVCDB.__db_cache_size=2617245696
DEVCDB.__inmemory_ext_roarea=0
DEVCDB.__inmemory_ext_rwarea=0
DEVCDB.__java_pool_size=150994944
DEVCDB.__large_pool_size=33554432
DEVCDB.__oracle_base=’/u01/DEV8010’#ORACLE_BASE set from environment
DEVCDB.__pga_aggregate_target=1073741824
DEVCDB.__sga_target=4294967296
DEVCDB.__shared_io_pool_size=134217728
DEVCDB.__shared_pool_size=1275068416
DEVCDB.__streams_pool_size=50331648
DEVCDB.__unified_pga_pool_size=0
*._b_tree_bitmap_plans=FALSE
*._disable_actualization_for_grant=true
*._fast_full_scan_enabled=FALSE
*._like_with_bind_as_equality=TRUE
*._optimizer_autostats_job=FALSE
*._optimizer_gather_stats_on_conventional_dml=FALSE#MP
*._optimizer_use_stats_on_conventional_dml=FALSE#MP
*._pdb_name_case_sensitive=TRUE
*._pga_max_size=104857600#MP
*._sort_elimination_cost_ratio=5
*._system_trig_enabled=TRUE
*._trace_files_public=FALSE
*.aq_tm_processes=1
*.audit_file_dest=’/u01/DEV8010/admin/DEVCDB/adump’
*.audit_sys_operations=TRUE
*.audit_trail=’db’
*.compatible=’19.0.0′
*.control_files=’/u01/DEV8010/db/cdb_data/DEVCDB/cdb_control01.ctl’,’/u01/DEV8010/db/cdb_data/DEVCDB/cdb_control02.ctl’
*.db_file_name_convert=(‘/u01/erpprod/db/cdb_data/ERPCDB’,’/u01/DEV8010/db/cdb_data/DEVCDB’,’/u01/erpprod/db/ebs_data’ ‘/u01/DEV8010/db/ebs_data’)
*.log_file_name_convert=(‘/u01/erpprod/db/cdb_data/ERPCDB’,’/u01/DEV8010/db/cdb_data/DEVCDB’)
*.cursor_sharing=’EXACT’
*.db_block_checking=’FALSE’
*.db_block_checksum=’TRUE’
*.db_block_size=8192
*.db_files=512
*.db_name=’DEVCDB’
*.diagnostic_dest=’/u01/DEV8010′
*.dispatchers='(PROTOCOL=TCP) (SERVICE=DEVCDBXDB)’
*.dml_locks=10000
*.enable_pluggable_database=true
*.event=’10946 trace name context forever, level 8454144′
*.job_queue_processes=2
*.local_listener=’erpdevdb.srrco.org.sa:1531′
*.log_archive_format=’%t_%s_%r.dbf’
*.log_archive_dest_1=’location=/u01/DEV8010/db/archive’
*.log_buffer=10485760
*.log_checkpoint_interval=100000
*.log_checkpoint_timeout=1200
*.log_checkpoints_to_alert=TRUE
*.max_dump_file_size=’20480′
*.nls_comp=’BINARY’
*.nls_date_format=’DD-MON-RR’
*.nls_language=’AMERICAN’
*.nls_length_semantics=’BYTE’
*.nls_numeric_characters=’.,’
*.nls_sort=’BINARY’
*.nls_territory=’AMERICA’
*.open_cursors=600
*.optimizer_adaptive_plans=TRUE#MP
*.optimizer_adaptive_statistics=FALSE#MP
*.optimizer_real_time_statistics=FALSE#MP
*.optimizer_secure_view_merging=FALSE
*.parallel_max_servers=8
*.parallel_min_servers=0
*.pga_aggregate_limit=0
*.pga_aggregate_target=1073741824#MP
*.plsql_code_type=’INTERPRETED’
*.plsql_optimize_level=2
*.processes=1100
*.recyclebin=’off’
*.remote_login_passwordfile=’EXCLUSIVE’
*.sec_case_sensitive_logon=FALSE
*.service_names=’DEVCDB’
*.session_cached_cursors=500
*.sessions=1536
*.sga_target=4G
*.shared_pool_reserved_size=41943040
*.shared_pool_size=419430400
*.sql92_security=TRUE
*.temp_undo_enabled=FALSE#MP
*.undo_management=’AUTO’
*.undo_retention=3000
*.undo_tablespace=’UNDOTBS1′
*.workarea_size_policy=’AUTO’
==================================
Transfer Production RMAN Backup to Target Dev machine
[oradev@erpdevdb RMAN_BKP_02FEB22_02AM]$ pwd
/u01/DEV8010/RMAN_BKP_02FEB22_02AM
[oradev@erpdevdb RMAN_BKP_02FEB22_02AM]$ ls -lrt
total 50765204
-rw-r—–. 1 oradev dba 5782880256 Feb 2 11:02 ERPCDBERPCDB_6f0kpq14.F_bkp
-rw-r—–. 1 oradev dba 369680384 Feb 2 11:02 ERPCDBERPCDB_6g0kpr0r.F_bkp
-rw-r—–. 1 oradev dba 336420864 Feb 2 11:02 ERPCDBERPCDB_6h0kpr2s.F_bkp
-rw-r—–. 1 oradev dba 138665984 Feb 2 11:02 ERPCDBERPCDB_6i0kpr49.F_bkp
-rw-r—–. 1 oradev dba 50184192 Feb 2 11:02 ERPCDBERPCDB_6j0kpr52.F_bkp
-rw-r—–. 1 oradev dba 79888384 Feb 2 11:02 ERPCDBERPCDB_6k0kpr5h.F_bkp
-rw-r—–. 1 oradev dba 21203410944 Feb 2 11:05 ERPCDBERPCDB_6e0kpq14.F_bkp
-rw-r—–. 1 oradev dba 23013654528 Feb 2 11:07 ERPCDBERPCDB_6d0kpq13.F_bkp
-rw-r—–. 1 oradev dba 34042880 Feb 2 11:07 ERPCDB_ALG_ERPCDB_6o0kpsul.alg
-rw-r—–. 1 oradev dba 336975872 Feb 2 11:07 ERPCDB_ALG_ERPCDB_6m0kpsul.alg
-rw-r—–. 1 oradev dba 618964480 Feb 2 11:07 ERPCDB_ALG_ERPCDB_6n0kpsul.alg
-rw-r—–. 1 oradev dba 18759680 Feb 2 11:07 ERPCDB_CTL_ERPCDB_6p0kpt1b.ctl
-rw-r–r–. 1 oradev dba 12852 Feb 2 11:07 full_020222.log
[oradev@erpdevdb RMAN_BKP_02FEB22_02AM]$
========== START RESTORATION PROCESS=================
START INSTANCE USING CDB PFILE:
sqlplus / as sysdba
startup nomount pfile=’/u01/DEV8010/db/19.0.0/dbs/initDEVCDB.ora’;
create spfile from pfile=’/u01/DEV8010/db/19.0.0/dbs/initDEVCDB.ora’;
RESTORE CONTROL FILE:
rman target /
restore controlfile from ‘/u01/DEV8010/RMAN_BKP_02FEB22_02AM/ERPCDB_CTL_ERPCDB_6p0kpt1b.ctl’;
[oradev@erpdevdb dbs]$ rman target /
Recovery Manager: Release 19.0.0.0.0 – Production on Wed Feb 2 18:55:13 2022
Version 19.12.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to target database: DEVCDB (not mounted)
RMAN> restore controlfile from ‘/u01/DEV8010/RMAN_BKP_02FEB22_02AM/ERPCDB_CTL_ERPCDB_6p0kpt1b.ctl’;
Starting restore at 02-FEB-22
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=566 device type=DISK
channel ORA_DISK_1: copied control file copy
output file name=/u01/DEV8010/db/cdb_data/DEVCDB/cdb_control01.ctl
output file name=/u01/DEV8010/db/cdb_data/DEVCDB/cdb_control02.ctl
Finished restore at 02-FEB-22
RMAN>
CREATE RMAN DUPLICATE SCRIPT FOR RESTORING YOUR TARGET DATABASE:
SAMPLE COMMAND
duplicate database to “<TARGET CDB>” backup location ‘<PATH OF RMAN BACKUP DIRECTORY>’;
DEV CREATION COMMAND
duplicate database to “DEVCDB” backup location ‘/u01/DEV8010/RMAN_BKP_02FEB22_02AM’;
RMAN DUPLICATE SCRIPT:
cd /u01/DEV8010/
vi restoredevcdb.sql
INSERT Below duplicate script to clone the Production Backup to Restore to DEV CDB
run
{
allocate auxiliary channel a1 type disk;
allocate auxiliary channel a2 type disk;
allocate auxiliary channel a3 type disk;
duplicate database to “DEVCDB” backup location ‘/u01/DEV8010/RMAN_BKP_02FEB22_02AM’;
release channel a1;
release channel a2;
release channel a3;
}
This above script will restore the CDB + PDB Database plugged already in CDB
============================
STEP
======
[oradev@erpdevdb dbs]$ rman auxiliary /
Recovery Manager: Release 19.0.0.0.0 – Production on Wed Feb 2 19:02:18 2022
Version 19.12.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to auxiliary database: DEVCDB (not mounted)
RMAN> @/u01/DEV8010/restoredevcdb.sql
RMAN>
============================
Take a new/fresh Putty Session
Source Environment of this recently Restored Container Database DEVCDB
. /u01/DEV8010/db/19.0.0/DEVCDB_erpdevdb.env
Start the Container Database DEVCDB
Note: if the Database is already up then it is better to bounce the Database and ensure CDB has no issue shutting and starting up this newly Cloned DEVCDB.
Check the Datafiles, Controlfiles, Redolog Files and Temporary Tablespace files are correctly restored on the Target File System PATH
SQL> select member from v$logfile;
MEMBER
——————————————————————————–
/u01/DEV8010/db/cdb_data/DEVCDB/cdb_redo04.log
/u01/DEV8010/db/cdb_data/DEVCDB/cdb_redo03.log
/u01/DEV8010/db/cdb_data/DEVCDB/cdb_redo02.log
/u01/DEV8010/db/cdb_data/DEVCDB/cdb_redo01.log
SQL> select name from v$datafile;
NAME
——————————————————————————–
/u01/DEV8010/db/cdb_data/DEVCDB/cdb_system01.dbf
/u01/DEV8010/db/cdb_data/DEVCDB/cdb_sysaux01.dbf
/u01/DEV8010/db/cdb_data/DEVCDB/cdb_undotbs01.dbf
/u01/DEV8010/db/cdb_data/DEVCDB/pdbseed/pdb_system01.dbf
/u01/DEV8010/db/cdb_data/DEVCDB/pdbseed/pdb_sysaux01.dbf
/u01/DEV8010/db/cdb_data/DEVCDB/cdb_users01.dbf
/u01/DEV8010/db/cdb_data/DEVCDB/pdbseed/pdb_undotbs01.dbf
/u01/DEV8010/db/ebs_data/pdb_system01.dbf
/u01/DEV8010/db/ebs_data/pdb_sysaux01.dbf
/u01/DEV8010/db/ebs_data/pdb_undotbs01.dbf
/u01/DEV8010/db/ebs_data/system.268.906900845
NAME
——————————————————————————–
/u01/DEV8010/db/ebs_data/system.270.906900867
/u01/DEV8010/db/ebs_data/system.272.906900909
/u01/DEV8010/db/ebs_data/system.275.906900925
/u01/DEV8010/db/ebs_data/system.276.906900933
/u01/DEV8010/db/ebs_data/system.277.906900937
/u01/DEV8010/db/ebs_data/system.278.906900943
/u01/DEV8010/db/ebs_data/system.279.906900947
/u01/DEV8010/db/ebs_data/system.280.906900949
/u01/DEV8010/db/ebs_data/system.281.906900965
/u01/DEV8010/db/ebs_data/system.282.906900969
/u01/DEV8010/db/ebs_data/system.321.1058178177
NAME
——————————————————————————–
/u01/DEV8010/db/ebs_data/system.323.1058179899
/u01/DEV8010/db/ebs_data/sysaux.271.906900883
/u01/DEV8010/db/ebs_data/sysaux.316.1030455155
/u01/DEV8010/db/ebs_data/sysaux.324.1059037353
/u01/DEV8010/db/ebs_data/undotbs2.304.906901395
/u01/DEV8010/db/ebs_data/apps_ts_archive.283.906900971
/u01/DEV8010/db/ebs_data/apps_ts_interface.273.906900915
/u01/DEV8010/db/ebs_data/apps_ts_media.257.906900615
/u01/DEV8010/db/ebs_data/apps_ts_media.317.1046260515
/u01/DEV8010/db/ebs_data/apps_ts_nologging.291.906900999
/u01/DEV8010/db/ebs_data/apps_ts_queues.284.906900979
NAME
——————————————————————————–
/u01/DEV8010/db/ebs_data/apps_ts_queues.285.906900985
/u01/DEV8010/db/ebs_data/apps_ts_seed.266.906900813
/u01/DEV8010/db/ebs_data/apps_ts_seed.269.906900861
/u01/DEV8010/db/ebs_data/apps_ts_summary.274.906900919
/u01/DEV8010/db/ebs_data/apps_ts_tools.286.906900989
/u01/DEV8010/db/ebs_data/apps_ts_tx_data.258.906900639
/u01/DEV8010/db/ebs_data/apps_ts_tx_data.259.906900675
/u01/DEV8010/db/ebs_data/apps_ts_tx_data.260.906900689
/u01/DEV8010/db/ebs_data/apps_ts_tx_data.267.906900821
/u01/DEV8010/db/ebs_data/apps_ts_tx_data.320.1058178143
/u01/DEV8010/db/ebs_data/apps_ts_tx_data.322.1058179745
NAME
——————————————————————————–
/u01/DEV8010/db/ebs_data/apps_ts_tx_idx.261.906900705
/u01/DEV8010/db/ebs_data/apps_ts_tx_idx.262.906900741
/u01/DEV8010/db/ebs_data/apps_ts_tx_idx.263.906900747
/u01/DEV8010/db/ebs_data/apps_ts_tx_idx.264.906900773
/u01/DEV8010/db/ebs_data/apps_ts_tx_idx.265.906900797
/u01/DEV8010/db/ebs_data/ctxd.292.906901001
/u01/DEV8010/db/ebs_data/interim.287.906900993
/u01/DEV8010/db/ebs_data/odm.288.906900993
/u01/DEV8010/db/ebs_data/olap.289.906900997
/u01/DEV8010/db/ebs_data/owapub.293.906901001
/u01/DEV8010/db/ebs_data/portal.290.906900997
NAME
——————————————————————————–
/u01/DEV8010/db/ebs_data/apps_undots1.256.906900553
56 rows selected.
SQL> select name from v$controlfile;
NAME
——————————————————————————–
/u01/DEV8010/db/cdb_data/DEVCDB/cdb_control01.ctl
/u01/DEV8010/db/cdb_data/DEVCDB/cdb_control02.ctl
SQL> select name from v$tempfile;
NAME
——————————————————————————–
/u01/DEV8010/db/cdb_data/DEVCDB/cdb_temp01.dbf
/u01/DEV8010/db/cdb_data/DEVCDB/pdbseed/temp012021-12-24_11-49-57-861-AM.dbf
/u01/DEV8010/db/ebs_data/temp012021-12-24_11-49-57-861-AM.dbf
/u01/DEV8010/db/ebs_data/tempJAN22_1.dbf
/u01/DEV8010/db/ebs_data/TEMP1_0001.dbf
SQL>
=========================
Section 4.1.6 > Step 4
Section 4.1.6 > Step 4
If the Target PDB name needs to be changed to a value different from the Source PDB Name Then Perform the following steps:
Take a new/fresh Putty Session
Source Environment of this recently Restored Container Database DEVCDB
. /u01/DEV8010/db/19.0.0/DEVCDB_erpdevdb.env
[oradev@erpdevdb ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 – Production on Thu Feb 3 09:18:00 2022
Version 19.12.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production
Version 19.12.0.0.0
SQL> alter session set container=”ERPPROD”;
Session altered
SQL> select s.name from cdb_services c, service$ s where upper(s.name) = upper(‘ERPPROD’) and s.deletion_date is null and s.name = c.name;
select s.name from cdb_services c, service$ s where upper(s.name) = upper(‘ERPPROD’) and s.deletion_date is null and s.name = c.name *
ERROR at line 1:
ORA-01219: database or pluggable database not open: queries allowed on fixed tables or views only
SQL>
The Above Error is expected since the Source PDB inside the CDB is not yet opened
SOLUTION:
SQL> alter pluggable database “ERPPROD” open read write;
Pluggable database altered.
SQL>
SQL> select s.name from cdb_services c, service$ s where upper(s.name) = upper(‘ERPPROD‘) and s.deletion_date is null and s.name = c.name;
NAME
—————–
ERPPROD
SQL>
====================
SQL> select s.name from cdb_services c, service$ s where upper(s.name) = upper(‘ERPDEV‘) and s.deletion_date is null and s.name = c.name;
no rows selected ( It is Confirmed that Target PDB Name ERPDEV does not exist )
SQL>
CONDITIONAL ACTION:
If any service already exists with the Target PDB name, delete it as follows:
$ sqlplus / as sysdba
SQL> alter session set container=”<SOURCE PDB_NAME>”;
SQL> dbms_service.delete_service(‘<TARGET PDB_NAME>’);
Source CDB Env
Source Environment of this recently Restored Container Database DEVCDB
. /u01/DEV8010/db/19.0.0/DEVCDB_erpdevdb.env
Prepare the Final Commands to run as below :
Run the following steps to: Close, Unplug and Drop the Source PDB from Target CDB.
sqlplus / as sysdba
alter pluggable database “ERPPROD” close;
alter pluggable database “ERPPROD” unplug into ‘/u01/DEV8010/db/19.0.0/dbs/ERPPROD_PDBDesc.xml’;
drop pluggable database “ERPPROD”;
Run the following steps to: Rename the target PDB .
create pluggable database “ERPDEV” using ‘/u01/DEV8010/db/19.0.0/dbs/ERPPROD_PDBDesc.xml’ NOCOPY SERVICE_NAME_CONVERT=(‘ebs_ERPPROD’,’ebs_ERPDEV’,’ERPPROD_ebs_patch’,’ERPDEV_ebs_patch’, ‘ERPPROD’,’ERPDEV’);
alter pluggable database “ERPDEV” open read write;
===============================================
[oradev@erpdevdb ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 – Production on Thu Feb 3 09:44:37 2022
Version 19.12.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production
Version 19.12.0.0.0
SQL> alter pluggable database “ERPPROD” close;
Pluggable database altered.
SQL> alter pluggable database “ERPPROD” unplug into ‘/u01/DEV8010/db/19.0.0/dbs/ERPPROD_PDBDesc.xml’;
Pluggable database altered.
SQL> drop pluggable database “ERPPROD”;
Pluggable database dropped.
SQL> create pluggable database “ERPDEV” using ‘/u01/DEV8010/db/19.0.0/dbs/ERPPROD_PDBDesc.xml’ NOCOPY SERVICE_NAME_CONVERT=(‘ebs_ERPPROD’,’ebs_ERPDEV’,’ERPPROD_ebs_patch’,’ERPDEV_ebs_patch’, ‘ERPPROD’,’ERPDEV’);
Pluggable database created.
SQL>
SQL> alter pluggable database “ERPDEV” open read write;
Pluggable database altered.
SQL>
Section 4.1.6 > Step 5 and 6 ( Continued after Step 4 )
Section 4.1.6 > Step 5 commands:
Startup the PDB and save its state by running the following commands:
alter pluggable database all open;
alter pluggable database all save state instances=all;
SQL>alter pluggable database all open;
Pluggable database altered.
SQL>alter pluggable database all save state instances=all;
Pluggable database altered.
SQL>
Section 4.1.6 > Step 6 command:
Run the library update script against the Oracle database
cd /u01/DEV8010/db/19.0.0/appsutil/install/ERPDEV_erpdevdb
sqlplus / as sysdba
@adupdlib.sql so
[oradev@erpdevdb ~]$ cd /u01/DEV8010/db/19.0.0/appsutil/install/ERPDEV_erpdevdb
[oradev@erpdevdb ERPDEV_erpdevdb]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 – Production on Thu Feb 3 10:06:20 2022
Version 19.12.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production
Version 19.12.0.0.0
SQL> @adupdlib.sql so
PL/SQL procedure successfully completed.
SQL>
Ensure the Target Services are configured successfully:
SQL> Select name from v$active_services;
NAME
—————————————————————-
ebs_ERPDEV
DEVCDBXDB
SYS$BACKGROUND
SYS$USERS
DEVCDB
erpdev
ERPDEV_ebs_patch
7 rows selected.
SQL>
Ensure Below Services are up and running on Accurate Target Port:
1. ERPDEV
2. ERPDEV_ebs_patch
3. erpdev
[oradev@erpdevdb dbs]$ lsnrctl status DEVCDB
LSNRCTL for Linux: Version 19.0.0.0.0 – Production on 03-FEB-2022 10:55:29
Copyright (c) 1991, 2021, Oracle. All rights reserved.
Connecting to DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=erpdevdb.srrco.org.sa)(PORT=1531)))
STATUS of the LISTENER
————————
Alias DEVCDB
Version TNSLSNR for Linux: Version 19.0.0.0.0 – Production
Start Date 03-FEB-2022 10:53:45
Uptime 0 days 0 hr. 1 min. 44 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/DEV8010/db/19.0.0/network/admin/listener.ora
Listener Log File /u01/DEV8010/db/19.0.0/log/diag/tnslsnr/erpdevdb/devcdb/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=erpdevdb.srrco.org.sa)(PORT=1531)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=erpdevdb.srrco.org.sa)(PORT=5502))(Security=(my_wallet_directory=/u01/DEV8010/db/19.0.0/admin/DEVCDB/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary…
Service “DEVCDB” has 1 instance(s).
Instance “DEVCDB”, status READY, has 1 handler(s) for this service…
Service “DEVCDBXDB” has 1 instance(s).
Instance “DEVCDB”, status READY, has 1 handler(s) for this service…
Service “ERPDEV_ebs_patch” has 1 instance(s).
Instance “DEVCDB”, status READY, has 1 handler(s) for this service…
Service “ebs_ERPDEV” has 1 instance(s).
Instance “DEVCDB“, status READY, has 1 handler(s) for this service…
Service “erpdev” has 1 instance(s).
Instance “DEVCDB”, status READY, has 1 handler(s) for this service…
The command completed successfully
[oradev@erpdevdb dbs]$
4.1.7 Set the Target UTL_FILE_DIR Values in Oracle Database
Take a fresh Putty Session
Source PDB Env
. /u01/DEV8010/db/19.0.0/ERPDEV_erpdevdb.env
cd /u01/DEV8010/db/19.0.0/appsutil/bin
perl txkCfgUtlfileDir.pl -contextfile=/u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml -oraclehome=/u01/DEV8010/db/19.0.0 -outdir=/u01/DEV8010/db/19.0.0/appsutil/log -mode=getUtlFileDir
……………………………………………………………………………………….
[oradev@erpdevdb bin]$ cd /u01/DEV8010/db/19.0.0/appsutil/bin
[oradev@erpdevdb bin]$ perl txkCfgUtlfileDir.pl -contextfile=/u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml -oraclehome=/u01/DEV8010/db/19.0.0 -outdir=/u01/DEV8010/db/19.0.0/appsutil/log -mode=getUtlFileDir
Enter the APPS Password:
Script Name : txkCfgUtlfileDir.pl
Script Version : 120.0.12020000.11
Started : Thu Feb 3 11:01:36 +03 2022
Log File : /u01/DEV8010/db/19.0.0/appsutil/log/TXK_UTIL_DIR_Thu_Feb_3_11_01_31_2022/txkCfgUtlfileDir.log
Context file: /u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml exists.
========================================================
Successfully generated the below file with UTL_FILE_DIR content:
/u01/DEV8010/db/19.0.0/dbs/ERPDEV_utlfiledir.txt
=========================================================
Completed : Thu Feb 3 11:01:38 +03 2022
Successfully Completed the script
ERRORCODE = 0 ERRORCODE_END
[oradev@erpdevdb bin]$
====================================
Review the File generated at the PATH: $ORACLE_HOME/dbs
[oradev@erpdevdb dbs]$ cd /u01/DEV8010/db/19.0.0/dbs
[oradev@erpdevdb dbs]$ pwd
/u01/DEV8010/db/19.0.0/dbs
[oradev@erpdevdb dbs]$ ls -lrt *.txt
-rw-r–r–. 1 oradev dba 415 Jan 13 10:12 ERPPROD_datatop.txt
-rw-r–r–. 1 oradev dba 2977 Jan 13 16:58 ERPPROD_utlfiledir.txt
-rw-r–r–. 1 oradev dba 2977 Jan 14 04:13 BKP_ERPPROD_utlfiledir.txt
-rw-r–r–. 1 oradev dba 2975 Feb 3 11:01 ERPDEV_utlfiledir.txt
[oradev@erpdevdb dbs]$
[oradev@erpdevdb dbs]$ cat ERPDEV_utlfiledir.txt
[oradev@erpdevdb dbs]$ cat ERPDEV_utlfiledir.txt
#############################################################################
# This file stores the UTL FILE DIR parameter values used #
# by various EBS product teams #
# #
# ***** DO NOT CHANGE THE NAME OR LOCATION OF THIS FILE ***** #
# #
# IMPORTANT NOTES: #
# ================ #
# #
# 1. OS path should not be a symbolic link #
# #
# 2. OS path given in the list should physically exist with proper #
# permissions #
# #
# 3. OS path /usr/tmp which generally is a symbolic link is replaced with #
# <ORACLE_BASE>/temp/<PDB_NAME> #
# #
# Make sure that OS path <ORACLE_BASE>/temp/<PDB_NAME> exists #
# #
# 4. <APPLPTMP> variable on Apps Tier should match with one of the OS paths #
# in the list. Otherwise you need to modify <APPLPTMP> on all Apps tiers #
# and run Autoconfig #
# #
# 5. Ensure that all the paths defined in this file exist physically on the #
# server #
# #
# 6. Maximum allowed length of UTL_FILE_DIR parameter (combined length of #
# all paths separated by commas) is 4000 characters, hence ensure that #
# value does not exceed the limit #
# #
#===========================================================================#
# For reference, original contents of UTL_FILE_DIR without any updates are #
# retained in below file: #
# #
# /u01/DEV8010/db/19.0.0/appsutil/log/TXK_UTIL_DIR_Thu_Feb_3_11_01_31_2022/ERPDEV_utlfiledir.txt
#############################################################################
/u01/erpprod/db/temp/ERPPROD
/u01/erpprod/db/temp/ERPPROD
/u01/erpprod/db/19.0.0/appsutil/outbound/ERPPROD_erpproddb
/u01/erpprod/db/temp/ERPPROD
[oradev@erpdevdb dbs]$
Since Our ORACLE_BASE us /u01/DEV8010
Therefore we need to create a temp folder inside ORACLE_BASE
/u01/DEV8010/temp
UPDATE THE VALUES in ERPDEV_utlfiledir.txt with Valid and Target PATH
Source Production UTL Values | Target DEVELOPMENT UTL Values |
/u01/erpprod/db/temp/ERPPROD | /u01/DEV8010/temp/ERPDEV |
/u01/erpprod/db/19.0.0/appsutil/outbound/ERPPROD_erpproddb | /u01/DEV8010/db/19.0.0/appsutil/outbound/ERPDEV_erpdevdb |
[oradev@erpdevdb dbs]$ cat ERPDEV_utlfiledir.txt
#############################################################################
# This file stores the UTL FILE DIR parameter values used #
# by various EBS product teams #
# #
# ***** DO NOT CHANGE THE NAME OR LOCATION OF THIS FILE ***** #
# #
# IMPORTANT NOTES: #
# ================ #
# #
# 1. OS path should not be a symbolic link #
# #
# 2. OS path given in the list should physically exist with proper #
# permissions #
# #
# 3. OS path /usr/tmp which generally is a symbolic link is replaced with #
# <ORACLE_BASE>/temp/<PDB_NAME> #
# #
# Make sure that OS path <ORACLE_BASE>/temp/<PDB_NAME> exists #
# #
# 4. <APPLPTMP> variable on Apps Tier should match with one of the OS paths #
# in the list. Otherwise you need to modify <APPLPTMP> on all Apps tiers #
# and run Autoconfig #
# #
# 5. Ensure that all the paths defined in this file exist physically on the #
# server #
# #
# 6. Maximum allowed length of UTL_FILE_DIR parameter (combined length of #
# all paths separated by commas) is 4000 characters, hence ensure that #
# value does not exceed the limit #
# #
#===========================================================================#
# For reference, original contents of UTL_FILE_DIR without any updates are #
# retained in below file: #
# #
# /u01/DEV8010/db/19.0.0/appsutil/log/TXK_UTIL_DIR_Thu_Feb_3_11_01_31_2022/ERPDEV_utlfiledir.txt
#############################################################################
/u01/DEV8010/temp/ERPDEV
/u01/DEV8010/db/19.0.0/appsutil/outbound/ERPDEV_erpdevdb
[oradev@erpdevdb dbs]$
======================================
[oradev@erpdevdb bin]$ perl txkCfgUtlfileDir.pl -contextfile=/u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml -oraclehome=/u01/DEV8010/db/19.0.0 -outdir=/u01/DEV8010/db/19.0.0/appsutil/log -mode=setUtlFileDir
Enter the APPS Password:
Enter the SYSTEM Password:
Script Name : txkCfgUtlfileDir.pl
Script Version : 120.0.12020000.11
Started : Thu Feb 3 11:45:09 +03 2022
Log File : /u01/DEV8010/db/19.0.0/appsutil/log/TXK_UTIL_DIR_Thu_Feb_3_11_44_56_2022/txkCfgUtlfileDir.log
Context file: /u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml exists.
Completed : Thu Feb 3 11:45:12 +03 2022
ERROR DESCRIPTION:
(*******FATAL ERROR*******
PROGRAM : (txkCfgUtlfileDir.pl)
TIME : Thu Feb 3 11:45:12 2022
FUNCTION: main::validateUtlFileDir [ Level 1 ]
ERRORMSG: Directory does not exist.
)
ERRORCODE = 1 ERRORCODE_END
[oradev@erpdevdb bin]$ perl txkCfgUtlfileDir.pl -contextfile=/u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml -oraclehome=/u01/DEV8010/db/19.0.0 -outdir=/u01/DEV8010/db/19.0.0/appsutil/log -mode=setUtlFileDir
Enter the APPS Password:
Enter the SYSTEM Password:
Script Name : txkCfgUtlfileDir.pl
Script Version : 120.0.12020000.11
Started : Thu Feb 3 11:46:32 +03 2022
Log File : /u01/DEV8010/db/19.0.0/appsutil/log/TXK_UTIL_DIR_Thu_Feb_3_11_46_24_2022/txkCfgUtlfileDir.log
Context file: /u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml exists.
** WARNING: Incorrect value s_applptmp detected on Apps Tier nodes. Please check log for details
Completed : Thu Feb 3 11:46:36 +03 2022
Successfully Completed the script
ERRORCODE = 0 ERRORCODE_END
[oradev@erpdevdb bin]$
==================================
ERRORMSG: Directory does not exist.
This above error indicates a directory in the ERPDEV_utlfiledir.txt is missing or Does not Exist
[oradev@erpdevdb dbs]$ ll /u01/DEV8010/temp/ERPDEV
ls: cannot access /u01/DEV8010/db/temp/ERPDEV: No such file or directory
[oradev@erpdevdb dbs]$
[oradev@erpdevdb dbs]$ mkdir -p /u01/DEV8010/temp/ERPDEV
ONLY FOR INFORMATION ( REFERENCE SCREENSHOT BELOW)
====================
SET UTL FILE DIR
====================
[oradev@erpdevdb bin]$ perl txkCfgUtlfileDir.pl -contextfile=/u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml -oraclehome=/u01/DEV8010/db/19.0.0 -outdir=/u01/DEV8010/db/19.0.0/appsutil/log -mode=setUtlFileDir
Enter the APPS Password:
Enter the SYSTEM Password:
Script Name : txkCfgUtlfileDir.pl
Script Version : 120.0.12020000.11
Started : Thu Feb 3 11:46:32 +03 2022
Log File : /u01/DEV8010/db/19.0.0/appsutil/log/TXK_UTIL_DIR_Thu_Feb_3_11_46_24_2022/txkCfgUtlfileDir.log
Context file: /u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml exists.
** WARNING: Incorrect value s_applptmp detected on Apps Tier nodes.
Please check log for details
Completed : Thu Feb 3 11:46:36 +03 2022
Successfully Completed the script
ERRORCODE = 0 ERRORCODE_END
[oradev@erpdevdb bin]$
====================
SET CREATE FILE DIR
====================
cd /u01/DEV8010/db/19.0.0/appsutil/bin
perl txkCfgUtlfileDir.pl -contextfile=/u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml -oraclehome=/u01/DEV8010/db/19.0.0 -outdir=/u01/DEV8010/db/19.0.0/appsutil/log -mode=createDirObject
We will not run this since we have created the missing Directory Manually
====================
SET SYNCH UTL FILE DIR
====================
cd /u01/DEV8010/db/19.0.0/appsutil/bin
perl txkCfgUtlfileDir.pl -contextfile=/u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml -oraclehome=/u01/DEV8010/db/19.0.0 -outdir=/u01/DEV8010/db/19.0.0/appsutil/log -mode=syncUtlFileDir -skipautoconfig=yes
[oradev@erpdevdb bin]$ cd /u01/DEV8010/db/19.0.0/appsutil/bin
[oradev@erpdevdb bin]$
[oradev@erpdevdb bin]$ perl txkCfgUtlfileDir.pl -contextfile=/u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml -oraclehome=/u01/DEV8010/db/19.0.0 -outdir=/u01/DEV8010/db/19.0.0/appsutil/log -mode=syncUtlFileDir -skipautoconfig=yes
Enter the APPS Password:
Script Name : txkCfgUtlfileDir.pl
Script Version : 120.0.12020000.11
Started : Thu Feb 3 12:09:34 +03 2022
Log File : /u01/DEV8010/db/19.0.0/appsutil/log/TXK_UTIL_DIR_Thu_Feb_3_12_09_31_2022/txkCfgUtlfileDir.log
Context file: /u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml exists.
Completed : Thu Feb 3 12:09:38 +03 2022
Successfully Completed the script
ERRORCODE = 0 ERRORCODE_END
[oradev@erpdevdb bin]$
================================
You should be able to connect to apps schema on this new ERPDEV PDB
Connect using TOAD or xyz Tool
Verify the UTL FILE directory is correctly populated :
select * from apps.v$parameter2 where name=’utl_file_dir’
Since Our ORACLE_BASE is /u01/DEV8010
Therefore we ensured a temp folder inside ORACLE_BASE
/u01/DEV8010/temp
Check Table FND_NODES
( If Source PDB records does not exist then skip the FND_CONC_CLONE.SETUP_CLEAN; )
EXEC FND_CONC_CLONE.SETUP_CLEAN;
COMMIT;
EXIT;
cd /u01/DEV8010/db/19.0.0/appsutil/clone/bin
perl adcfgclone.pl dbconfig /u01/DEV8010/db/19.0.0/appsutil/ERPDEV_erpdevdb.xml
X =============END OF DATABASE CLONING STEPS=============X
EBS 12.2.X – APPLICATION TIER CLONING:
3.2 Prepare the Source System Application Tier
Run Preclone on Source App Tier:
cd $ADMIN_SCRIPTS_ADMIN
perl adpreclone.pl appsTier
Ensure completion is 100% Successful.
Now Take TAR backup of EBS Run File System
cd <backup PATH>
tar -czf /backup_apps/EBS_BKPS/APPS_BKP_EBSapps`date +%d%m%y`.tgz $RUN_BASE/EBSapps
Transfer the tar file backup to Target EBS App Server and extract it
======================================
5.2 Configure the Target System Application Tier Nodes
IMPORTANT: Ensure oraInventory pointed in /etc/oraInst.loc must not contain the Same target PATH OR same Target Oracle Home Names, If exist then it is better deAttach those which may conflict with your Cloning session.
( Example : /u01/orainventory/ContentsXML/inventory.xml can be reviewed before proceeding)
Start the Cloning process as below :
[appldev@erpdevapp bin]$ cd /u01/Ebiz_Dev8010/fs1/EBSapps/comn/clone/bin
[appldev@erpdevapp bin]$ pwd
/u01/Ebiz_Dev8010/fs1/EBSapps/comn/clone/bin
[appldev@erpdevapp bin]$ ls -lrt
total 296
-rwxrwxr-x. 1 appldev dba 5101 Nov 26 2012 adchkutl.sh
-rwxrwxr-x. 1 appldev dba 100123 Jan 15 04:03 adclone.pl
-rwxrwxr-x. 1 appldev dba 48314 Jan 15 04:03 adclonectx.pl
-rwxrwxr-x. 1 appldev dba 128221 Jan 15 04:03 adcfgclone.pl
-rwxrwxr-x. 1 appldev dba 10887 Jan 15 04:03 adaddnode.pl
[appldev@erpdevapp bin]$ hostname
erpdevapp.srrco.org.sa
[appldev@erpdevapp bin]$ perl adcfgclone.pl appsTier
Copyright (c) 2002, 2015 Oracle Corporation
Redwood Shores, California, USA
Oracle E-Business Suite Rapid Clone
Version 12.2
adcfgclone Version 120.63.12020000.65
***********************************************************
In AD-TXK Delta 7, we recommend you clone the run and patch
file systems in a single operation using the ‘dualfs’ option.
Separate cloning of the run and patch file systems will be deprecated
************************************************************
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 /u01/Ebiz_Dev8010/fs1/EBSapps/comn/clone/bin/CloneContext_0116110816.log
Target System File Edition type [run] :
Provide the values required for creation of the new APPL_TOP Context file.
Target System Hostname (virtual or normal) [erpdevapp] : erpdevapp.srrco.org.sa
Target System Database SID : ERPDEV
Target System Database Server Node [erpdevapp] : erpdevdb.srrco.org.sa
Target System Base Directory : /u01/Ebiz_Dev8010/
Target System Base Directory set to /u01/Ebiz_Dev8010
Target System Current File System Base set to /u01/Ebiz_Dev8010/fs1
Target System Other File System Base set to /u01/Ebiz_Dev8010/fs2
Target System Fusion Middleware Home set to /u01/Ebiz_Dev8010/fs1/FMW_Home
Target System Web Oracle Home set to /u01/Ebiz_Dev8010/fs1/FMW_Home/webtier
Target System Appl TOP set to /u01/Ebiz_Dev8010/fs1/EBSapps/appl
Target System COMMON TOP set to /u01/Ebiz_Dev8010/fs1/EBSapps/comn
Target System Instance Home Directory [/u01/Ebiz_Dev8010] :
Target System Instance Top set to /u01/Ebiz_Dev8010/fs1/inst/apps/ERPDEV_erpdevapp
Do you want to preserve the Display [erp:0.0] (y/n) : n
Target System Display [erpdevapp:0.0] :
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 the target system to have the same port values as the source system (y/n) [y] ? : n
Target System Port Pool [0-99] : 10
Checking the port pool 5
done: Port Pool 5 is free
Report file located at /u01/Ebiz_Dev8010/fs1/inst/apps/ERPDEV_erpdevapp/admin/out/portpool.lst
Target System proxy port [80] :
UTL_FILE_DIR on database tier consists of the following directories.
1. /u01/DEV8010/temp/ERPDEV
2. /u01/DEV8010/db/19.0.0/appsutil/outbound/ERPDEV_erpdevdb
Choose a value which will be set as APPLPTMP value on the target node [1] :
The new APPL_TOP context file has been created :
/u01/Ebiz_Dev8010/fs1/inst/apps/ERPDEV_erpdevapp/appl/admin/ERPDEV_erpdevapp.xml
Check Clone Context logfile /u01/Ebiz_Dev8010/fs1/EBSapps/comn/clone/bin/CloneContext_0116110816.log for details.
Running Rapid Clone with command:
============END OF CLONING PROCESS==============
POST CLONING ACTIONS:
1. Change sysadmin password ( Different from Production )
2. Change apps password in EBS 12.2 requires below steps:After Finishing the Cloning Process Must change the apps password to differentiate it from Production
3.Run autoconfig with the newly changed password.
./autocfg.sh
Enter the APPS user password:
Start AdminServer using the $INST_TOP/admin/scripts/adadminsrvctl.sh script. Do not start any other application tier services.
$INST_TOP/admin/scripts/adadminsrvctl.sh start
Change the �apps� password in WLS Datasource as follows:Log in to WLS Administration Console.
b. Click Lock & Edit in Change Center.
c. In the Domain Structure tree, expand Services, then select Data Sources.
d. On the �Summary of JDBC Data Sources� page, select EBSDataSource.
e. On the �Settings for EBSDataSource� page, select the Connection Pool tab.
f. Enter the new password in the �Password� field.
g. Enter the new password in the �Confirm Password� field.
h. Click Save.
i. Click Activate Changes in Change Center.
http://srrco.server.com:7011/console
Username/Password <of weblogic>
Start all the application tier services using the below script
$INST_TOP/admin/scripts/adstrtal.sh
Verify the WLS Datastore changes as follows:Log in to WLS Administration Console.
b. In the Domain Structure tree, expand Services, then select Data Sources.
c. On the �Summary of JDBC Data Sources� page, select EBSDataSource.
d. On the �Settings for EBSDataSource� page, select Monitoring > Testing.
e. Select �oacore_server1�.
f. Click Test DataSource
g. Look for the message �Test of EBSDataSource on server oacore_server1 was successful�.