Cloning Oracle E-Business Suite Release 12.2 with
Multitenant Database Using Rapid Clone (Doc ID 2552208.1)
Cloning an Oracle Base Database Service 19c DB
System for Oracle E-Business Suite Release 12.2 (Doc ID 2800199.1)
|
Backup initora &
Apps context files
[oracle@PRD-nEBSDB01 ~]$ . NPROD_PRD-nEBSDB01.env
[oracle@PRD-nEBSDB01 ~]$ echo $ORACLE_SID
NPROD
[oracle@PRD-nEBSDB01 ~]$ time perl
$ORACLE_HOME/appsutil/scripts/$CONTEXT_NAME/adpreclone.pl dbTier (approx. less than 1 mins)
[oracle@PRD-nEBSDB01 ~]$ cd
$ORACLE_HOME/appsutil/scripts/$CONTEXT_NAME
[oracle@PRD-nEBSDB01 NPROD_PRD-nEBSDB01]$
time adpreclone.pl dbTier
APPS Password :
Log file located at
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/log/NPROD_PRD-nEBSDB01/StageDBTier_10150929.log
/
50% completed
Completed Stage...
Tue Oct 15 09:30:21 2024
This is a CDB instance.
Hence not checking duplicate data files.
real 0m32.788s
user 0m6.347s
sys 0m9.611s
[oracle@PRD-nEBSDB01
19.18.0]$ time tar -czf 19c_dbhome_1_15oct24.tar.gz
dbhome_1 (approx.
15 mins)
[oracle@PRD-nEBSDB01
19.18.0]$
[applmgr@PRD-nEBSAPP01 ~]$ time
adpreclone.pl appsTier (approx. 22 mins)
[applmgr@PRD-nEBSAPP01 ~]$
verified can be deleted
unwanted other than clone folder or not:
grep s_clonestage $CONTEXT_FILE
du -sh $COMMON_TOP/*
ls -ltrh
$COMMON_TOP/*/FMW/FMW_Home.jar
ls -ltrh
$PATCH_BASE/EBSapps/comn/*/FMW/FMW_Home.jar
(created when ran
adpreclone this can be deleted)
find $COMMON_TOP/adopclone_*
-iname FMW_Home.jar (this can be deleted which has
previous server names)
[applmgr@HQ01-nEBSAPP02 ~]$ ls -ltrh $COMMON_TOP/*/FMW/FMW_Home.jar
-rw-r--r--. 1
applmgr oinstall 9.2G Oct 15 2024
/u01/NPROD/fs1/EBSapps/comn/clone/FMW/FMW_Home.jar
[applmgr@PRD-nEBSAPP01 fs1]$ cd
$RUN_BASE
[applmgr@PRD-nEBSAPP01 fs1]$ time tar
-czf /u01/NPROD/EBSapps_fs1_25apr2026.tar.gz EBSapps (approx. 45 mins)
real 44m34.916s
user 28m37.148s
sys 2m36.829s
[applmgr@PRD-nEBSAPP01 fs1]$
[applmgr@uatapp01 UATPDB]$ time time tar -xzf EBSapps_fs2_10042021.tar.gz -C /u01/UATPDB/fs2
(approx. 7 mins)
best approach to delete existing Database on test server
Method-1
(this drops database plus archivelog files from RECO and spfile also)
-bash-4.1$ df -h
RMAN> select
name,OPEN_MODE from v$database;
RMAN> STARTUP
FORCE MOUNT
RMAN> ALTER
SYSTEM ENABLE RESTRICTED SESSION;
RMAN> select
INST_ID,value from gv$diag_info where name='Diag Trace';
RMAN> delete
noprompt archivelog alX; (no need if executing below command)
RMAN> DROP
DATABASE INCLUDING BACKUPS NOPROMPT; ( worked fine except current i.e. 2 for th#1 & 3 for
th#2))
-bash-4.1$ df -h
|
4.1.3.1 Create the Context File for a
Single-Node Database
19.x:catcdb.sql failed with "Perl Lib
Version (5.32.0) Doesn't Match Executable '/usr/bin/perl' Version (5.16.3)
" (Doc ID 2919480.1)
[oracle@uatdb01 ~]$ which perl
/usr/bin/perl
[oracle@uatdb01 ~]$ perl -V
/dev/null: Perl lib version (5.36.0) doesn't
match executable '/usr/bin/perl' version (5.26.3) at
/u01/app/oracle/product/19.18.0/dbhome_1/perl/lib/5.36.0/x86_64-linux-thread-multi/Config.pm
line 62.
Compilation failed in require.
BEGIN failed--compilation aborted.
[oracle@uatdb01 ~]$
export
PATH=$ORACLE_HOME/perl/bin:$ORACLE_HOME/bin:$PATH
[oracle@uatdb01 ~]$ which perl
/u01/app/oracle/product/19.18.0/dbhome_1/perl/bin/perl
[oracle@uatdb01 ~]$ perl -v
This is perl 5, version 36, subversion 0
(v5.36.0) built for x86_64-linux-thread-multi
cd $ORACLE_HOME
ls -ltr $ORACLE_HOME/ora*
cat /etc/oraInst.loc
# central
inventory location
#inventory_loc=/u01/app/oraInventory
inst_group=oinstall
cat vi
/u01/app/oraInventory/ContentsXML/inventory.xml ---> remove existing registered homes
vi
/u01/app/oraInventory/ContentsXML/inventory.xml (remove already registerd home
entry if exits)
WARNING: RC-50013: Fatal: Instantiate driver
did not complete successfully.
#####---- If cloned
instance PDB.xml is available we cannot use as utlfile id defined init
#####----- Mandatory
to generated xml file for clone instance
$ ls
-ltrh ~/UATPDB_uatdb01.xml
$ ls
-ltrh $ORACLE_HOME/appsutil/UATPDB_uatdb01.xml
$ [oracle@uatdb01
dbhome_1]$ ls -ltrh
$ORACLE_HOME/appsutil/NPROD_PRD-nEBSDB01.xml
$ time perl
$ORACLE_HOME/appsutil/clone/bin/adclonectx.pl
contextfile=$ORACLE_HOME/appsutil/NPROD_PRD-nEBSDB01.xml template=$ORACLE_HOME/appsutil/template/adxdbctx.tmp
[oracle@uatdb01 ~]$ perl
$ORACLE_HOME/appsutil/clone/bin/adclonectx.pl
contextfile=$ORACLE_HOME/appsutil/NPROD_PRD-nEBSDB01.xml
template=$ORACLE_HOME/appsutil/template/adxdbctx.tmp
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
Running:
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/clone/bin/../jre/bin/java
-Xmx600M -Doracle.jdbc.autoCommitSpecCompliant=false -classpath
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/clone/bin/../jlib/ojdbc8.jar:/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/clone/bin/../jlib/xmlparserv2.jar:/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/clone/bin/../jlib/java:
oracle.apps.ad.context.CloneContext -e
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/NPROD_PRD-nEBSDB01.xml -tmpl
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/template/adxdbctx.tmp
Enter the APPS password :
Log file located at
/home/oracle/CloneContext_0714223154.log
Provide the values required for creation of
the new Database Context file.
Target System Hostname (virtual or normal)
[uatdb01] :
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] ? :
Target System Base Directory : /u01/app/oracle
Target Instance is RAC (y/n) [y] : n
Target System CDB Name : uatcdb
Target System PDB Name : UATPDB
Oracle OS User [oracle] :
Oracle OS Group [oinstall] :
Role separation is supported y/n [n] ? :
Number of DATA_TOP's on the Target System [4]
: 1
Target System DATA_TOP Directory 1 : +DATA /u01/app/oracle/oradata
Specify value for OSBACKUPDBA group
[oinstall] :
Specify value for OSDGDBA group [oinstall] :
Specify value for OSKMDBA group [oinstall] :
Specify value for OSRACDBA group [oinstall] :
Target System RDBMS ORACLE_HOME Directory
[/u01/app/oracle/19.0.0] : /u01/app/oracle/product/19.18.0/dbhome_1
Do you want to preserve the Display
[localhost:10.0] (y/n) : n
Target System Display [uatdb01:0.0] :
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] : 0
Report file located at
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/temp/portpool.lst
New context path and file name
[/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/UATPDB_uatdb01.xml] :
The new database context file has been
created :
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/UATPDB_uatdb01.xml
contextfile=/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/UATPDB_uatdb01.xml
Check Clone Context logfile
/home/oracle/CloneContext_0714223154.log for details.
[oracle@uatdb01 ~]$
# netstat -tuplen |
grep 1521 --->to check running port
# netstat -tulpn
|grep LISTEN |grep tnslsnr
[grid@uatdb01
~]$ lsnrctl stop
[grid@uatdb01
~]$ netstat -tuplen | grep 1521
# echo 3
> /proc/sys/vm/drop_caches && swapoff -a && swapon -a
&& printf '\n%s\n' ' Ram-cache and the swap get cleared'
# Update ETCC check script with new files
[oracle@uatdb01 ~]$ grep
'$Header' $ORACLE_HOME/appsutil/etcc/checkDBpatch.sh
# $Header: checkDBpatch.sh 120.55 2017/11/02
09:53:58 paholman noship $
[oracle@uatdb01 ~]$ unzip
-o /u02/applmgr/p17537119_R12_GENERIC.zip -d $ORACLE_HOME/appsutil/etcc
[oracle@uatdb01 ~]$ grep checkDBpatch.sh
$ORACLE_HOME/appsutil/etcc/checkDBpatch.sh
# $Header: checkDBpatch.sh 120.123 2024/05/22
01:10:47 chrhill noship $
[oracle@uatdb01 ~]$ ls
-ltrh $ORACLE_HOME/appsutil/*.xml
[oracle@uatdb01 ~]$ cp UATPDB_uatdb01.xml
$ORACLE_HOME/appsutil/ ##-- no use of restoring old xml as it has utlfile values and
will get error
# Set Proper Path and run dbtechstack
$ export
PATH=$ORACLE_HOME/perl/bin:$ORACLE_HOME/bin:$PATH
[oracle@uatdb01 ~]$ which perl
/u01/app/oracle/product/19.18.0/dbhome_1/perl/bin/perl
[oracle@uatdb01 ~]$ perl -v
This is perl 5, version 36, subversion 0
(v5.36.0) built for x86_64-linux-thread-multi
[oracle@uatdb01 ~]$ ps -fux
# Relink RDBMS Binaries:
cd $ORACLE_HOME/bin
pwd
relink all
cd $ORACLE_HOME/rdbms/lib
pwd
make -f ins_rdbms.mk rac_off
cd $ORACLE_HOME/rdbms/lib
pwd
make -f ins_rdbms.mk ioracle
pwd
[oracle@uatdb01 ~]$ ls
-ltrh $ORACLE_HOME/appsutil/*.xml
[oracle@uatdb01 ~]$ time perl $ORACLE_HOME/appsutil/clone/bin/adcfgclone.pl
dbTechStack $ORACLE_HOME/appsutil/UATPDB_uatdb01.xml
[oracle@uatdb01 ~]$ time perl
$ORACLE_HOME/appsutil/clone/bin/adcfgclone.pl dbTechStack
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/UATPDB_uatdb01.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/app/oracle/product/19.18.0/dbhome_1/appsutil/clone/bin/adclone.pl
java=/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/clone/bin/../jre
mode=apply stage=/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/clone
component=dbTechStack method=CUSTOM
dbctxtg=/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/UATPDB_uatdb01.xml
showProgress contextValidated=false
Beginning rdbms home Apply - Sun Jul 14
23:05:40 2024
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/clone/bin/../jre/bin/java
-Xmx600M -Doracle.jdbc.autoCommitSpecCompliant=false -DCONTEXT_VALIDATED=false
-Doracle.installer.oui_loc=/u01/app/oracle/product/19.18.0/dbhome_1/oui
-classpath
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/clone/jlib/xmlparserv2.jar:/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/clone/jlib/ojdbc8.jar:/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/clone/jlib/java:/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/clone/jlib/oui/OraInstaller.jar:/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/clone/jlib/oui/ewt3.jar:/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/clone/jlib/oui/share.jar:/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/clone/jlib/oui/srvm.jar:/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/clone/jlib/ojmisc.jar oracle.apps.ad.clone.ApplyDBTechStack -e
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/UATPDB_uatdb01.xml -stage
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/clone -showProgress
APPS Password : Log file located at
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/log/UATPDB_uatdb01/ApplyDBTechStack_07142305.log
| 0% completed
Log file located at
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/log/UATPDB_uatdb01/ApplyDBTechStack_07142305.log
- 100% completed
Completed Apply...
Sun Jul 14 23:08:43 2024
Running ETCC to check status of DB technology
patches...
+===============================================================+
| Copyright (c) 2005, 2017 Oracle and/or its
affiliates. |
| All rights reserved. |
| Oracle E-Business Suite Release
12.2 |
| Database EBS Technology Codelevel
Checker |
+===============================================================+
Using context file from command line
argument:
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/UATPDB_uatdb01.xml
Starting Database EBS Technology Codelevel
Checker, Version 120.55
Sun Jul 14 23:08:43 +03 2024
Log file for this session :
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/etcc/checkDBpatch_3495047.log
Bugfix XML file version: 120.0.12020000.39
This file will be used for identifying
missing bugfixes.
Mapping XML file version: 120.0.12020000.12
This file will be used for mapping bugfixes
to patches.
[WARNING] DB-ETCC: Bugfix XML file
(/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/etcc/txk_R1220_DB_base_bugs.xml)
in current directory is more than 30 days old.
Check
if a newer version is available in patch 17537119.
Identifying database release.
Database release set to 19.0.0.0.
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.
Resolve the database connectivity issue, and
then rerun DB-ETCC.
+-----------------------------------------------------------------------------+
Checking Bugfix XML file for 19.0.0.0
Could not get list of bugfixes from
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/etcc/txk_R1220_DB_base_bugs.xml
for Database version 19.0.0.0.
Verify correct XML file is being used and
then retry.
WARNING: ETCC did not run successfully. Run
the command '/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/etcc/checkDBpatch.sh
contextfile=/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/UATPDB_uatdb01.xml'
from commandline and make sure it completes successfully. Failure to do so
might result in ADOP related issues.
real
3m17.992s
user
1m1.015s
sys
0m21.381s
[oracle@uatdb01 ~]$
# Verify inventory registered
$ cat
/u01/app/oraInventory/ContentsXML/inventory.xml
# Create listener and tns files for CDB
$ cd
$ORACLE_HOME/appsutil
$ .
$ORACLE_HOME/appsutil/txkSetCfgCDB.env
-dboraclehome=/u01/app/oracle/product/19.18.0/dbhome_1
$ cp
$ORACLE_HOME/network/admin/listener.ora
$ORACLE_HOME/network/admin/listener.ora_bkp`date +%d-%m-%y`
$ cp
$ORACLE_HOME/network/admin/tnsnames.ora
$ORACLE_HOME/network/admin/tnsnames.ora_bkp`date +%d-%m-%y`
$ [oracle@uatdb01 admin]$ ls -ltrh $ORACLE_HOME/appsutil/bin/txkGenCDBTnsAdmin.pl
|
Edit according to
environment
$ [oracle@uatdb01 admin]$ perl $ORACLE_HOME/appsutil/bin/txkGenCDBTnsAdmin.pl
-dboraclehome=/u01/app/oracle/product/19.18.0/dbhome_1 -cdbname=uatcdb -cdbsid=uatcdb -dbport=1521
-outdir=$ORACLE_HOME/appsutil/log -israc=no
|
$ vi $ORACLE_HOME/network/admin/listener.ora
$ vi $ORACLE_HOME/network/admin/tnsnames.ora
[oracle@uatdb01 ~]$ cd $ORACLE_HOME/appsutil/scripts/UATPDB_uatdb01
# netstat
-tuplen|grep 1521
|
Edit according to
environment
[oracle@uatdb01 UATPDB_uatdb01]$
time ./adcdblnctl.sh start uatcdb
|
Waiting for service UATPDB to be available...
Waiting for service UATPDB to be available...
real
5m15.740s
user
0m0.300s
sys
0m0.628s
[oracle@uatdb01 UATPDB_uatdb01]$
[grid@uatdb01
~]$ netstat -tuplen | grep 1521
[grid@uatdb01
~]$ netstat -tuplen | grep 15*
[grid@uatdb01
~]$ lsnrctl start
[oracle@uatdb01
~]$ lsnrctl status uatcdb
tnsping uatcdb
vi
$ORACLE_HOME/network/admin/tnsnames.ora
prodcdb =
(DESCRIPTION =
(ADDRESS = (PROTOCOL=tcp)(HOST=PRD-nEBSDB01.areef.com)(PORT=1521))
(CONNECT_DATA = (SERVICE_NAME=prodcdb)(INSTANCE_NAME=prodcdb1))
)
[oracle@uatdb01 ~]$ tnsping prodcdb
[grid@uatdb01 ~]$ lsnrctl
status
[oracle@uatdb01 ~]$ echo $ORACLE_SID
uatcdb
Edit for configure static listener
[oracle@uatdb01 admin]$ vi $ORACLE_HOME/network/admin/listener.ora
uatcdb =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = uatdb01.areef.com)(PORT
= 1521))
)
)
SID_LIST_uatcdb =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME=
/u01/app/oracle/product/19.18.0/dbhome_1)
(SID_NAME = uatcdb)
(INSTANCE_NAME = uatcdb)
)
)
USE_SID_AS_SERVICE_testcdb = ON
STARTUP_WAIT_TIME_testcdb = 0
CONNECT_TIMEOUT_testcdb = 10
TRACE_LEVEL_testcdb = OFF
LOG_DIRECTORY_testcdb = /u01/app/oracle/product/19.18.0/dbhome_1/network/admin
LOG_FILE_testcdb = testcdb
TRACE_DIRECTORY_testcdb = /u01/app/oracle/product/19.18.0/dbhome_1/network/admin
TRACE_FILE_testcdb = testcdb
ADMIN_RESTRICTIONS_testcdb = ON
SUBSCRIBE_FOR_NODE_DOWN_EVENT_testcdb = OFF
LOG_STATUS_testcdb = ON
INBOUND_CONNECT_TIMEOUT_testcdb = 60
DIAG_ADR_ENABLED_testcdb = ON
ADR_BASE_testcdb = /u01/app/oracle/product/19.18.0/dbhome_1/log
[oracle@uatdb01 admin]$ lsnrctl stop $ORACLE_SID
[oracle@uatdb01 admin]$ lsnrctl start $ORACLE_SID
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 24-JUL-2024 14:17:44
Copyright (c) 1991, 2022, Oracle. All rights reserved.
Starting /u01/app/oracle/product/19.18.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 19.0.0.0.0 - Production
System parameter file is /u01/app/oracle/product/19.18.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/19.18.0/dbhome_1/log/diag/tnslsnr/uatdb01/uatcdb/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=uatdb01.areef.com)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=uatdb01.areef.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias uatcdb
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 24-JUL-2024 14:17:44
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/19.18.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/19.18.0/dbhome_1/log/diag/tnslsnr/uatdb01/uatcdb/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=uatdb01.areef.com)(PORT=1521)))
Services Summary...
Service "uatcdb" has 1 instance(s).
Instance "uatcdb", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@uatdb01 admin]$
SQL> alter system register;
[oracle@uatdb01 admin]$ lsnrctl stat
[oracle@uatdb01 UATPDB_uatdb01]$ lsnrctl stat $ORACLE_SID
Service "uatcdb" has 1 instance(s).
Instance "uatcdb", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@uatdb01 UATPDB_uatdb01]$
# Create Parameter file and disable all
prod_sid and create clone_sid
[oracle@uatdb01 dbs]$ grep -in prod $ORACLE_HOME/dbs/initclone19c.txt
[oracle@uatdb01 dbs]$ cp $ORACLE_HOME/dbs/initclone19c.txt $ORACLE_HOME/dbs/inituatcdb.ora
[oracle@uatdb01 dbs]$ cp $ORACLE_HOME/dbs/initclone19c.txt $ORACLE_HOME/dbs/inittestcdb.ora
[oracle@uatdb01 dbs]$ vi $ORACLE_HOME/dbs/inituatcdb.ora
*._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
*._sort_elimination_cost_ratio=5
*._system_trig_enabled=TRUE
*._trace_files_public=FALSE
*.aq_tm_processes=1
#*.audit_file_dest='/u01/app/oracle/admin/prodcdb/adump'
*.audit_sys_operations=TRUE
#*.cluster_database=TRUE
#*.cluster_database_instances=2
*.compatible='19.0.0'
#*.control_files='+DATA/PRODCDB/CONTROLFILE/current.482.1155014933','+RECO/PRODCDB/CONTROLFILE/current.650.1155933'
*.cursor_sharing='EXACT'
*.db_block_checking='FALSE'
*.db_block_checksum='TRUE'
*.db_block_size=8192
#*.db_create_file_dest='+DATA'
*.db_domain=''
*.db_files=512
#*.db_name='prodcdb'
#*.db_recovery_file_dest='+RECO'
*.db_recovery_file_dest_size=1610612736000
*.diagnostic_dest='/u01/app/oracle'
#*.dispatchers='(PROTOCOL=TCP) (SERVICE=prodcdbXDB)'
*.dml_locks=10000
*.enable_pluggable_database=true
*.event='10946 trace name context forever, level 8454144'
*.filesystemio_options='SETALL'
family:dw_helper.instance_mode='read-only'
#prodcdb1.instance_number=1
#prodcdb2.instance_number=2
*.job_queue_processes=2
*.local_listener='-oraagent-dummy-'
#prodcdb1.local_listener='PRD-nEBSDB01.areef.com:1521'
#prodcdb2.local_listener='prd-nebsdb02.areef.com:1521'
#*.log_archive_dest_1='LOCATION=+RECO'
*.log_archive_format='%t_%s_%r.dbf'
*.log_buffer=10485760
*.log_checkpoint_interval=100000
*.log_checkpoint_timeout=1200
*.log_checkpoints_to_alert=TRUE
*.max_dump_file_size='UNLIMITED'
*.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_real_time_statistics=FALSE#MP
*.optimizer_secure_view_merging=FALSE
*.parallel_degree_policy=MANUAL #MP
*.parallel_force_local=TRUE
*.parallel_max_servers=8
*.parallel_min_servers=0
*.pga_aggregate_limit=0
*.pga_aggregate_target=17179869184
*.plsql_code_type='NATIVE'
*.processes=8000
*.recyclebin='off'
*.remote_login_passwordfile='exclusive'
*.result_cache_max_size=629145600
*.sec_case_sensitive_logon=FALSE
#*.service_names='prodcdb'
*.session_cached_cursors=500
*.sessions=12040
*.sga_max_size=17179869184
*.sga_target=17179869184
*.shared_pool_reserved_size=142606336
*.shared_pool_size=838860800
*.sql92_security=TRUE
*.streams_pool_size=536870912
*.temp_undo_enabled=FALSE
#prodcdb2.thread=2
#prodcdb1.thread=1
*.undo_management='AUTO'
*.undo_retention=16500
#prodcdb1.undo_tablespace='UNDOTBS1'
#prodcdb2.undo_tablespace='UNDOTBS2'
*.workarea_size_policy='AUTO'
#Modify
and renaming parameters
*.audit_file_dest='/u01/app/oracle/admin/uatcdb/adump'
#*.control_files='+DATA/cntrl01a.dbf','+DATA/cntrl02b.dbf','+DATA/cntrl03c.dbf'#Restore Controlfile
*.control_files='/u01/app/oracle/oradata/UATCDB/cntrl01a.dbf'#Restore Controlfile
*.db_name='uatcdb'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=uatcdbXDB)'
*.local_listener='uatdb01.areef.com:1521'
*.service_names='uatcdb'
#remote_listener=''
#*.db_create_file_dest='+DATA'
*.db_create_file_dest='/u01/app/oracle/oradata'#---> for datafiles path will be (/u01/app/oracle/oradata/UATCDB/1ADFF3D3B95BC1D3E0635184620AAF4D/datafile/*.dbf)
#*.db_recovery_file_dest='+RECO'
*.db_recovery_file_dest='/u01/app/oracle/oradata' #---> for Flashback log Location & archive log date folders (path will be /u01/app/oracle/oradata/UATCDB/archivelog/2026_07_15)
#*.log_archive_dest_1='LOCATION=+RECO'
#*.log_archive_dest_1='LOCATION=for_u01_use_below_sql' #---> disable to use recovery dest (archives generated as per date folder)
# if
restoring from rman bkp pcs add below parameters also
#cluster_database=FALSE # Mandatory if restoring from RMAN bkp pcs.
#db_file_name_convert='+DATA/PROD/DATAFILE','+DATA','+DATA/PROD/TEMPFILE','+DATA'
#db_file_name_convert='+DATA/PROD/DATAFILE','/u01/app/oracle/oradata/UATCDB','+DATA/PROD/TEMPFILE','/u01/app/oracle/oradata/UATCDB'# Set according if restoring from rman bkp pcs for non ASM
#log_file_name_convert='+DATA/PROD/ONLINELOG','+DATA' # Set according if restoring from rman bkp pcs
#--SQL set commands
#--SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST = '/u01/app/oracle/oradata' SCOPE=BOTH SID='*';
#-- SQL> alter system set log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST' scope=both SID='*';
#########################--------------
if recloning with same name
$ du -sh /u01/app/oracle/admin/uatcdb/adump
$ rm –rf /u01/app/oracle/admin/uatcdb/adump/*
$ mkdir -p /u01/app/oracle/admin/uatcdb/adump
$ grep -in
'uat\|test\|dev\|clone' inituatcdb.ora —verify any parameters are typed wrong or not
# Create Password file for RMAN connections
#########################--------------
$ ls -ltrh $ORACLE_HOME/dbs/orapw*
$ orapwd file=$ORACLE_HOME/dbs/orapwuatcdb password=Psau_19cprod entries=30 force=y
$ ls -ltrh $ORACLE_HOME/dbs/*${ORACLE_SID}*
$ mv $ORACLE_HOME/dbs/spfileuatcdb.ora $ORACLE_HOME/dbs/spfileuatcdb.ora_bkp
[oracle@uatdb01 ~]$ cat $ORACLE_HOME/dbs/inittestcdb.ora
[oracle@uatdb01 ~]$ echo $ORACLE_SID
uatcdb
SQL> startup
nomount
set linesize 200;
col USERNAME for a10;
col PASSWORD_PROFILE for a10;
col LAST_LOGIN for a10;
col EXTERNAL_NAME for a10;
select * from v$pwfile_users;
SELECT value from v$diag_info where name='Diag Trace';
show parameter sec_case_sensitive_logon
show parameter listener
show parameter audit
SELECT INSTANCE_NAME, STATUS, DATABASE_STATUS FROM V$INSTANCE;
select * from v$pwfile_users;
SELECT INST_ID,value from gv$diag_info where name='Diag Trace';
select 'tail -f '||d.value||'/alert_'||i.INSTANCE_NAME||'.log' from gv$diag_info d,v$instance i where d.name='Diag Trace';
rman auxiliary sys/Psau_19cprod@uatcdb
rman target sys/Psau_19cprod@prodcdb
-sqlplus sys@uatcdb as sysdba ##-- verify syspassword connections
- sqlplus
sys@prodcdb as sysdba
-srvctl config database -d uatcdb
|
IF PROD SYS Password expired then reset same password in
ASM
[oracle@uatdb01 dbs]$ rman target sys/Psau_19cprod@prodcdb
Recovery Manager: Release 19.0.0.0.0 - Production on Wed May 7 11:54:01 2025 Version 19.18.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00554: initialization of internal recovery manager package failed RMAN-04005: error from target database: ORA-28001: the password has expired [oracle@uatdb01 dbs]$
select *
from v$pwfile_users;
[oracle@PRD-nEBSDB01 dbs]$ srvctl config database -d prodcdb
ASMCMD [+] > ls +DATA/PRODCDB/DATAFILE
[oracle@PRD-nEBSDB01 dbs]$ orapwd file=+DATA/PRODCDB/DATAFILE/orapwprodcdb
password=Psau_19cprod dbuniquename='prodcdb' entries=30 force=y
orapwd file=$ORACLE_HOME/dbs/orapwAHCTEST password=sys4nwr
entries=30 force=y --- the password of sys
must be same as the sys user of prod db
|
[root@uatdb01 ~]# echo 3 > /proc/sys/vm/drop_caches &&
swapoff -a && swapon -a && printf '\n%s\n' ' Ram-cache and the
swap get cleared'
[oracle@uatdb01 ~]$ screen –L
[oracle@uatdb01 ~]$ which which
which ()
{
( alias;
eval ${which_declare} ) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@
}
[oracle@uatdb01 ~]$ unset which
[oracle@uatdb01 ~]$ which which
/usr/bin/which
[oracle@uatdb01 ~]$
$ rman target sys/Psau_19cprod@prodcdb auxiliary
sys/Psau_19cprod@uatcdb
|& tee ~/rman_dup_`date +%d-%m-%y`.txt
Recovery Manager: Release 19.0.0.0.0 - Production on Mon Jul 15 10:52:57 2024
Version 19.18.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to target database: PRODCDB (DBID=3153088917)
connected to auxiliary database: UATCDB (not mounted)
RMAN> duplicate database to uatcdb from active database nofilenamecheck; ##--25Mins for 1.5TB after migrating VM to new
hardware.
Finished Duplicate Db at 07-MAY-25
RMAN> exit
Recovery Manager complete.
real 134m33.643s
user 0m19.130s
sys 0m3.511s
[oracle@uatdb01 admin]$
-- Database Size Total including TEMP & UNDO: 1.5TB
select
( select sum(bytes)/1024/1024/1024 data_size from dba_data_files ) +
( select nvl(sum(bytes),0)/1024/1024/1024 temp_size from dba_temp_files ) +
( select sum(bytes)/1024/1024/1024 redo_size from sys.v_$log ) +
( select sum(BLOCK_SIZE*FILE_SIZE_BLKS)/1024/1024/1024 controlfile_size from v$controlfile) "Size in GB"
from dual;
RMAN % calculation
made as per allotted channels for backup/restore
SQL>
set time on;
set sqlprompt "_user'@'_connect_identifier 'on' _date> "
alter session set nls_date_format='dd-Mon-yyyy hh24:mi:ss';
col OPNAME for a30
set pagesize 1000
set linesize 200;
select OPNAME,SOFAR/TOTALWORK*100 PCT, trunc(TIME_REMAINING/60) MIN_RESTANTES,
trunc(ELAPSED_SECONDS/60) MIN_ATEAGORA
from v$session_longops where TOTALWORK>0 and OPNAME like '%RMAN%';
RMAN Duplicate
Transfer Rate for duplicate
set time on;
set sqlprompt "_user'@'_connect_identifier 'on' _date> "
alter session set nls_date_format='dd-Mon-yyyy hh24:mi:ss';
set linesize 200;
SELECT 'DUPLICATE/RESTORE THROUGHPUT',
round(SUM(v.value/1024/1024/1024),1) Giga_BYTES_SOFAR,
round(SUM(v.value /1024/1024)/nvl((SELECT MIN(elapsed_seconds)
FROM v$session_longops
WHERE OPNAME LIKE 'RMAN: aggregate input'
AND SOFAR != TOTALWORK AND elapsed_seconds IS NOT NULL ),SUM(v.value /1024/1024)),2) mbytes_per_sec,n.name
FROM gv$sesstat v, v$statname n, gv$session s
WHERE v.statistic#=n.statistic#
AND n.name = 'physical write total bytes' AND v.sid = s.sid AND v.inst_id=s.inst_id AND s.program like 'rman@%'
GROUP BY 'DUPLICATE/RESTORE THROUGHPUT',n.name;
--Query
2 for % complete check
SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK,
ROUND (SOFAR/TOTALWORK*100, 2) "% COMPLETE"
FROM V$SESSION_LONGOPS
WHERE OPNAME LIKE 'RMAN%' AND OPNAME NOT LIKE '%aggregate%'
AND TOTALWORK! = 0 AND SOFAR <> TOTALWORK;
SELECT 'DUPLICATE/RESTORE THROUGHPUT',
round(SUM(v.value/1024/1024),1) mbytes_sofar,
round(SUM(v.value /1024/1024)/nvl((SELECT MIN(elapsed_seconds)
FROM v$session_longops
WHERE OPNAME LIKE 'RMAN: aggregate input'
AND SOFAR != TOTALWORK AND elapsed_seconds IS NOT NULL ),SUM(v.value /1024/1024)),2) mbytes_per_sec,n.name
FROM gv$sesstat v, v$statname n, gv$session s
WHERE v.statistic#=n.statistic#
AND n.name = 'physical write total bytes' AND v.sid = s.sid AND v.inst_id=s.inst_id AND s.program like 'rman@%'
GROUP BY 'DUPLICATE/RESTORE THROUGHPUT',n.name;
################################# if storage issue then drop unwanted undo from PDB
#################################
SQL> alter session set container=nprod;
show parameter undo
select tablespace_name as undo_contents from dba_tablespaces where contents like 'UNDO';
select TABLESPACE_NAME, sum(bytes)/1024/1024/1024 Allocated_in_GB from dba_data_files d where d.tablespace_name like '%UNDO%' GROUP BY tablespace_name;
select a.tablespace_name,
A.Allocated, B.Freespace,round(b.freespace/a.allocated*100) "PCT % Free"
from (select tablespace_name ,sum(bytes)/1024/1024/1024 Allocated from dba_data_files group by tablespace_name) A ,
(select tablespace_name,sum(bytes)/1024/1024/1024 Freespace
from dba_free_space group by tablespace_name) B
where a.tablespace_name=b.tablespace_name(+)
and b.tablespace_name like '%UNDO%'--to check status of individual Tablespace
ORDER BY "PCT % Free";
SQL> drop tablespace UNDOTBS2 including contents and datafiles;
SQL> drop tablespace APPS_UNDOTS1 including contents and datafiles;
SQL> drop tablespace UNDO_2 including contents and datafiles;
select tablespace_name,status from dba_temp_files;
select PROPERTY_VALUE FROM DATABASE_PROPERTIES WHERE PROPERTY_NAME IN ('DEFAULT_TEMP_TABLESPACE');
select group_name, tablespace_name from dba_tablespace_groups;
select TABLESPACE_NAME,tablespace_size/1024/1024/1024 totalGB,ALLOCATED_SPACE/1024/1024/1024 AllocSpaceGB,free_space/1024/1024/1024 FreeSpaceGB from dba_temp_free_space;
SQL> create temporary tablespace TEMP5 tempfile '+DATA' SIZE 2048M GROUP "TEMP_GRP";
SQL> ALTER TABLESPACE TEMP5 ADD TEMPFILE '+DATA' SIZE 1G AUTOEXTEND ON NEXT 1G MAXSIZE 30G;
SQL> alter database default temporary tablespace TEMP_GRP;
|
In NON ASM it worked in
below.
·
❌ GROUP clause in CREATE → invalid
·
✅ Create first, then ALTER
TABLESPACE ... TABLESPACE GROUP
CREATE TEMPORARY TABLESPACE
TEMP5
TEMPFILE
'/u04/app/orares/oradata/temp05.dbf'
SIZE 2G AUTOEXTEND ON NEXT
500M MAXSIZE 30G;
ALTER TABLESPACE TEMP5 TABLESPACE
GROUP TEMP_GRP;
|
SQL> select * from dba_tablespace_groups;
SQL> drop tablespace TEMP1 including contents and datafiles;
SQL> drop tablespace TEMP2 including contents and datafiles;
#-- Example to add more tempts to group
SQL> create temporary tablespace TEMP5 tempfile '+DATA' SIZE 2048M;
SQL> ALTER TABLESPACE "TEMP6" TABLESPACE GROUP "TEMP_GRP";
################################# Rename PDB
#################################-
-
- Run the following commands to rename the PDB.
$ sqlplus / as sysdba
SQL> alter pluggable database "<SOURCE PDB NAME>"
close;
SQL> alter pluggable database "<SOURCE PDB NAME>"
unplug into '<ORACLE_HOME>/dbs/<SOURCE PDB NAME>.xml';
SQL> drop pluggable database "<SOURCE PDB NAME>";
SQL>create pluggable database "<NEW PDB NAME>" using
'<ORACLE_HOME>/dbs/<SOURCE PDB NAME>.xml' NOCOPY
SERVICE_NAME_CONVERT=('ebs_<SOURCE PDB NAME>','ebs_<TARGET PDB
NAME>','<SOURCE PDB NAME>_ebs_patch','<TARGET PDB
NAME>_ebs_patch');
SQL> alter pluggable database "<TARGET PDB NAME>"
open read write;
- Note:
- The PDB name should not be more than eight characters.
- The PDB should be renamed only using the above
approach to retain the case of the PDB name.
- Start the PDB and save its state by running the
following commands:
$ sqlplus
/ as sysdba
SQL> alter pluggable database all open; (in case of a single-node
database)
SQL> alter pluggable database all open instances=all; (in case of an
Oracle RAC database)
SQL> alter pluggable database all save state instances=all;
- Run the library update script against the Oracle
Database.
$ cd
<ORACLE_HOME>/appsutil/install/<CONTEXT_NAME>
$ sqlplus / as sysdba @adupdlib.sql <libext>
Where <libext> should
be set to sl for HP-UX, so for any other UNIX platform,
or dll for Windows.
SQL> alter session
set container=cdb$root;
SQL> alter
pluggable database "NPROD" close;
SQL> alter
pluggable database "NPROD" unplug into
'/u01/app/oracle/product/19.18.0/dbhome_1/dbs/NPROD.xml';
SQL> drop
pluggable database "NPROD";
SQL>
SQL> show pdbs
|
Edit according to
environment
SQL> create pluggable database "UATPDB" using
'/u01/app/oracle/product/19.18.0/dbhome_1/dbs/NPROD.xml' NOCOPY
SERVICE_NAME_CONVERT=('ebs_NPROD','ebs_UATPDB','NPROD_ebs_patch','UATPDB_ebs_patch');
|
SQL>
SQL> show pdbs
SQL> alter pluggable database "UATPDB" open read write;
SQL> alter pluggable database all save state instances=all;
SQL>
[oracle@uatdb01 ~]$ cd $ORACLE_HOME/appsutil/install/UATPDB_uatdb01
[oracle@uatdb01 UATPDB_uatdb01]$ echo $ORACLE_SID
uatcdb
[oracle@uatdb01 UATPDB_uatdb01]$
[oracle@uatdb01 UATPDB_uatdb01]$ sqlplus / as sysdba @adupdlib.sql so
[oracle@uatdb01 UATPDB_uatdb01]$ sqlplus / as sysdba @adupdlib.sql
Enter value for 1:
PL/SQL procedure successfully completed.
SQL>
#################################
#################################
[oracle@uatdb01 dbhome_1]$ . UATPDB_uatdb01.env
[oracle@uatdb01 dbhome_1]$ tnsping uatpdb
TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 15-JUL-2024 14:34:17
Copyright (c) 1997, 2022, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/19.18.0/dbhome_1/network/admin/sqlnet_ifile.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=uatdb01)(PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=UATPDB) (INSTANCE_NAME=uatcdb)))
OK (0 msec)
[oracle@uatdb01 dbhome_1]$
[oracle@uatdb01 dbhome_1]$ sqlplus apps/scapps1@uatpdb
If unable to connect
check CDB parameters like
If unable to connect check CDB parameters like
ERROR: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
$ lsnrctl status CDB
$ tnsping PDB
SQL> show parameter local
SQL> show parameter service_names
SQL> alter system register;
##-->
if uatpdb is not connecting, then add dummy connection details as below and
execute autoconf it will generate new tns – and after fnd_conc_clone rename tns
details uatpdb_test to uatpdb
[oracle@uatdb01 ~]$ tnsping uatpdb_test
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=uatdb01.areef.com)(PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=ebs_UATPDB) (INSTANCE_NAME=uatcdb)))
OK (0 msec)
[oracle@uatdb01 ~]$sqlplus apps/scapps1@uatpdb_test
SQL> show
user
USER is "APPS"
SQL> select
NODE_NAME from apps.fnd_nodes;
SQL> exec
fnd_conc_clone.setup_clean;
SQL> commit;
Skip running
autoconfig now run it after setting utl
[oracle@uatdb01 ~]$ vi $TNS_ADMIN/tnsnames.ora
autoconfig will fail with txkCfgUtlfileDir.sh script
execution
first run auto conf with fail so that tns will not get update with scan stil need to test the scenario need first autoconf or utl setup
b. Source the PDB env file and perform the following command to set the target
UTL\_FILE\_DIR values in Oracle Database:
[oracle@uatdb01 dbhome_1]$ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl
-contextfile=$CONTEXT_FILE -oraclehome=$ORACLE_HOME
-outdir=$ORACLE_HOME/appsutil/log -mode=getUtlFileDir
vi
/u01/app/oracle/product/19.18.0/dbhome_1/dbs/UATPDB_utlfiledir.txt
/u01/app/oracle/product/19.18.0/temp/NPROD
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/outbound/NPROD_PRD-nEBSDB01
mkdir -p /u01/app/oracle/product/19.18.0/temp/UATPDB
mkdir –p /u01/app/oracle/temp/UATPDB
cd
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/outbound/UATPDB_uatdb01
grep s_db_util_filedir $CONTEXT_FILE
[oracle@uatdb01 ~]$
[oracle@uatdb01 ~]$ grep utlfiledir.txt -A15 $ORACLE_HOME/dbs/UATPDB_utlfiledir.txt
# /u01/app/oracle/product/19.18.0/dbhome_1/appsutil/log/TXK_UTIL_DIR_Thu_Jul_25_13_15_04_2024/UATPDB_utlfiledir.txt
#############################################################################
/u01/app/oracle/product/19.18.0/temp/UATPDB
/u01/app/oracle/product/19.18.0/temp/UATPDB
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/outbound/UATPDB_uatdb01
/u01/app/oracle/product/19.18.0/temp/UATPDB
/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/outbound/UATPDB_uatdb01
[oracle@uatdb01 ~]$ vi $ORACLE_HOME/dbs/UATPDB_utlfiledir.txt
[oracle@uatdb01 ~]$
c. Run the following command to edit the \<PDB Name\>\_utlfiledir.txt file under
Oracle_Home/dbs and change the UTL Path accordingly
$ sqlplus system/Psau_19cprod@uatpdb
If
CDB system schema has expiry then reset password else setutl will fail.
*******FATAL ERROR*******
PROGRAM : (/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/bin/txkCfgUtlfileDir.pl)
TIME : Thu Jul 16 08:46:33 2026
FUNCTION: main::validateSystemSchemaCredentials [ Level 1 ]
ERRORMSG: Invalid SYSTEM database user credentials.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 UATPDB READ WRITE NO
SQL>
SQL> col
USERNAME for a10
ALTER
SESSION SET CONTAINER = CDB$ROOT;
SELECT
con_id,username,account_status,expiry_date FROM cdb_users WHERE username =
'SYSTEM' ORDER BY con_id;
Session altered.
SQL>
CON_ID USERNAME ACCOUNT_STATUS EXPIRY_DA
---------- ---------- -------------------------------- ---------
1 SYSTEM EXPIRED(GRACE) 23-JUL-26
3 SYSTEM OPEN
SQL>
SQL> alter
user system identified by Psau_19cprod;
User altered.
SQL> SELECT
con_id,username,account_status,expiry_date FROM cdb_users WHERE username =
'SYSTEM' ORDER BY con_id;
CON_ID USERNAME ACCOUNT_STATUS EXPIRY_DA
---------- ---------- -------------------------------- ---------
1 SYSTEM OPEN 12-JAN-27
3 SYSTEM OPEN
SQL>
$ tail $ORACLE_HOME/dbs/UATPDB_utlfiledir.txt
$ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl
-contextfile=$CONTEXT_FILE -oraclehome=$ORACLE_HOME
-outdir=$ORACLE_HOME/appsutil/log -mode=setUtlFileDir
Successfully Completed the script
ERRORCODE = 0 ERRORCODE_END
[oracle@uatdb01 ~]$ unset which
$ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl
-contextfile=$CONTEXT_FILE -oraclehome=$ORACLE_HOME
-outdir=$ORACLE_HOME/appsutil/log -mode=syncUtlFileDir -skipautoconfig=yes
Successfully Completed the script
ERRORCODE = 0 ERRORCODE_END
Now run autoconfig after removing and recreating directories Mandatory
AutoConfig to Database Tier Ends in "ERRORMSG: Directory /xxx/xxx/xxx does not exist." (Doc ID 2782071.1)
$ du –sh /u01/app/oracle/temp/* /u01/app/oracle/product/19.18.0/temp/*
$ rm –rf /u01/app/oracle/temp/UATPDB Ã in this way only (rm –rf copy paste error type
manually) but still failed
$ rm –rf /u01/app/oracle/product/19.18.0/temp/UATPDB
$ rm –rf /u01/app/oracle/temp/UATPDB
$ mkdir -p /u01/app/oracle/product/19.18.0/temp/UATPDB
$ mkdir -p /u01/app/oracle/temp/UATPDB
$ echo $CONTEXT_NAME
SQL> select NODE_NAME from fnd_nodes; -- if source node exist then clear
SQL> exec fnd_conc_clone.setup_clean;
SQL> commit;
[oracle@uatdb01 UATPDB_uatdb01]$ echo $ORACLE_SID
UATPDB
[oracle@uatdb01 UATPDB_uatdb01]$
[oracle@uatdb01 dbhome_1]$ sqlplus apps/scapps1@uatpdb
$ cp $TNS_ADMIN/tnsnames.ora
$TNS_ADMIN/tnsnames_b4autocfg.txt
$ time perl
$ORACLE_HOME/appsutil/scripts/$CONTEXT_NAME/adautocfg.sh
AutoConfig completed successfully.
real 2m25.797s
[oracle@uatdb01 UATPDB]$
if autoconfig failed
with -- txkCfgUtlfileDir.pl (successful after 2nd time delete)
AutoConfig completed with errors.
ERRORMSG: EBS custom directory object does
not exists for /u01/app/oracle/temp/UATPDB
$ rm –rf /u01/app/oracle/temp/UATPDB Ã in this way only (repeated again after fail)
$ mkdir -p /u01/app/oracle/temp/UATPDB
$ time perl
$ORACLE_HOME/appsutil/scripts/$CONTEXT_NAME/adautocfg.sh
$ cd $ORACLE_HOME/appsutil/clone/bin
No need to run again perl adcfgclone.pl dbTechStack /u01/app/oracle/product/19.18.0/dbhome_1/appsutil/UATPDB_uatdb01.xml
Database cloning has completed con continue with APPS
Apps
cloning on same server and port is as usual using xml if Run-FS matches PROD:
#########################-------------- Apps Cloning rpm installation on OL8
For new server clone follow blog for server setup and install below yum package.
[root@uatapp01 yum.repos.d]# grep addons -A5 /etc/yum.repos.d/oracle-linux-ol8.repo
[ol8_addons]
name=Oracle Linux 8 Addons ($basearch)
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL8/addons/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
[root@uatapp01 yum.repos.d]# yum search oracle-ebs-server-R12-preinstall
Oracle Linux 8 Addons (x86_64) 19 MB/s | 58 MB 00:03
Last metadata expiration check: 0:00:15 ago on Mon 09 Feb 2026 12:51:11 PM +03.
====================================================== Name Exactly Matched: oracle-ebs-server-R12-preinstall =======================================================
oracle-ebs-server-R12-preinstall.src : Sets the system for Oracle E-Business Suite Release 12 for Oracle Linux 8
oracle-ebs-server-R12-preinstall.x86_64 : Sets the system for Oracle E-Business Suite Release 12 for Oracle Linux 8
[root@uatapp01 yum.repos.d]# yum install oracle-ebs-server-R12-preinstall.x86_64
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[applmgr@uatapp01 ~]$ ls -ltr /u01/UATPDB/fs2/EBSapps/comn/clone/prereq/webtier/Scripts/prereq/linux64/*
[applmgr@uatapp01 linux64]$ cp refhost.xml_ol8 refhost.xml
[applmgr@uatapp01 ~]$ cp /u01/app/oraInventory/ContentsXML/inventory.xml /u01/app/oraInventory/ContentsXML/inventory.xml_bkp
[applmgr@uatapp01 ~]$ vi /u01/app/oraInventory/ContentsXML/inventory.xml
[applmgr@uatapp01 ~]$ watch -n 2 'cat inventory.xml'
Run Perl Script for Application Tier Configuration with
previous context file:
[applmgr@uatapp01 bin]$
$ grep file_edition
/home/applmgr/UATPDB_uatapp01.xml
grep -i 'sslterminator\|https\|site_name\|login\|access\|s_appltmp\|webport\|s_dbport\|s_wls_adminport'
UATPDB_uatapp01.xml
[applmgr@uatapp01 ~]$ cd /u01/UATPDB/fs1/EBSapps/comn/clone/bin/
[applmgr@uatapp01 bin]$ screen -L
[applmgr@uatapp01 bin]$ unset which
$ time perl ./adcfgclone.pl appsTier /home/applmgr/UATPDB_uatapp01.xml
dualfs (tee command will not work properly)
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 :
Enter the Weblogic AdminServer password :
Creating Patch file system context file.....
Log file located at /u01/UATPDB/fs1/EBSapps/comn/clone/bin/CloneContextPatch_0224150022.log
Target System Other File System Instance Top set to /u01/UATPDB/fs2/inst/apps/UATPDB_uatapp01
Target System Port Pool [0-99] : 21
[applmgr@uatapp01 bin]$ time perl adcfgclone.pl appsTier dualfs
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 :
Enter the Weblogic AdminServer password :
Do you want to add a node (yes/no) [no] :
Running: Context clone...
Log file located at /u01/UATPDB/fs2/EBSapps/comn/clone/bin/CloneContext_0709020458.log
Provide the values required for creation of the new APPL_TOP Context file.
Target System Hostname (virtual or normal) [uatapp01] :
Target System Database SID
: UATPDB
Target System Database
Server Node [uatapp01] : uatdb01
Target System Database Domain Name [areef.com] :
Target System Base
Directory : /u01/UATPDB
Target System Base Directory set to /u01/UATPDB
Target System Current File System Base set to /u01/UATPDB/fs2
Target System Other File System Base set to /u01/UATPDB/fs1
Target System Fusion Middleware Home set to /u01/UATPDB/fs2/FMW_Home
Target System Other File System Fusion Middleware Home set to /u01/UATPDB/fs1/FMW_Home
Target System Web Oracle Home set to /u01/UATPDB/fs2/FMW_Home/webtier
Target System Other File System Web Oracle Home set to /u01/UATPDB/fs1/FMW_Home/webtier
Target System Appl TOP set to /u01/UATPDB/fs2/EBSapps/appl
Target System Other File System Appl TOP set to /u01/UATPDB/fs1/EBSapps/appl
Target System COMMON TOP set to /u01/UATPDB/fs2/EBSapps/comn
Target System Other File System COMMON TOP set to /u01/UATPDB/fs1/EBSapps/comn
Target System Instance Home Directory [/u01/UATPDB] :
Target System Current File System Instance Top set to /u01/UATPDB/fs2/inst/apps/UATPDB_uatapp01
Do you want to preserve the
Display [PRD-nEBSAPP01 :0.0] (y/n) : n
Target System Display [uatapp01: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 [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] : 10
Checking the port pool 10
done: Port Pool 10 is free
Report file located at /u01/UATPDB/fs2/inst/apps/UATPDB_uatapp01/admin/out/portpool.lst
RC-40201: Unable to connect to Database UATPDB.
Enter the Database listener
port [1531] : 1521
Target System proxy port [80] :
UTL_FILE_DIR on database tier consists of the following directories.
1. /u01/app/oracle/product/19.18.0/temp/UATPDB
2. /u01/app/oracle/product/19.18.0/temp/UATPDB
3. /u01/app/oracle/product/19.18.0/dbhome_1/appsutil/outbound/UATPDB_uatdb01
4. /u01/app/oracle/product/19.18.0/temp/UATPDB
5. /u01/app/oracle/product/19.18.0/dbhome_1/appsutil/outbound/UATPDB_uatdb01
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/UATPDB/fs2/inst/apps/UATPDB_uatapp01/appl/admin/UATPDB_uatapp01.xml
Check Clone Context logfile /u01/UATPDB/fs2/EBSapps/comn/clone/bin/CloneContext_0709020458.log for details.
Creating Patch file system context file.....
Log file located at /u01/UATPDB/fs2/EBSapps/comn/clone/bin/CloneContextPatch_0709020816.log
Target System Other File System Instance Top set to /u01/UATPDB/fs1/inst/apps/UATPDB_uatapp01
Target System Port Pool [0-99]
: 20
Checking the port pool 20
done: Port Pool 20 is free
Report file located at /u01/UATPDB/fs1/inst/apps/UATPDB_uatapp01/admin/out/portpool.lst
The new APPL_TOP context file has been created :
/u01/UATPDB/fs1/inst/apps/UATPDB_uatapp01/appl/admin/UATPDB_uatapp01.xml
Check Clone Context logfile /u01/UATPDB/fs2/EBSapps/comn/clone/bin/CloneContextPatch_0709020816.log for details.
FMW Pre-requisite check log file location : /u01/UATPDB/fs2/EBSapps/comn/clone/FMW/logs/prereqcheck.log
Running: FMW pre-req check...
Configuring: Run file system....
LogFile located at /u01/UATPDB/fs2/inst/apps/UATPDB_uatapp01/admin/log/clone/run/RCloneApplyAppstier_07090208.log
<Jul 9, 2024 2:33:39 AM AST> <Warning> <JNDI> <BEA-050001> <WLContext.close() was called in a different thread than the one in which it was created.>
Configuring: Patch file system....
LogFile located at /u01/UATPDB/fs2/inst/apps/UATPDB_uatapp01/admin/log/clone/patch/RCloneApplyAppstier_07090239.log
Do you want to startup the
Application Services for UATPDB? (y/n) [n] :
Services not started
[applmgr@uatapp01 bin]$
[applmgr@uatapp01 bin]$ . ~/EBSapps.env run
[applmgr@uatapp01 bin]$ cp $CONTEXT_FILE ~
[applmgr@uatapp01 ~]$ grep s_appltmp $CONTEXT_FILE
<APPLTMP oa_var="s_appltmp">/u01/UATPDB/fs2/inst/apps/UATPDB_uatapp01/appltmp</APPLTMP>
[applmgr@uatapp01 ~]$
[applmgr@uatapp01 ~]$
SQL> select value from v$parameter where name =
'utl_file_dir';
VALUE
--------------------------------------------------------------------------------
/u01/app/oracle/product/19.18.0/temp/UATPDB,/u01/app/oracle/product/19.18.0/tem
p/UATPDB,/u01/app/oracle/product/19.18.0/dbhome_1/appsutil/outbound/UATPDB_stg
-nebsdb01,/u01/app/oracle/product/19.18.0/temp/UATPDB,/u01/app/oracle/product/1
9.18.0/dbhome_1/appsutil/outbound/UATPDB_uatdb01
SQL>
[applmgr@uatapp01 ~]$ vi $CONTEXT_FILE
[applmgr@uatapp01 ~]$ grep -i 'sslterminator\|https\|site_name\|access\|s_appltmp'
$CONTEXT_FILE (update ssl setting
before running autoconfig replace with below line / add yellow part)
grep -i
'sslterminator\|https\|site_name\|s_nm_jvm\|access\|s_appltmp'
$CONTEXT_FILE
<sslterminator
oa_var="s_enable_sslterminator">#</sslterminator>
<oa_site_name
oa_var="s_sitename">UATPDB_30jun25</oa_site_name>
<s_wls_admin_console_access_nodes
oa_var="s_wls_admin_console_access_nodes">10.6.129.236</s_wls_admin_console_access_nodes>
-update all workflow
and FND related sql in plsql
-update context file varialbles as site name, https
-run autoconfig on apps
-update etcc checkdb
(PDB.env) and checkMT
To fix adop ETCC Codelevel checker unzip patch and run atleast 1 time on cloned instance:
ADOP Tables for node
information configured with Single/Multi Apps Node:
1) select * from fnd_nodes;--(only
3:AUTHENTICATION, DBNODE, APPSNODE)
1.1.2) select * from ad_nodes_config_status; -- (prod apps entries
1.1.3) select * from fnd_oam_context_files; --(Context
File-{fs1,fs2,DB} TEMPLATE,METADATA)
1.1.4) select
distinct(PATH),EXTRACTVALUE(XMLType(TEXT),'//file_edition_type') as FILE_SYSTEM
from FND_OAM_CONTEXT_FILES where NAME not in
('TEMPLATE','METADATA','config.txt') and CTX_TYPE='A' and (status is null or
upper(status) in ('S','F')) and EXTRACTVALUE(XMLType(TEXT),'//file_edition_type')
in ('run','patch') -- check RFS/PFS context files uploaded to db or not
1.1.4) select distinct(PATH) from FND_OAM_CONTEXT_FILES where NAME not in
('TEMPLATE','METADATA','config.txt') and CTX_TYPE='A' and (status is null or
upper(status) in ('S','F')) and
EXTRACTVALUE(XMLType(TEXT),'//file_edition_type') in ('run','patch');--
check RFS/PFS context files uploaded to db or not
1.1.5) select * from apps.TXK_TCC_RESULTS;--(etcc checkdb ran or not)
1.1.6) select THREAD#, STATUS, ENABLED from v$thread;--(disable thread 2 if not required)
1.1.7) select ad_zd.get_edition_type from dual;
1.1.8) select FND_WEB_SEC.VALIDATE_LOGIN('SYSADMIN','welcome1') from dual;--(crosscheck after FNDCPASS)
1.1.9) select * from all_objects where status='INVALID' and owner='APPS'--
and object_name='AD_ZD_ADOP';--(
1.1.9) select to_char(RESETLOGS_TIME, 'DD-MON-YYYY, hh24:mi:ss') from
v$database;--(when
database was cloned)
1.2) -- check schedule
request.
and requested_start_date
> SYSDATE
and hold_flag = 'N';
1.3) -- check any pending wf mails
select notification_id,
status, mail_status, begin_date
from WF_NOTIFICATIONS
where status = 'OPEN'
and mail_status = 'MAIL';
2.1) --cancel schedule requests (no. of Records Updated = 4)
update
fnd_concurrent_requests
set phase_code='C',
status_code='D'
where phase_code = 'P'
and (status_code = 'I'
OR status_code = 'Q')
and requested_start_date
>= SYSDATE
and hold_flag = 'N'
2.2) --cancel schedule requests (no. of Records Updated = 3)
UPDATE
fnd_concurrent_requests
SET phase_code = 'C',
status_code = 'X'
WHERE status_code ='T'
OR phase_code = 'R'
2.3) -- cancel schedule requests (no. of Records Updated = 178)
UPDATE
fnd_concurrent_requests
SET hold_flag = 'Y'
WHERE phase_code = 'P'
AND status_code in
('Q','I')
3.1) -- update Mail status to sent (no. of Records Updated = 179)
update
FND_CONCURRENT_REQUESTS set phase_code='C',status_code='D' where phase_code='P'
3.2) -- update Mail status to sent (no. of Records Updated = 30162)
select count(*) from
WF_NOTIFICATIONS where status='OPEN' and mail_status='MAIL' --and
message_type in ('WFTESTS','UMXLHELP') --and RECIPIENT_ROLE='MAREEF'
update WF_NOTIFICATIONS
set mail_status='SENT' where status='OPEN' and MAIL_STATUS='MAIL'
3.3) -- update Mail status to sent (no. of Records Updated=0)
select count(*),status,
MAIL_STATUS from wf_notifications group by status, MAIL_STATUS order by status;
update WF_NOTIFICATIONS
set mail_status='SENT' where status='OPEN' and MAIL_STATUS='MAIL'
-- Optional if
required to purge the WF_NOTIFICATION_OUT queue and rebuild it with data
currently in the WF_NOTIFICATIONS table.
[applmgr@ebsapp07 ~]$
sqlplus apps/appspswd @$FND_TOP/patch/115/sql/wfntfqup APPS
appspswd APPLSYS
3.4) -- Optional if required update Mail status to sent (no. of Records
Updated=2LC)
select count(*) from
wf_notifications w where w.status='OPEN' and w.RECIPIENT_ROLE='SYSADMIN' ;--
to check errors after sysadmin login
--UPDATE
wf_notifications set status='CLOSED' , mail_status='SENT', end_date=sysdate
where recipient_role='SYSADMIN';
--UPDATE
wf_notifications set status='CLOSED' , mail_status='SENT', end_date=sysdate
where w.MESSAGE_TYPE='XXAS';
To fix adop ETCC Codelevel checker patch
ADOP Tables for node information configured with Single/Multi Apps Node:
select * from applsys.TXK_TCC_RESULTS;
truncate table applsys.TXK_TCC_RESULTS;
[oracle@uatdb01 ~]$ grep '$Header' $ORACLE_HOME/appsutil/etcc/checkDBpatch.sh
[oracle@uatdb01 ~]$ sh $ORACLE_HOME/appsutil/etcc/checkDBpatch.sh
[applmgr@uatapp01 ~]$ sh $HOME/etcc/checkMTpatch.sh
Start Application and update java and standard managers
- Java Color Scheme
- Standard Manager
- Clear Cache
[applmgr@uatapp01 ~]$ grep site $CONTEXT_FILE
[applmgr@uatapp01 ~]$ adautocfg.sh
[applmgr@uatapp01 ~]$ adstrtal.sh apps/scapps1
Verify the Application result sitename and color etc.
Weblogic Console Url
with echo command:
[applmgr@uatapp01 ~]$
echo "http://"$(cat $CONTEXT_FILE | grep s_webhost | cut -d '>' -f2 | cut -d '<' -f1)"."$(cat $CONTEXT_FILE | grep s_wls_admin_domain | cut -d '>' -f2 | cut -d '<' -f1)":"$(cat $CONTEXT_FILE | grep s_wls_adminport | cut -d '>' -f2 | cut -d '<' -f1)"/console"
http://uatapp01.areef.com:7021/console
[applmgr@uatapp01 ~]$ grep s_appltmp $CONTEXT_FILE
<APPLTMP oa_var="s_appltmp">/u01/app/oracle/product/19.18.0/temp/UATPDB</APPLTMP>
[applmgr@uatapp01 ~]$
[root@uatapp01 ~]# mkdir -p /u01/app/oracle/product/19.18.0/temp/UATPDB
[root@uatapp01 ~]# chown -R applmgr:oinstall /u01/app/oracle/product/19.18.0/temp/UATPDB
[root@uatapp01 ~]# su - applmgr
[applmgr@uatapp01 ~]$ cd /u01/app/oracle/product/19.18.0/temp/UATPDB
[applmgr@uatapp01 UATPDB]$ ls -ltrh
total 0
[applmgr@uatapp01 UATPDB]$ touch b
[applmgr@uatapp01 UATPDB]$ ls -ltrh
total 0
-rw-r--r-- 1 applmgr oinstall 0 Jul 22 15:44 b
[applmgr@uatapp01 UATPDB]$
No comments:
Post a Comment