Friday, 13 October 2023

sh: module: line 1: syntax error: unexpected end of file sh: error importing function definition for 'BASH_FUNC_module'

Modify the user .bash_profile add below:


unset -f $(env | grep -oP "^BASH_FUNC_\K([^%]*)")


Wednesday, 11 October 2023

Upgrading an Oracle EBS 12.2.10 Database from 12c to 19c

 Oracle EBS 12.2 On-Premises databases are now certified with the CDB architecture (multitenant architecture). EBS database will run as a single PDB. In this post I am going to share how to upgrade an EBS database from 12c to 19c.


Current EBS Environment:
Apps : 12.2.10
DB: 12.1.0.2
Server : OEL  7.9
Oracle SID: FUAT
AD and TXK : Delta patch 12 already Applied
ASM 19c GRID Home
DB OS user: oracle
Application OS user: applmgr
GRID OS user: oraasm

Important Information Regarding the Upgrade to Oracle Database 19c

  • When upgrading your Oracle E-Business Suite to Oracle Database 19c, your database will be converted to a multitenant architecture, which will consist of a Container Database (CDB) with a single Pluggable Database. Only multitenant architecture database are supported for Oracle E-Business Suite with Oracle Database 19c.
  • During the upgrade, you will also perform steps to migrate directories defined for PL/SQL File I/O to database directory objects. This requirement is due to the desupport in Oracle Database 19c of the UTL_FILE_DIR database initialization parameter.
  • Oracle Database Release Update 19.3 as well as Release Update 19.5 and later are certified.
  • If the products implemented are not supporting 19c then please don't upgrade DB.
Key Checks

SYS@FUAT >select name,open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------
FUAT      READ WRITE

Custom Patch Location: /labsoft/19cDB_Upgrade_EBS

I will autoextend my datafiles to avoid any tablespace issues or you can also check for sufficient space in tablespaces.

select file_id,file_name,autoextensible from dba_data_Files;

select file_id,file_name,autoextensible from dba_temp_Files;

select 'alter database datafile '||file_id ||' autoextend on;' from dba_data_Files;

select 'alter database tempfile '||file_id ||' autoextend on;' from dba_temp_Files;

select file_id,file_name,autoextensible from dba_data_Files;
select file_id,file_name,autoextensible from dba_temp_Files;


Steps which  I performed:

1) As per oracle Document 136697.1, hcheck.sql - Script to Check for Known Problems in Oracle8i, Oracle9i, Oracle10g, Oracle 11g and Oracle 12c, to run hcheck.sql, which looks for some known common Data Dictionary problems.

run connected as SYS schema

[oracle@funebs122 19cDB_Upgrade_EBS]$ sqlplus '/as sysdba'

SQL*Plus: Release 12.1.0.2.0 Production on Sat Mar 12 14:07:11 2022

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options

SYS@FUAT >spool hcheck_output.log
SYS@FUAT >@hcheck.sql
PL/SQL procedure successfully completed.

Statement processed.

Complete output is in trace file:
/oraapps122/DATABASE/FUAT/12.1.0/admin/FUAT_funebs122/
diag/rdbms/fuat/FUAT/trace/FUAT_ora_4726_HCHECK.trc


View the spool output and trace file.

Various status seen in reports can be as below. 

CRITICAL: Is of highest risk and requires urgent fix.
FAIL:         Requires resolution on priority.
WARN:      Good to resolve.
PASS:        No problem.

My execution showed me one warning.

.- StmtAuditOnCommit           ... 1201000200 <=  *All Rel* 04/10 14:16:09 WARN

HCKW-0013: option# in STMT_AUDIT_OPTION_MAP(ON COMMIT REFRESH) (Doc ID
1361021.1)
-- Please run the following:
SQL> update STMT_AUDIT_OPTION_MAP set option#=234
where name ='ON COMMIT REFRESH';
[oracle@funebs122 19cDB_Upgrade_EBS]$ sqlplus '/as sysdba'

SQL*Plus: Release 12.1.0.2.0 Production on Sat Mar 12 14:12:52 2022

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options

SYS@FUAT >update STMT_AUDIT_OPTION_MAP set option#=234
     where name ='ON COMMIT REFRESH';
  2
1 row updated.

SYS@FUAT >commit;

Commit complete.


So I executed solution as mentioned in spool. Re-run script to make sure all is passed.

2) Apply required patches on EBS as required based on the version and AD/TXK delta versions. My AD and TXK version are on already Delta 12.

col ABBREVIATION for a10
set lines 1000
col NAME for a50
col CODELEVEL for a20
SELECT ABBREVIATION,NAME,codelevel FROM apps.AD_TRACKABLE_ENTITIES WHERE abbreviation in ('txk','ad');

ABBREVIATI NAME                                               CODELEVEL
---------- -------------------------------------------------- --------------------
ad         Applications DBA                                            C.12
txk        Oracle Applications Technology Stack               C.12


As per my environment I am required to apply below patches. Always check latest Oracle Document to see latest patches given by them.

Patch 25452805
Patch 26052406
Patch 30433124
Patch 33346385
Patch 26521736 - 19c interoperability patch for Release 12.2
Patch 31088182
Patch 31349591
Patch 31800803
Patch 28732161 - Apply on Release 12.2.6 or later versions.

Please review readme of all the patches.

Apply patches.(Note all patches I have kept at my common share area as mentioned above in post).Make sure patches are kept and unzipped.

For my environment below patches from above list are already applied. If they are not applied in your environment then you need to apply.

select bug_number,creation_date from ad_bugs where bug_number in (25452805,26052406,30433124,33346385,31088182,26521736,31349591,31800803,28732161);

BUG_NUMBER                     CREATION_DATE
------------------------------ ------------------
25452805                       18-JAN-21
30433124                       18-JAN-21
26052406                       18-JAN-21

[applmgr@funebs122 ~]$ . EBSapps.env run

  E-Business Suite Environment Information
  ----------------------------------------
  RUN File System           : /oraapps122/APPS/FUAT/fs2/EBSapps/appl
  PATCH File System         : /oraapps122/APPS/FUAT/fs1/EBSapps/appl
  Non-Editioned File System : /oraapps122/APPS/FUAT/fs_ne


  DB Host: funebs122.lab  Service/SID: FUAT


  Sourcing the RUN File System ...

adop phase=prepare,apply,finalize,cutover,cleanup mtrestart=no 
patchtop=/labsoft/19cDB_Upgrade_EBS 
patches=33346385,31088182,26521736,31349591,31800803,28732161

Please copy commands in notepad and then make sure they are in single line.

Once Patches applied we can see as below

The prepare phase completed successfully.
The apply phase completed successfully.
The finalize phase completed successfully.
The cutover phase completed successfully.
The cleanup phase completed successfully.


adop exiting with status = 0 (Success)

Patch 31800803 Post steps:

1. On Application RUN file system
    Source the environment variables for Oracle Applications

    . EBSapps.env run

    Run AutoConfig on the RUN file system.

[applmgr@funebs122 ~]$ . EBSapps.env run

  E-Business Suite Environment Information
  ----------------------------------------
  RUN File System           : /oraapps122/APPS/FUAT/fs1/EBSapps/appl
  PATCH File System         : /oraapps122/APPS/FUAT/fs2/EBSapps/appl
  Non-Editioned File System : /oraapps122/APPS/FUAT/fs_ne


  DB Host: funebs122.lab  Service/SID: FUAT


  Sourcing the RUN File System ...

[applmgr@funebs122 ~]$ cd $ADMIN_SCRIPTS_HOME

[applmgr@funebs122 scripts]$ ./adautocfg.sh
Enter the APPS user password:

   
Execute admkappsutil.pl utility to create the file appsutil.zip

     perl $AD_TOP/bin/admkappsutil.pl
     This will create appsutil.zip in <INST_TOP>/admin/out

[applmgr@funebs122 scripts]$ perl $AD_TOP/bin/admkappsutil.pl
Starting the generation of appsutil.zip
Log file located at /oraapps122/APPS/FUAT/fs1/inst/apps/FUAT_funebs122/admin/log/MakeAppsUtil_03121831.log
output located at /oraapps122/APPS/FUAT/fs1/inst/apps/FUAT_funebs122/admin/out/appsutil.zip
MakeAppsUtil completed successfully.


  2. On the Database Tier (as the ORACLE user):

   Source the environment variables for RDBMS ORACLE_HOME

     cd <RDBMS ORACLE_HOME>
     . <RDBMS ORACLE_HOME>/<CONTEXT_NAME>.env

    Copy or FTP the appsutil.zip file to the <RDBMS ORACLE_HOME>

    Uncompress appsutil.zip under the <RDBMS ORACLE_HOME>

     cd $ORACLE_HOME
     unzip -o appsutil.zip

    Run AutoConfig on the <RDBMS ORACLE_HOME>

[oracle@funebs122 FUAT_funebs122]$ pwd
/oraapps122/DATABASE/FUAT/12.1.0/appsutil/scripts/FUAT_funebs122

[oracle@funebs122 FUAT_funebs122]$ ./adautocfg.sh
Enter the APPS user password:

Make sure the autoconfig completes successfully.

3) Make sure below parameter is false in DB.

SYS@FUAT >show parameter SEC_CASE_SENSITIVE_LOGON 

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
sec_case_sensitive_logon	     boolean	 FALSE

In my environment the parameter id already false.

4) Create the initialization parameter setup files

We will be creating below 2 files.
 $ORACLE_HOME/dbs/<ORACLE_SID>_initparam.sql and $ORACLE_HOME/dbs/<ORACLE_SID>_datatop.txt files.

Run the following commands to create them

$ cd $ORACLE_HOME/appsutil
$ . ./txkSetCfgCDB.env dboraclehome=<full path of ORACLE_HOME>
$ export ORACLE_SID=<ORACLE_SID>
$ cd $ORACLE_HOME/appsutil/bin
$ perl txkOnPremPrePDBCreationTasks.pl -dboraclehome=<ORACLE_HOME> \
-outdir=<ORACLE_HOME>/appsutil/log -appsuser=<apps user> \
-dbsid=<ORACLE_SID> -skipdbshutdown=yes

[oracle@funebs122 dbs]$ cd $ORACLE_HOME/appsutil
[oracle@funebs122 appsutil]$ echo $ORACLE_HOME
/oraapps122/DATABASE/FUAT/12.1.0
[oracle@funebs122 appsutil]$ cd $ORACLE_HOME/appsutil
[oracle@funebs122 appsutil]$ . ./txkSetCfgCDB.env dboraclehome=$ORACLE_HOME

Oracle Home being passed: /oraapps122/DATABASE/FUAT/12.1.0
[oracle@funebs122 appsutil]$ export ORACLE_SID=FUAT
[oracle@funebs122 appsutil]$ cd $ORACLE_HOME/appsutil/bin
[oracle@funebs122 bin]$ perl txkOnPremPrePDBCreationTasks.pl -dboraclehome=$ORACLE_HOME \
-outdir=$ORACLE_HOME/appsutil/log -appsuser=apps \
-dbsid=FUAT -skipdbshutdown=yes
Enter the APPS Password: 
cd $ORACLE_HOME/dbs below files would be created
-rw-r--r--. 1 oracle oinstall    15489 Mar 12 18:44 FUAT_initparam.sql
-rw-r--r--. 1 oracle oinstall      458 Mar 12 18:44 FUAT_datatop.txt
-rw-r-----. 1 oracle oinstall    20992 Mar 12 18:45 spfileFUAT.ora
-rw-r--r--. 1 oracle oinstall    52589 Mar 12 18:45 FUAT_PDBDesc.xml

5) Install 19c Database Oracle Home

Refer my previous post on installing the 19c DB Home and pre-requisites. This will install 19.3 DB version.


Follow same, and make sure the 19c is installed in different path.

Only use option to setup the software only.

[oracle@funebs122 19.3]$ mkdir -p /oraapps122/DATABASE/FUAT/19c
unzip -d /oraapps122/DATABASE/FUAT/19c LINUX.X64_193000_db_home.zip
The directory created will be used as 19c Oracle HOME.


















19C DB software installation is done.


6) Create the 19c Environment File

Once you have the 19c Oracle Home installed, create a simple environment to set the environment easily with parameter as below. "funcdb" is the CDB which I am going to create now.
The ORACLE_BASE environment variable is set accordingly.
The ORACLE_HOME environment variable points to the new 19c Oracle home.
The PATH environment variable includes $ORACLE_HOME/bin and the directory where the new perl executable is located (usually $ORACLE_HOME/perl/bin).
The LD_LIBRARY_PATH environment variable includes $ORACLE_HOME/lib.
The PERL5LIB environment variable points to the directories where the new perl libraries are located: $ORACLE_HOME/perl/lib/<perl version> and $ORACLE_HOME/perl/lib/site_perl/<perl version>
export ORA_NLS10=/u02/oratest/app/oracle/19.3/nls/data/9idata

[oracle@funebs122 ~]$ cat 19cdb.env
export ORACLE_HOME=/oraapps122/DATABASE/FUAT/19c
export ORACLE_SID=funcdb
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/perl/bin
export ORACLE_BASE=/oraapps122/DATABASE
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PERL5LIB=$ORACLE_HOME/perl/lib/5.28.1:$ORACLE_HOME/perl/lib/site_perl/5.28.1


7) Apply latest database patches on the 19c Home

Document 1594274.1, Oracle E-Business Suite Release 12.2: Consolidated List of Patches and Technology Bug Fixes from section 3.3.
These are important to be on latest to avoid any issues.

Based on my analysis, I will be applying below  patches. DB binary will be updated to 19.10 from 19.3

32218454-DATABASE RELEASE UPDATE 19.10.0.0.0 (Patch)
32067171-OJVM RELEASE UPDATE 19.10.0.0.0 (Patch)
29867728
31405300
31424070

Open new terminal with oracle user and source the 19c environment file.
[oracle@funebs122 ~]$ sqlplus '/as sysdba'

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Apr 11 00:25:01 2021
Version 19.3.0.0.0
Make sure patches are applied on 19c home only.

Unzip all mentioned above patches

Download latest Opatch Utility if required or any errors.


[oracle@funebs122 19cDB_Upgrade_EBS]$ cp p6880880_190000_Linux-x86-64.zip $ORACLE_HOME
[oracle@funebs122 19cDB_Upgrade_EBS]$ cd $ORACLE_HOME/

[oracle@funebs122 19c]$ mv OPatch OPatch_old
[oracle@funebs122 19c]$ unzip p6880880_190000_Linux-x86-64.zip


Go to each patch unzipped directory and apply them

cd 32218454
opatch prereq CheckConflictAgainstOHWithDetail -ph ./
opatch apply
cd 32067171
opatch apply
cd 29867728
opatch apply
cd 31405300
opatch apply
cd 31424070
opatch apply


Do not perform any post patch installation steps as they will be done after upgrade.

8)Create the nls/data/9idata directory

Source  19c env

On the database server node, as the owner of the Oracle RDBMS file system and database instance, run the following command to create the $ORACLE_HOME/nls/data/9idata directory.

unset PERL5LIB
$ perl $ORACLE_HOME/nls/data/old/cr9idata.pl

[oracle@funebs122 ~]$ . 19c.env
[oracle@funebs122 ~]$ unset PERL5LIB
[oracle@funebs122 ~]$ perl $ORACLE_HOME/nls/data/old/cr9idata.pl
Creating directory /oraapps122/DATABASE/FUAT/19c/nls/data/9idata ...
Copying files to /oraapps122/DATABASE/FUAT/19c/nls/data/9idata...
Copy finished.
Please reset environment variable ORA_NLS10 to /oraapps122/DATABASE/FUAT/19c/nls/data/9idata!


After creating the directory, make sure that the ORA_NLS10 environment variable is set to the full path of the 9idata directory whenever you enable the 19c Oracle home

[oracle@funebs122 ~]$ cat 19cdb.env
export ORACLE_HOME=/oraapps122/DATABASE/FUAT/19c
export ORACLE_SID=funcdb
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/perl/bin
export ORACLE_BASE=/oraapps122/DATABASE
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PERL5LIB=$ORACLE_HOME/perl/lib/5.28.1:$ORACLE_HOME/perl/lib/site_perl/5.28.1
export ORA_NLS10=/oraapps122/DATABASE/FUAT/19c/nls/data/9idata

9) Copy appsutil.zip from Application Tier to Database 19c home

On Application Tier source run file system environment 

perl $AD_TOP/bin/admkappsutil.pl

Copy appsutil.zip file to 19c Oracle Home and unzip
[oracle@funebs122 ~]$ cd $ORACLE_HOME
[oracle@funebs122 19c]$ pwd
/oraapps122/DATABASE/FUAT/19c
[oracle@funebs122 19c]$ 
cp /oraapps122/APPS/FUAT/fs1/inst/apps/FUAT_funebs122/admin/out/appsutil.zip .

[oracle@funebs122 19c]$ ls
addnode       data         install                       network      owm                               root.sh.old.1  srvm
apex          dbjava       instantclient                 nls          p6880880_190000_Linux-x86-64.zip  root.sh.old.2  suptools
appsutil.zip  dbs          inventory                     odbc         perl                              root.sh.old.3  ucp
assistants    deinstall    javavm                        olap         plsql                             runInstaller   usm
bin           demo         jdbc                          OPatch       precomp                           schagent.conf  utl
cfgtoollogs   diagnostics  jdk                           opmn         QOpatch                           sdk            wwg
client        dmu          jlib                          oracore      R                                 sdo            xdk
clone         drdaas       ldap                          oraInst.loc  racg                              slax
crs           dv           lib                           ord          rdbms                             sqldeveloper
css           env.ora      LINUX.X64_193000_db_home.zip  ords         relnotes                          sqlj
ctx           has          md                            oss          root.sh                           sqlpatch
cv            hs           mgw                           oui          root.sh.old                       sqlplus
[oracle@funebs122 19c]$ unzip -o appsutil.zip

10) Install JRE 8

Source 19c environment
To install JRE 8 on the appsutil directory, copy the $ORACLE_HOME/jdk/jre directory to $ORACLE_HOME/appsutil/jre. Run the following commands:

[oracle@funebs122 19c]$ cd $ORACLE_HOME/appsutil
[oracle@funebs122 appsutil]$ cp -r $ORACLE_HOME/jdk/jre .
[oracle@funebs122 appsutil]$ cp $ORACLE_HOME/jlib/orai18n.jar 
$ORACLE_HOME/appsutil/jre/lib/ext

11) Create the CDB

On the database server node Source 19c environment and run below from GUI Terminal/VNC

  • Run the Database Configuration Assistant (DBCA) to create the container database (CDB).
  • When prompted, click on the "Create Database", "Advanced Configuration", and "General Purpose or Transaction Processing" options.
  • In the Specify Database Identification screen, check to create an empty container database (CDB) without a PDB.
  • Set the Global Database Name, the SID to the new CDB SID (maximum of 8 characters)(funcdb), and check the "Use Local Undo tablespace for PDBs" checkbox. The CDB SID has to be different from the current ORACLE_SID, which will be the PDB SID.
  • In the "Network Configuration" section, do not create a listener. In the "Specify Configuration Options" section, set the SGA and PGA sizes to 2G and 1G respectively.
  • Click on the Character Sets tab and choose the Character Set and National Character Set to be the same as in the source database.
  • In the "Select Database Creation Option" section, click on the "Customize Storage Locations" button. Set the size of the redo log files to be the same as in the source database. Other options can be configured as appropriate.
[oracle@funebs122 ~]$ . 19c.env 
[oracle@funebs122 ~]$ cd $ORACLE_HOME/bin
[oracle@funebs122 bin]$ ls -ltr dbca
-rwxr-x---. 1 oracle oinstall 10572 Mar 12 19:23 dbca
./dbca






In case of ASM filesystem the storage will be ASM.







SYS@FUAT >SELECT value AS db_charset
FROM nls_database_parameters
WHERE parameter = 'NLS_CHARACTERSET';  2    3

DB_CHARSET
--------------------------------------------------------------------------------
AL32UTF8

SYS@FUAT >SELECT value AS db_ncharset
FROM nls_database_parameters
WHERE parameter = 'NLS_NCHAR_CHARACTERSET';  2    3

DB_NCHARSET
--------------------------------------------------------------------------------
AL16UTF16










CDB database should be running now.

[oracle@funebs122 ~]$ ps -ef |grep -i pmon
oraasm    2608     1  0 Mar12 ?        00:00:06 asm_pmon_+ASM
oracle    3396     1  0 Mar12 ?        00:00:08 ora_pmon_FUAT
oracle   27931     1  0 00:16 ?        00:00:00 ora_pmon_funcdb



12)Run datapatch on the CDB

Use the following commands to load any necessary patches on the CDB.
Source 19 environment

[oracle@funebs122 ~]$ . 19cdb.env 
[oracle@funebs122 ~]$ export ORACLE_SID=funcdb
[oracle@funebs122 ~]$ $ORACLE_HOME/OPatch/datapatch
SQL Patching tool version 19.10.0.0.0 Production on Sun Apr 11 10:47:07 2021
Copyright (c) 2012, 2020, Oracle.  All rights reserved.

Log file for this invocation: 
/oraapps122/DATABASE/cfgtoollogs/sqlpatch/sqlpatch_25829_2021_04_11_10_47_07/
sqlpatch_invocation.log

Connecting to database...OK
Gathering database info...done

Note:  Datapatch will only apply or rollback SQL fixes for PDBs
       that are in an open state, no patches will be applied to closed PDBs.
       Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
       (Doc ID 1585822.1)

Bootstrapping registry and package to current versions...done
Determining current state...done

Current state of interim SQL patches:
Interim patch 31424070 (APPSST19C  XTTS PDB - TABLE IMPORT/CREATION FAILED WITH 
ORA-39083 ORA-14334):
  Binary registry: Installed
  PDB CDB$ROOT: Applied successfully on 11-APR-21 02.21.25.128967 AM
  PDB PDB$SEED: Applied successfully on 11-APR-21 03.27.11.083950 AM
Interim patch 32067171 (OJVM RELEASE UPDATE: 19.10.0.0.210119 (32067171)):
  Binary registry: Installed
  PDB CDB$ROOT: Applied successfully on 11-APR-21 02.21.21.996398 AM
  PDB PDB$SEED: Applied successfully on 11-APR-21 03.27.07.902371 AM

Current state of release update SQL patches:
  Binary registry:
    19.10.0.0.0 Release_Update 210108185017: Installed
  PDB CDB$ROOT:
    Applied 19.10.0.0.0 Release_Update 210108185017 successfully on 11-APR-21 
02.21.21.977155 AM
  PDB PDB$SEED:
    Applied 19.10.0.0.0 Release_Update 210108185017 successfully on 11-APR-21 
03.27.07.888208 AM

Adding patches to installation queue and performing prereq checks...done
Installation queue:
  For the following PDBs: CDB$ROOT PDB$SEED
    No interim patches need to be rolled back
    No release update patches need to be installed
    No interim patches need to be applied

SQL Patching tool complete on Sun Apr 11 10:48:32 2021


13)Create the CDB MGDSYS schema

Source 19c Environment
Use SQL*Plus to connect to the CDB as SYSDBA and run the

export ORACLE_SID=funcdb
[oracle@funebs122 ~]$ sqlplus '/as sysdba'

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Apr 11 10:49:59 2021
Version 19.10.0.0.0

Copyright (c) 1982, 2020, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.10.0.0.0

SQL> 
SQL> @$ORACLE_HOME/rdbms/admin/catmgd.sql 
This creates the new MGDSYS schema on the CDB.


14) Create the CDB TNS files

On the database server node, run the following perl script to generate the required TNS files. Note that this script does not create a listener.

Source 19c Environment file

$ cd $ORACLE_HOME/appsutil
$ . ./txkSetCfgCDB.env dboraclehome=<full path of ORACLE_HOME>
$ cd $ORACLE_HOME/appsutil/bin
$ perl txkGenCDBTnsAdmin.pl -dboraclehome=<ORACLE_HOME> \
-cdbname=<CDB SID> -cdbsid=<CDB SID> -dbport=<Database port> \
-outdir=<ORACLE_HOME>/appsutil/log

[oracle@funebs122 ~]$ cd $ORACLE_HOME/appsutil
[oracle@funebs122 appsutil]$ . ./txkSetCfgCDB.env dboraclehome=$ORACLE_HOME

Oracle Home being passed: /oraapps122/DATABASE/FUAT/19c
[oracle@funebs122 appsutil]$ cd $ORACLE_HOME/appsutil/bin
[oracle@funebs122 bin]$ perl txkGenCDBTnsAdmin.pl -dboraclehome=$ORACLE_HOME \
-cdbname=funcdb -cdbsid=funcdb -dbport=1522 \
-outdir=$ORACLE_HOME/appsutil/log

15) Shut down the CDB

Source 19c environment

Use SQL*Plus to connect to the CDB as SYSDBA and use the following command to shut down the database:

$ sqlplus "/ as sysdba"
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.


16) On Application Tier

Complete patching cycle and remove adop created editions
 This will clean up the editions created by previous adop patching cycles. These commands also complete any open patching cycle.

On the current run file system:
$ adop phase=prepare 
$ adop phase=actualize_all    --> This alone took apporx 13hrs to complete
$ adop phase=finalize finalize_mode=full 
$ adop phase=cutover mtrestart=no 

Source the new Environment

On the new run file system:
$ adop phase=cleanup cleanup_mode=full --> This alone took apporx 18hrs to complete

These maintenance operations will take much longer than a typical online patching cycle, and should only be performed when there is no immediate need to start a new online patching cycle.

The applications will be unavailable to users until all remaining tasks are completed.

17) Configure UTL_FILE_DIR

Oracle EBS stores the PLSQL IO files in Database Node /usr/tmp usually in all versions of EBS starting from 11i till R12.2. For this, EBS uses UTL_FILE_DIR initialization parameter. However, from 18c, UTL_FILE_DIR initialization parameter has been desupported. Hence for 19c, Oracle for EBS have introduced new apps.v$parameter and apps.v$parameter2 views in the APPS schema that provide a supplemental UTL_FILE_DIR parameter. You need to follow the instructions given in Section 3.1.1 of :
Using UTL_FILE_DIR or Database Directories for PL/SQL File I/O in Oracle E-Business Suite Releases 12.1 and 12.2 (Doc ID 2525754.1)

We need to run the txkCfgUtlfileDir.pl script twice in different modes to complete this task. First you run the script in getUtlFileDir mode to retrieve the directory paths formerly specified in the UTL_FILE_DIR database initialization parameter and prepare them for the upgrade. Then you run the script in setUtlFileDir mode to store the directory paths in the new Oracle E-Business Suite tables underlying the apps.v$parameter and apps.v$parameter2 views and to create the corresponding directory objects.

To retrieve the directory path values from the source UTL_FILE_DIR database initialization parameter:

Source the Oracle E-Business Suite database environment of your 11g or 12c Oracle home.

$ . $ORACLE_HOME/<sid>_<hostname>.env

[oracle@funebs122 ~]$ . FUAT_funebs122.env


Run the txkCfgUtlfileDir.pl script in getUtlFileDir mode using the following command:

$ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=<DB Context File> \
-oraclehome=<11g/12c ORACLE_HOME> -outdir=<Output/Log location> \
-upgradedhome=<19c ORACLE_HOME> -mode=getUtlFileDir -servicetype=onpremise|opc

[oracle@funebs122 ~]$ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=/oraapps122/DATABASE/FUAT/12.1.0/appsutil/FUAT_funebs122.xml \
-oraclehome=/oraapps122/DATABASE/FUAT/12.1.0 -outdir=/tmp \
-upgradedhome=/oraapps122/DATABASE/FUAT/19c  -mode=getUtlFileDir -servicetype=onpremise
Enter the APPS Password:


Script Name    : txkCfgUtlfileDir.pl
Script Version : 120.0.12020000.15
Started        : Sat Mar 19 09:17:41 IST 2022

Log File       : /tmp/TXK_UTIL_DIR_Sat_Mar_19_09_17_38_2022/txkCfgUtlfileDir.log

Context file: /oraapps122/DATABASE/FUAT/12.1.0/appsutil/FUAT_funebs122.xml exists.

==============================================================================

Successfully generated the below file with UTL_FILE_DIR content:
/oraapps122/DATABASE/FUAT/12.1.0/dbs/FUAT_utlfiledir.txt

==============================================================================


Completed        : Sat Mar 19 09:17:46 IST 2022


Successfully Completed the script


With this command, the script retrieves the directory paths stored in the UTL_FILE_DIR database initialization parameter, modifies them to prepare them for use in Oracle Database 19c, and creates a text file named <DB_NAME>_utlfiledir.txt in the <ORACLE_HOME>/dbs directory with the list of modified directory paths. The -servicetype parameter defaults to -servicetype=onpremise, but when running on Oracle Cloud, you must specify -servicetype=opc for this parameter. The script performs the following modifications in the directory paths:

For on-premises instances, any occurrences of the path /usr/tmp for UNIX/Linux, or C:\temp for Windows, are replaced with <19c ORACLE_BASE>/temp/<PDB_NAME>, where <PDB_NAME> is the pluggable database (PDB) name.

For Oracle Cloud instances, any occurrences of the path /usr/tmp are replaced with <19c ORACLE_HOME>/temp/<PDB_NAME>, where <PDB_NAME> is the pluggable database (PDB) name.

For both on-premises and Oracle Cloud instances, any occurrences of the 11g or 12c Oracle home within a directory path are replaced with the 19c Oracle home. For example, the following directory path:

<11g/12c ORACLE_HOME>/appsutil/outbound/<context_name>
is changed to the following new directory path:

<19c ORACLE_HOME/appsutil/outbound/<context name>
The script also stores the original values from the 11g or 12c UTL_FILE_DIR database initialization parameter as well as the 19c replacement values in a text file in the log directory. You can compare the log file with the <DB_NAME>_utlfiledir.txt file in the <ORACLE_HOME>/dbs directory to review the modifications made by the script.

If the list of directories in the <DB_NAME>_utlfiledir.txt file still includes any symbolic links, edit the file to replace the symbolic links with physical directory paths. You can also make any further updates needed to reflect any changes in your system architecture.

Note: The maximum length for the value of the supplemental UTL_FILE_DIR parameter is 4000 characters. Due to modifications in the directory paths for use in Oracle Database 19c, the UTL_FILE_DIR value prepared for Oracle Database 19c can become longer than the original value for the UTL_FILE_DIR parameter in Oracle Database 11g or 12c. Check the <DB_NAME>_utlfiledir.txt file to verify the length of the list of directory paths.

If the list exceeds 4000 characters, review the directory paths in the list and consider deleting any directories that are no longer in use or removing duplicate directories. However, note that Oracle E-Business Suite product code or your custom code may refer to a directory path at a specific position within the UTL_FILE_DIR parameter value, such as by a SQL substr(), instr(), or similar function. Before removing a directory, you should search your code and system documentation to ensure there are no references to that directory by position. Additionally, you should search for any references to all subsequent directories in the list, whose position would be affected if you remove a directory that precedes them.

Alternatively you can consider restructuring the disk system to create shorter directory paths.

To store the directory path values in the database:

Create the following directory paths:

<19c Oracle Base>/temp/<PDB NAME> - for on-premises instances
<19c Oracle Home>/temp/<PDB NAME> - for instances on Oracle Cloud
<19c ORACLE_HOME>/appsutil/outbound/<context name> - for both on-premises and Oracle Cloud instances


cd  $12_OH/dbs/ 
cat FUAT_utlfiledir.txt

Based on path check and create the directories on server using oracle user
mkdir -p /oraapps122/DATABASE/FUAT/temp/FUAT
mkdir -p /oraapps122/DATABASE/FUAT/19c/appsutil/outbound/FUAT_funebs122
mkdir -p /oraapps122/DATABASE/FUAT/temp/FUAT

Source the Oracle E-Business Suite database environment of your 11g or 12c Oracle home.

$ . $ORACLE_HOME/<sid>_<hostname>.env
Run the txkCfgUtlfileDir.pl script in setUtlFileDir mode using the following command:

$ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=<DB Context File> \
-oraclehome=<11g/12c ORACLE_HOME> -outdir=<Output/Log location> \
-upgradedhome=<19c ORACLE_HOME> -mode=setUtlFileDir -servicetype=onpremise|opc [ -skipdirvalidation=Yes ]

[oracle@funebs122 dbs]$ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=/oraapps122/DATABASE/FUAT/12.1.0/appsutil/FUAT_funebs122.xml \
-oraclehome=/oraapps122/DATABASE/FUAT/12.1.0 -outdir=/tmp \
-upgradedhome=/oraapps122/DATABASE/FUAT/19c  -mode=setUtlFileDir -servicetype=onpremise
Enter the APPS Password:

Enter the SYSTEM Password:


Script Name    : txkCfgUtlfileDir.pl
Script Version : 120.0.12020000.15
Started        : Sat Mar 19 09:25:16 IST 2022

Log File       : /tmp/TXK_UTIL_DIR_Sat_Mar_19_09_25_06_2022/txkCfgUtlfileDir.log

Context file: /oraapps122/DATABASE/FUAT/12.1.0/appsutil/FUAT_funebs122.xml exists.

** WARNING: Incorrect value s_applptmp detected on Apps Tier nodes. Please check log for details



Completed        : Sat Mar 19 09:25:32 IST 2022


Successfully Completed the script
ERRORCODE = 0 ERRORCODE_END

When prompted, if your environment is on R12.TXK.C.Delta.13 or later, enter the password for the EBS_SYSTEM user. If your environment is on R12.TXK.C.Delta.12 or earlier, enter the password for the SYSTEM user.

With this command, the script reads the <ORACLE_HOME>/dbs/<DB_NAME>_utlfiledir.txt file that you created previously and validates the physical directory paths listed in that file. If you are creating your Oracle Database 19c instance on a different server and cannot validate the 19c Oracle home directory, then you should pass the -skipdirvalidation=Yes parameter in the txkCfgUtlfileDir.pl script command. The -servicetype parameter defaults to -servicetype=onpremise, but when running on Oracle Cloud, you must specify -servicetype=opc for this parameter.

After validating the directory paths, the script stores the paths for the supplemental UTL_FILE_DIR parameter in the new Oracle E-Business Suite tables underlying the apps.v$parameter and apps.v$parameter2 views.

The txkCfgUtlfileDir.pl script also creates a directory object for each physical directory path. Note that the script creates only one directory object for each directory path; it does not create duplicate directory objects, even if a directory path appears more than once in the <DB_NAME>_utlfiledir.txt file. The first directory object that is generated is named EBS_DB_DIR_UTIL. The script uses the following naming convention for all subsequent directory objects:  EBS_UTL_FILE_DIR_<random_number>

Note: If you encounter the following warning message:

WARNING: Incorrect value s_applptmp detected on Apps Tier nodes. Please check log for details.

then you can proceed with the database upgrade. However, you should update the value of the s_applptmp AutoConfig parameter in the Applications context file before running AutoConfig on the application tier.

18) Shut down the application tier server processes

On each application tier server node, shut down all server processes or services. The applications will be unavailable to users until all remaining tasks in this section are completed.

This should be already down based on pervious adop cycle steps.


19) Drop SYS.ENABLED$INDEXES

Source 12c DB environment
If the SYS.ENABLED$INDEXES table exists, connect to the database as SYSDBA, and run the following command to drop the table:

$ sqlplus "/ as sysdba"
SQL> drop table sys.enabled$indexes;

if table doesn't exists then its fine.

20) Remove the MGDSYS schema(Conditional) (Not needed for us as we are on 12c DB)

If you are upgrading from a database version prior to Oracle 12c, log on to the old database server node, use SQL*Plus to connect to the database as SYSDBA, and run the $ORACLE_HOME/md/admin/catnomgdidcode.sql script. This drops the MGDSYS schema.

$ sqlplus "/ as sysdba" @?/md/admin/catnomgdidcode.sql

21) Shut down the database listener

Source 12c Environment

On the database tier server node, shut down the Oracle Net or Net8 database listener in the old Oracle home.

[oracle@funebs122 ~]$ lsnrctl stop FUAT

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 12-APR-2021 06:44:19

Copyright (c) 1991, 2014, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=funebs122.lab)(PORT=1551)))
The command completed successfully

Note: To ensure that the database does not inadvertently point to a non-existent listener during the upgrade, verify that you do not have the LOCAL_LISTENER initialization parameter set.

SYS@FUAT >alter system set local_listener='';

System altered.

22) Database Pre-Upgrade Steps

Important Check:

  • Ensure that the oratab file contains an entry for the database to be upgraded.

Modify the following initialization parameters before the upgrade:

  • Comment out all the deprecated initialization parameters. Any necessary parameter will be added back in after the upgrade.
  • Unset the olap_page_pool_size initialization parameter.

alter system set  olap_page_pool_size=0 scope=spfile;

  • If you have an 11g source database, set the PGA_AGGREGATE_TARGET initialization parameter to at least 10G.
  • Set the SGA_TARGET initialization parameter to at least 2G.
  • Add the event EVENT='10946 trace name context forever, level 8454144'

 alter system set event='10946 trace name context forever, level 8454144' scope=spfile;

Shut down and restart the database to enable the parameters.


Source 12c Environment
Run the Pre-upgrade Tool:
Connect to the 12c Database and run the command as below:
[oracle@funebs122 ~]$ $ORACLE_HOME/jdk/bin/java 
-jar /oraapps122/DATABASE/FUAT/19c/rdbms/admin/preupgrade.jar TERMINAL TEXT
Report generated by Oracle Database Pre-Upgrade Information Tool Version
19.0.0.0.0 Build: 1 on 2022-03-19T10:16:14

Upgrade-To version: 19.0.0.0.0

=======================================
Status of the database prior to upgrade
=======================================
      Database Name:  FUAT
     Container Name:  FUAT
       Container ID:  0
            Version:  12.1.0.2.0
     DB Patch Level:  No Patch Bundle applied
         Compatible:  12.1.0
          Blocksize:  8192
           Platform:  Linux x86 64-bit
      Timezone File:  18
  Database log mode:  ARCHIVELOG
           Readonly:  FALSE
            Edition:  EE

  Oracle Component                       Upgrade Action    Current Status
  ----------------                       --------------    --------------
  Oracle Server                          [to be upgraded]  VALID
  JServer JAVA Virtual Machine           [to be upgraded]  VALID
  Oracle XDK for Java                    [to be upgraded]  VALID
  Real Application Clusters              [to be upgraded]  OPTION OFF
  OLAP Analytic Workspace                [to be upgraded]  VALID
  Oracle Text                            [to be upgraded]  VALID
  Oracle XML Database                    [to be upgraded]  VALID
  Oracle Java Packages                   [to be upgraded]  VALID
  Oracle Multimedia                      [to be upgraded]  VALID
  Oracle Spatial                         [to be upgraded]  VALID
  Oracle OLAP API                        [to be upgraded]  VALID

==============
BEFORE UPGRADE
==============

  REQUIRED ACTIONS
  ================
  None

  RECOMMENDED ACTIONS
  ===================
  1.  Update NUMERIC INITIALIZATION PARAMETERS to meet estimated minimums.
      This action may be done now or when starting the database in upgrade mode
      using the 19 ORACLE HOME.

       Parameter                                 Currently  19 minimum
       ---------                                 ---------  ------------------
       processes                                       200                 300

      The database upgrade process requires certain initialization parameters
      to meet minimum values.  The Oracle upgrade process itself has minimum
      values which may be higher and are marked with an asterisk.  After
      upgrading, those asterisked parameter values may be reset if needed.

alter system set processes=400 scope=spfile;

  2.  Remove initialization parameters that Oracle has obsoleted or removed.
      This action may be done now or when starting the database in upgrade mode
      using the target ORACLE HOME.

      Parameter
      ---------
      O7_DICTIONARY_ACCESSIBILITY
      optimizer_adaptive_features
      utl_file_dir

 alter system reset O7_DICTIONARY_ACCESSIBILITY scope=spfile;
 alter system reset optimizer_adaptive_features scope=spfile;
 alter system reset  utl_file_dir scope=spfile;

      If parameters that are obsolete or removed from the target release are
      present in the pfile/spfile, the Oracle database may not start, or it may
      start with an ORA- error.

  3.  Run 12.1.0.2.0 $ORACLE_HOME/rdbms/admin/utlrp.sql to recompile invalid
      objects.  You can view the individual invalid objects with


        SET SERVEROUTPUT ON;
        EXECUTE DBMS_PREUP.INVALID_OBJECTS;

      1 objects are INVALID.

      There should be no INVALID objects in SYS/SYSTEM or user schemas before
      database upgrade.

  4.  Remove OLAP Catalog by running the 12.1.0.2.0 SQL script
      $ORACLE_HOME/olap/admin/catnoamd.sql script.

      The OLAP Catalog component, AMD, exists in the database.

      Starting with Oracle Database 12c, the OLAP Catalog (OLAP AMD) is
      desupported and will be automatically marked as OPTION OFF during the
      database upgrade if present. Oracle recommends removing OLAP Catalog
      (OLAP AMD) before database upgrade.  This step can be manually performed
      before the upgrade to reduce downtime.

sqlplus '/as sysdba'

@$ORACLE_HOME/olap/admin/catnoamd.sql

  5.  Perform one of the following:
       1) Expire user accounts that use only the old 10G password version and
      follow the procedure recommended in Oracle Database Upgrade Guide under
      the section entitled, "Checking for Accounts Using Case-Insensitive
      Password Version".
       2) Explicitly set SQLNET.ALLOWED_LOGON_VERSION_SERVER in the 19
      SQLNET.ORA to a non-Exclusive Mode value, such as "11". (This is a short
      term approach and is not recommended because it will retain known
      security risks associated with the 10G password version.)

      Your database system has at least one account with only the 10G password
      version (see the PASSWORD_VERSIONS column of DBA_USERS).

      Starting with Oracle Database release 12.2.0.1, Exclusive Mode is the new
      default password-based authentication mode. All Exclusive Mode
      login/authentication attempts will fail for preexisting user accounts
      which only have the 10G password version and neither the 11G or 12C
      password version (see DBA_USERS.PASSWORD_VERSIONS.) For more information,
      refer to "Understanding Password Case Sensitivity and Upgrades" in the
      Oracle Database Upgrade Guide.

  6.  Remove the SEC_CASE_SENSITIVE_LOGON instance initialization parameter
      setting, to configure your system to use case sensitive password
      authentication by default.

      Your database system is configured to enforce case insensitive password
      authentication (the SEC_CASE_SENSITIVE_LOGON instance initialization
      parameter setting is FALSE).

      Starting with Oracle Database release 12.2, Exclusive Mode is the default
      password-based authentication mode. Case insensitive password
      authentication is not supported in Exclusive Mode. If your system needs
      to use case insensitive password authentication, Exclusive Mode must be
      switched off prior to the upgrade. See the Network Reference Manual
      chapter about the SQLNET.ORA parameter
      SQLNET.ALLOWED_LOGON_VERSION_SERVER for more details on Exclusive Mode.

  7.  Please make sure that all the MVs are refreshed and sys.sumdelta$ becomes
      empty before doing upgrade, unless you have strong business reasons not
      to do so. You can use dbms_mview.refresh() to refresh the MVs except
      those stale ones  to be kept due to business need. If there are any stale
      MVs depending on changes in sys.sumdelta$, do not truncate it, because
      doing so will cause wrong results after refresh. Please refer to the
      Materialized View section in MOS Note 2380601.1 for more details.

      There are one or more materialized views in either stale or invalid
      state, or which are currently being refreshed.

      Oracle recommends that all materialized views (MV's) are refreshed before
      upgrading the database because this will clear the MV logs and the
      sumdelta$ table and may reduce the upgrade time. If you choose to not
      refresh some MVs, the change data for those MV's will be carried through
      the UPGRADE process. After UPGRADE, you can refresh the MV's and  MV
      incremental refresh should work in normal cases.

  8.  Review and remove any unnecessary HIDDEN/UNDERSCORE parameters.

      The database contains the following initialization parameters whose name
      begins with an underscore:

      _ksb_restart_policy_times
      _compression_compatibility
      _system_trig_enabled
      _gby_vector_aggregation_enabled
      _optimizer_vector_transformation
      _optimizer_mode_force
      _sort_elimination_cost_ratio
      _always_anti_join
      _optimizer_null_aware_antijoin
      _optimizer_partial_join_eval
      _partition_view_enabled
      _b_tree_bitmap_plans
      _cpu_to_io
      _optimizer_extended_cursor_sharing
      _optimizer_extended_cursor_sharing_rel
      _optimizer_adaptive_cursor_sharing
      _optimizer_cost_model
      _optimizer_undo_cost_change
      _optimizer_system_stats_usage
      _new_sort_cost_estimate
      _complex_view_merging
      _unnest_subquery
      _optimizer_unnest_scalar_sq
      _eliminate_common_subexpr
      _pred_move_around
      _convert_set_to_join
      _px_ual_serial_input
      _px_minus_intersect
      _remove_aggr_subquery
      _optimizer_push_down_distinct
      _optimizer_cost_based_transformation
      _optimizer_squ_bottomup
      _push_join_predicate
      _push_join_union_view
      _push_join_union_view2
      _fast_full_scan_enabled
      _optimizer_skip_scan_enabled
      _optimizer_join_sel_sanity_check
      _optim_enhance_nnull_detection
      _parallel_broadcast_enabled
      _always_semi_join
      _ordered_nested_loop
      _optimizer_max_permutations
      _nlj_batching_enabled
      _mmv_query_rewrite_enabled
      _local_communication_costing_enabled
      _left_nested_loops_random
      _improved_row_length_enabled
      (list truncated)

SYS@FUAT >set head off
SYS@FUAT >set lines 200 pages 200
SYS@FUAT >set echo off
SYS@FUAT >set feedback off;
spool hidden.sql
SELECT 'alter system reset '||'"'||name||'"'||' scope =spfile;'
FROM SYS.V$PARAMETER
WHERE name LIKE '\_%' ESCAPE '\';
spool off

Execute hidden.sql
Check again now after restart any hidden paremeter left:

SELECT name,description
FROM SYS.V$PARAMETER
WHERE name LIKE '\_%' ESCAPE '\';

      Remove hidden parameters before database upgrade unless your application
      vendors and/or Oracle Support state differently.  Changes will need to be
      made in the pfile/spfile.

  9.  Review and remove any unnecessary EVENTS.

      The database contains events.

      There are events set that should be removed before upgrade, unless your
      application vendors and/or Oracle Support state differently.  Changes
      will need to be made in the pfile/spfile.

  10. (AUTOFIXUP) Gather stale data dictionary statistics prior to database
      upgrade in off-peak time using:

        EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;

      Dictionary statistics do not exist or are stale (not up-to-date).

      Dictionary statistics help the Oracle optimizer find efficient SQL
      execution plans and are essential for proper upgrade timing. Oracle
      recommends gathering dictionary statistics in the last 24 hours before
      database upgrade.

      For information on managing optimizer statistics, refer to the 12.1.0.2
      Oracle Database SQL Tuning Guide.

  INFORMATION ONLY
  ================
  11. Consider removing the following deprecated initialization parameters.

      Parameter
      ---------
      sec_case_sensitive_logon

      These deprecated parameters probably will be obsolete in a future release.

  12. Ensure there is additional disk space in LOG_ARCHIVE_DEST_1 for at least
      4486 MB of archived logs.  Check alert log during the upgrade that there
      is no write error to the destination due to lack of disk space.

      Archiving cannot proceed if the archive log destination is full during
      upgrade.

      Archive Log Destination:
       Parameter    :  LOG_ARCHIVE_DEST_1
       Destination  :  /oraapps122/DATABASE/FUAT/data/archive

      The database has archiving enabled.  The upgrade process will need free
      disk space in the archive log destination(s) to generate archived logs to.

  13. Check the Oracle Backup and Recovery User's Guide for information on how
      to manage an RMAN recovery catalog schema.

      If you are using a version of the recovery catalog schema that is older
      than that required by the RMAN client version, then you must upgrade the
      catalog schema.

      It is good practice to have the catalog schema the same or higher version
      than the RMAN client version you are using.

  ORACLE GENERATED FIXUP SCRIPT
  =============================
  All of the issues in database FUAT
  which are identified above as BEFORE UPGRADE "(AUTOFIXUP)" can be resolved by
  executing the following

    SQL>@/oraapps122/DATABASE/FUAT/12.1.0/cfgtoollogs/FUAT/preupgrade/preupgrade
    _fixups.sql

=============
AFTER UPGRADE
=============

  REQUIRED ACTIONS
  ================
  None

  RECOMMENDED ACTIONS
  ===================
  14. (AUTOFIXUP) If you use the -T option for the database upgrade, then run
      $ORACLE_HOME/rdbms/admin/utluptabdata.sql after the upgrade is complete,
      to VALIDATE and UPGRADE any user tables affected by changes to
      Oracle-Maintained types.

      There are user tables dependent on Oracle-Maintained object types.

      If the -T option is used to set user tablespaces to READ ONLY during the
      upgrade, user tables in those tablespaces, that are dependent on
      Oracle-Maintained types, will not be automatically upgraded. If a type is
      evolved during the upgrade, any dependent tables need to be re-validated
      and upgraded to the latest type version AFTER the database upgrade
      completes.

  15. Upgrade the database time zone file using the DBMS_DST package.

      The database is using time zone file version 18 and the target 19 release
      ships with time zone file version 32.

      Oracle recommends upgrading to the desired (latest) version of the time
      zone file.  For more information, refer to "Upgrading the Time Zone File
      and Timestamp with Time Zone Data" in the 19 Oracle Database
      Globalization Support Guide.

  16. Recreate directory objects to remove any symbolic links from directory
      paths.  To identify paths that contain symbolic links before upgrading,
      use OS commands like UNIX file or WINDOWS dir.  After upgrading, run
      $ORACLE_HOME/rdbms/admin/utldirsymlink.sql to identify directory objects
      with symbolic links in the path.

      Found 14 user directory objects to be checked: APPS_DATA_FILE_DIR,
      AW_DIR, CSR_XML_TOP, EBS_DB_DIR_UTIL, EBS_UTL_FILE_DIR_2378614680646,
      EBS_UTL_FILE_DIR_7219131372786, EBS_UTL_FILE_DIR_8078957515276,
      ECX_UTL_LOG_DIR_OBJ, ECX_UTL_XSLT_DIR_OBJ, FND_DIAG_DIR, IDR_DIR, ODPDIR,
      PREUPG_OUTPUT_DIR, TIMEZDIF_DIR.

      Starting in Release 18c, symbolic links are not allowed in directory
      object paths used with BFILE data types, the UTL_FILE package, or
      external tables.

  17. (AUTOFIXUP) Gather dictionary statistics after the upgrade using the
      command:

        EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;

      Oracle recommends gathering dictionary statistics after upgrade.

      Dictionary statistics provide essential information to the Oracle
      optimizer to help it find efficient SQL execution plans. After a database
      upgrade, statistics need to be re-gathered as there can now be tables
      that have significantly changed during the upgrade or new tables that do
      not have statistics gathered yet.

  18. Gather statistics on fixed objects after the upgrade and when there is a
      representative workload on the system using the command:

        EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;

      This recommendation is given for all preupgrade runs.

      Fixed object statistics provide essential information to the Oracle
      optimizer to help it find efficient SQL execution plans.  Those
      statistics are specific to the Oracle Database release that generates
      them, and can be stale upon database upgrade.

      For information on managing optimizer statistics, refer to the 12.1.0.2
      Oracle Database SQL Tuning Guide.

  INFORMATION ONLY
  ================
  19. Check the Oracle documentation for the identified components for their
      specific upgrade procedure.

      The database upgrade script will not upgrade the following Oracle
      components:  OLAP Catalog,Oracle Machine Generated Data

      The Oracle database upgrade script upgrades most, but not all Oracle
      Database components that may be installed.  Some components that are not
      upgraded may have their own upgrade scripts, or they may be deprecated or
      obsolete.

  ORACLE GENERATED FIXUP SCRIPT
  =============================
  All of the issues in database FUAT
  which are identified above as AFTER UPGRADE "(AUTOFIXUP)" can be resolved by
  executing the following

    SQL>@/oraapps122/DATABASE/FUAT/12.1.0/cfgtoollogs/FUAT/preupgrade/postupgrad
    e_fixups.sql


==================
PREUPGRADE SUMMARY
==================
  /oraapps122/DATABASE/FUAT/12.1.0/cfgtoollogs/FUAT/preupgrade/preupgrade.log
  /oraapps122/DATABASE/FUAT/12.1.0/cfgtoollogs/FUAT/preupgrade/preupgrade_fixups.sql
  /oraapps122/DATABASE/FUAT/12.1.0/cfgtoollogs/FUAT/preupgrade/postupgrade_fixups.sql

Execute fixup scripts as indicated below:

Before upgrade:

Log into the database and execute the preupgrade fixups
@/oraapps122/DATABASE/FUAT/12.1.0/cfgtoollogs/FUAT/preupgrade/preupgrade_fixups.sql

After the upgrade:

Log into the database and execute the postupgrade fixups
@/oraapps122/DATABASE/FUAT/12.1.0/cfgtoollogs/FUAT/preupgrade/postupgrade_fixups.sql

Preupgrade complete: 2022-03-19T10:16:15

Based on recommendation perform the action to fix pre-upgrade issues.
Re-run Preupgrade to check any issues left.

Also, Execute the pre-upgrade fixup script.

[oracle@funebs122 ~]$ sqlplus '/as sysdba'

SQL*Plus: Release 12.1.0.2.0 Production on Mon Apr 12 06:57:44 2021

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SYS@FUAT >@/oraapps122/DATABASE/FUAT/12.1.0/cfgtoollogs/FUAT/preupgrade/preupgrade_fixups.sql
For Source Database:     FUAT
Source Database Version: 12.1.0.2.0
For Upgrade to Version:  19.0.0.0.0

Preup                             Preupgrade
Action                            Issue Is
Number  Preupgrade Check Name     Remedied    Further DBA Action
------  ------------------------  ----------  --------------------------------
    1.  invalid_objects_exist     NO          Manual fixup recommended.
    2.  exclusive_mode_auth       NO          Manual fixup recommended.
    3.  case_insensitive_auth     NO          Manual fixup recommended.
    4.  mv_refresh                NO          Manual fixup recommended.
    5.  underscore_events         NO          Informational only.
                                              Further action is optional.
    6.  dictionary_stats          YES         None.
    7.  parameter_deprecated      NO          Informational only.
                                              Further action is optional.
    8.  min_archive_dest_size     NO          Informational only.
                                              Further action is optional.
    9.  rman_recovery_version     NO          Informational only.
                                              Further action is optional.
Ignore These

23) Upgrade the database instance


Invoke DBUA using the following command. The keep events parameter allows events in the preupgraded database to be enabled during the upgrade.
In Oracle Database 19c, the DMSYS schema is no longer used. The Data Mining option is installed in the SYS schema. The Oracle 19c pre-upgrade tool has been extended to include a warning that the DMSYS schema should be dropped. If this warning is reported, it is recommended to drop the schema. Removing the DMSYS schema has no effect on the functioning of Data Mining.

Disregard warnings related to Network ACLs. AutoConfig manages all the Oracle E-Business Suite Network ACLs.

When upgrading all statistics tables, note that Oracle E-Business Suite has only one statistics table (APPLSYS.FND_STATTAB) that needs to be upgraded.

Make sure 12c db entry is present in /etc/oratab. Open GUI and run below command

Source 19c Enviornment
$ORACLE_HOME/bin/dbua -keepEvents

Follow as per the screen below. Note I have already fixed the pre-upgrade recommendations in earlier steps, so will ignore them in this dbua screen.













Database upgrade has been completed successfully, and the database is ready to use.
SQL> select banner from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

24) Run the Post Upgrade Script generated during the Pre-Upgrade Steps.

Source 19c Environment
. 19c.env
export ORACLE_SID=FUAT

SQL> @/oraapps122/DATABASE/FUAT/12.1.0/cfgtoollogs/FUAT/preupgrade/postupgrade_fixups.sql
25) Post-Upgrade Tasks

Source 19c Environment
. 19c.env
export ORACLE_SID=FUAT

There are few important post-upgrade miscellaneous tasks that need to be performed.
If you previously had the SEC_CASE_SENSITIVE_LOGON initialization parameter set to FALSE, re-enable the parameter.

In case spfile is not there then create spfile and restart database.
SQL> alter system set SEC_CASE_SENSITIVE_LOGON=false;

System altered.
SQL> alter trigger SYSTEM.EBS_LOGON compile;

Trigger altered.
SQL> alter system set compatible='19.0.0' scope=spfile;

System altered.

Restart DB
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 2147481648 bytes
Fixed Size		    8898608 bytes
Variable Size		  520093696 bytes
Database Buffers	 1593835520 bytes
Redo Buffers		   24653824 bytes
Database mounted.
Database opened.
SQL> show parameter compatible

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
compatible			     string	 19.0.0
noncdb_compatible		     boolean	 FALSE
26) Run DataPatch

Source 19c Environment
. 19c.env
export ORACLE_SID=FUAT

[oracle@funebs122 ~]$ $ORACLE_HOME/OPatch/datapatch


27) Connect to sysdba and run below

Source 19c Environment
. 19c.env
export ORACLE_SID=FUAT

SQL> @?/rdbms/admin/dbmsxdbschmig.sql
SQL> @?/rdbms/admin/prvtxdbschmig.plb

28) Run ADgrants

Source 19c Environment
. 19c.env
export ORACLE_SID=FUAT

Copy adgrants.sql from $APPL_TOP/admin to DB tier and run it

[oracle@funebs122 admin]$ sqlplus '/as sysdba'

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Apr 12 18:33:09 2021
Version 19.10.0.0.0

Copyright (c) 1982, 2020, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.10.0.0.0

SQL> @adgrants.sql apps
Note: When running adgrants.sql, you may get ORA-00942 errors. These are caused by adgrants.sql trying to create grants on non-existent objects. The errors can be ignored.

The following ERRORS and WARNINGS have been encountered during this adgrants session:


TIME_STAMP           SESSION_ID LOG_MODULE                                 LOG_LEVEL
-------------------- ---------- ------------------------------------------ ----------
LOG_MESSAGE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2022/03/20 12:58:52          20 ad.plsql.ad_zd_sys.GIVE_PRIVILEGE          WARNING
ORA-04042: procedure, function, package, or package body does not exist, SQL: grant EXECUTE on "DBMS_SCHEMA_COPY" to "SYSTEM" with grant option

2022/03/20 12:58:52          20 ad.plsql.ad_zd_sys.GIVE_PRIVILEGE          WARNING
ORA-04042: procedure, function, package, or package body does not exist, SQL: grant EXECUTE on "DBMS_SCHEMA_COPY" to "APPS"

2022/03/20 12:58:59          20 ad.plsql.ad_zd_sys.GIVE_PRIVILEGE          WARNING
ORA-00942: table or view does not exist, SQL: grant WRITE on "DIRECTORY FND_DIAG_DIR" to "APPS"

2022/03/20 12:58:59          20 ad.plsql.ad_zd_sys.GIVE_PRIVILEGE          WARNING
ORA-00942: table or view does not exist, SQL: grant READ on "DIRECTORY FND_DIAG_DIR" to "APPS"



Grants given by this script have been written to the ad_zd_logs table.
You can run $AD_TOP/sql/ADZDSHOWLOG.sql to produce a report showing these grants.


29) Grant create procedure privilege on CTXSYS

Source 19c Environment
. 19c.env
export ORACLE_SID=FUAT

Copy $AD_TOP/patch/115/sql/adctxprv.sql from the administration server node to the database server node. Use SQL*Plus to connect to the database as apps and run the script using the following command:

$ sqlplus apps/<apps password> @adctxprv.sql <SYSTEM password> CTXSYS
[oracle@funebs122 tmp]$ sqlplus apps/apps @adctxprv.sql manager CTXSYS

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Apr 12 18:38:22 2021
Version 19.10.0.0.0

Copyright (c) 1982, 2020, Oracle.  All rights reserved.

Last Successful login time: Mon Apr 12 2021 18:38:14 +05:30

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.10.0.0.0


Connecting to SYSTEM
Connected.

PL/SQL procedure successfully completed.


Commit complete.

30) Compile invalid objects

Source 19c Environment
. 19c.env
export ORACLE_SID=FUAT

Use SQL*Plus to connect to the database as SYSDBA and run the $ORACLE_HOME/rdbms/admin/utlrp.sql script to compile invalid objects.

$ sqlplus "/ as sysdba" @$ORACLE_HOME/rdbms/admin/utlrp.sql

SQL> select count(*) from dba_objects where status='INVALID';

  COUNT(*)
----------
	17


31) Grant datastore access

Source 19c Environment
. 19c.env
export ORACLE_SID=FUAT

Use SQL*Plus to connect to the database as SYSDBA and run the following command:

$ sqlplus "/ as sysdba"
SQL> grant text datastore access to public;

Grant succeeded.

32) Gather statistics for the SYS schema

Source 19c Environment
. 19c.env
export ORACLE_SID=FUAT

Copy $APPL_TOP/admin/adstats.sql from the administration server node to the database server node. Note that adstats.sql has to be run in restricted mode. Use SQL*Plus to connect to the database as SYSDBA and use the following commands to run adstats.sql in restricted mode:

$ sqlplus "/ as sysdba"
SQL> alter system enable restricted session;

System altered.

SQL> @adstats.sql
Connected.
$ sqlplus "/ as sysdba"
SQL> alter system disable restricted session;

System altered.

SQL> exit


--------------------------------------------------
--- adstats.sql started at 2022-03-20 13:17:36 ---


Checking for the DB version and collecting statistics ...


PL/SQL procedure successfully completed.



------------------------------------------------
--- adstats.sql ended at 2022-03-20 14:02:45 ---


Commit complete.

33) Create the new MGDSYS schema (Conditional)-Not required by me

Source 19c Environment
. 19c.env
export ORACLE_SID=FUAT

If you upgraded from a database version prior to Oracle 12c, use SQL*Plus to connect to the database as SYSDBA and run the $ORACLE_HOME/rdbms/admin/catmgd.sql script. This creates the new MGDSYS schema.

$ sqlplus "/ as sysdba" @?/rdbms/admin/catmgd.sql


34) Convert Database to Multitenant Architecture or PDB

There are two databases that are associated with the 19c Oracle home, the CDB(funcdb) and the non-CDB database (FUAT). Moreover, the non-CDB database will be migrated to the PDB database. Set the appropriate environment variables to connect to the appropriate database.

Only the txkSetCfgCDB.env/cmd file in the $ORACLE_HOME/appsutil directory is necessary. It sets certain environment variables. However, it does not distinguish between the different databases in the 19c Oracle home. It is used mainly to complete the steps in this subsection. The following steps assume that a new window is brought up every time. However, there is no need to run txkSetCfgCDB.env/cmd twice in the same window. So, you may skip running the txkSetCfgCDB.env/cmd script if it has already been run on the particular terminal you are using.

After running the txkPostPDBCreationTasks.pl, additional environment files are created so that connecting to the database is more convenient. Load the proper environment variables and connect to the database by performing the following steps:

  • For the non-CDB database, source the $ORACLE_HOME/<non-CDB SID>_<HOST>.env/cmd file. Then, run sqlplus <user>/<password>@<non-CDB SID>. (The environment file was created during the earlier upgrade steps)
  • For the CDB database, source the $ORACLE_HOME/<CDB SID>_<HOST>.env/cmd file. Then, run sqlplus <user>/<password> or connect as SYSDBA.
  • For the PDB database on UNIX/Linux platforms, to connect as SYSDBA, source the $ORACLE_HOME/<CDB SID>_<HOST>.env file. Set the ORACLE_PDB_SID environment variable to <PDB SID>. Then, connect as SYSDBA.
  • For the PDB database on Windows platforms, to connect as SYSDBA, source the $ORACLE_HOME/<PDB SID>_<HOST>.cmd file. Then, connect as SYSDBA.
  • For the PDB database, to connect to other users, source the $ORACLE_HOME/<PDB SID>_<HOST>.env/cmd file. Then, run sqlplus <user>/<password>@<PDB SID>.


Note: The txkOnPremPrePDBCreationTasks.pl script shuts down the non-CDB database. Do not manually bring up the non-CDB database. There will be no access to the non-CDB database until after the migration of the non-CDB database to the PDB.

make sure all temp, sys, the system has sufficient free space.

non-CDB database (FUAT) has to be kept down.

a) Create the PDB descriptor

$ cd $ORACLE_HOME/appsutil
$ . ./txkSetCfgCDB.env dboraclehome=<full path of 19c ORACLE_HOME>
$ export ORACLE_SID=<source SID>
$ cd $ORACLE_HOME/appsutil/bin
$ perl txkOnPremPrePDBCreationTasks.pl -dboraclehome=<ORACLE_HOME> \
-outdir=<ORACLE_HOME>/appsutil/log -appsuser=<apps user> -dbsid=<source SID>

[oracle@funebs122 tmp]$ cd $ORACLE_HOME/appsutil
[oracle@funebs122 appsutil]$ . ./txkSetCfgCDB.env dboraclehome=/oraapps122/DATABASE/FUAT/19c

Oracle Home being passed: /oraapps122/DATABASE/FUAT/19c
[oracle@funebs122 appsutil]$ export ORACLE_SID=FUAT
[oracle@funebs122 appsutil]$ cd $ORACLE_HOME/appsutil/bin
[oracle@funebs122 bin]$ perl txkOnPremPrePDBCreationTasks.pl 
-dboraclehome=/oraapps122/DATABASE/FUAT/19c \
> -outdir=/oraapps122/DATABASE/FUAT/19c/appsutil/log -appsuser=apps -dbsid=FUAT
Enter the APPS Password: 

****************************************************************************************
*                                                                                      *
*         IMPORTANT NOTE: DO NOT START THE DB TILL THE DATA FILES ARE MIGRATED         *
*                                                                                      *
*         IF DB IS STARTED, THEN PDB DESCRIPTOR XML GENERATED BECOMES INVALID          *
*                                                                                      *
****************************************************************************************

b) Update the CDB initialization parameters

On the database server node, copy the <source SID>_initparam.sql and <source SID>_datatop.txt files from the source $ORACLE_HOME/dbs directory to the new $ORACLE_HOME/dbs directory. Then use SQL*Plus to connect to the CDB as SYSDBA, and run the following commands to update the CDB initialization parameters:
Port Number Being Passed is for CDB database.

$ cd $ORACLE_HOME/appsutil
$ . ./txkSetCfgCDB.env dboraclehome=<full path of ORACLE_HOME>
$ export ORACLE_SID=<CDB SID>
$ sqlplus "/ as sysdba"
SQL> startup nomount;
SQL> @$ORACLE_HOME/dbs/<source SID>_initparam.sql
SQL> alter system set LOCAL_LISTENER="<hostname>:<cdb port number>" scope=both;
SQL> shutdown;
SQL> startup;

[oracle@funebs122 dbs]$ pwd
/oraapps122/DATABASE/FUAT/12.1.0/dbs
[oracle@funebs122 dbs]$ cp FUAT_initparam.sql FUAT_datatop.txt /oraapps122/DATABASE/FUAT/19c/dbs/

Remove line from FUAT_initparam.sql

alter system set CONNECTION_BROKERS="((TYPE=DEDICATED)(BROKERS=1)), ((TYPE=EMON)(BROKERS=1))" scope=spfile;

[oracle@funebs122 bin]$ cd $ORACLE_HOME/appsutil
[oracle@funebs122 appsutil]$ . ./txkSetCfgCDB.env dboraclehome=$ORACLE_HOME

Oracle Home being passed: /oraapps122/DATABASE/FUAT/19c
[oracle@funebs122 appsutil]$ export ORACLE_SID=funcdb
[oracle@funebs122 appsutil]$ sqlplus "/ as sysdba"

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Apr 12 19:18:08 2021
Version 19.10.0.0.0

Copyright (c) 1982, 2020, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area 2147482336 bytes
Fixed Size		    9136864 bytes
Variable Size		  570425344 bytes
Database Buffers	 1560281088 bytes
Redo Buffers		    7639040 bytes
SQL> @$ORACLE_HOME/dbs/FUAT_initparam.sql
SQL> alter system set LOCAL_LISTENER="funebs122:1522" scope=both;

System altered.

SQL> shutdown;
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> startup
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.

Total System Global Area 2147482136 bytes
Fixed Size		    9136664 bytes
Variable Size		  436207616 bytes
Database Buffers	 1677721600 bytes
Redo Buffers		   24416256 bytes
Database mounted.
Database opened.
SQL> select name,open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------
FUNCDB    READ WRITE



c) Check for PDB violations

Use the following commands to run the txkChkPDBCompatability.pl script. This checks the PDB for any violations.

$ cd $ORACLE_HOME/appsutil
$ . ./txkSetCfgCDB.env dboraclehome=<full path of ORACLE_HOME>
$ export ORACLE_SID=<CDB SID>
$ cd $ORACLE_HOME/appsutil/bin
$ perl txkChkPDBCompatability.pl -dboraclehome=<ORACLE_HOME> \
-outdir=<ORACLE_HOME>/appsutil/log -cdbsid=<CDB SID> \
-pdbsid=<source SID> -servicetype=onpremise
[oracle@funebs122 dbs]$ cd $ORACLE_HOME/appsutil
[oracle@funebs122 appsutil]$ . ./txkSetCfgCDB.env dboraclehome=$ORACLE_HOME

Oracle Home being passed: /oraapps122/DATABASE/FUAT/19c
[oracle@funebs122 appsutil]$ export ORACLE_SID=funcdb
[oracle@funebs122 appsutil]$ cd $ORACLE_HOME/appsutil/bin
[oracle@funebs122 bin]$ perl txkChkPDBCompatability.pl -dboraclehome=$ORACLE_HOME \
-outdir=$ORACLE_HOME/appsutil/log -cdbsid=funcdb \
-pdbsid=FUAT -servicetype=onpremise


****************************************************************************************
*                                                                                      *
*       IMPORTANT NOTE: RESOLVE ALL VIOLATIONS BEFORE PROCEEDING TO CREATE PDB         *
*                                                                                      *
*         - All the errors except SQL PATCH ERRORS should be resolved                  *
*                                                                                      *
*         - All the warnings except CHARACTER SET WARNINGS can be ignored              *
*                                                                                      *
*         - Review and set the INIT PARAMETERs to match the EBS requirements           *
*                                                                                      *
****************************************************************************************


Note: Use the same command options for Oracle Cloud Infrastructure Compute environments.
No Voilations found in my enviornment.

Review all warnings and resolve all errors. Do not run noncdb_to_pdb.sql as that will be run by txkCreatePDB.pl in the next step.


d) Create the PDB

Load the environment variables by running the following commands.

Make sure to extend tablespaces on CDB to have sufficient space.

$ cd $ORACLE_HOME/appsutil
$ . ./txkSetCfgCDB.env dboraclehome=<full path of ORACLE_HOME>
$ cd $ORACLE_HOME/appsutil/bin

$ perl txkCreatePDB.pl -dboraclehome=<ORACLE_HOME> -outdir=<ORACLE_HOME>/appsutil/log \
-cdbsid=<CDB SID> -pdbsid=<source SID> -dbuniquename=<CDB SID> -servicetype=onpremise

Note: Use the same command options for Oracle Cloud Infrastructure Compute environments.

The PDB datafile location can be the same as the source datafile location.
[oracle@funebs122 bin]$ cd $ORACLE_HOME/appsutil
[oracle@funebs122 appsutil]$ . ./txkSetCfgCDB.env dboraclehome=$ORACLE_HOME

Oracle Home being passed: /oraapps122/DATABASE/FUAT/19c
[oracle@funebs122 appsutil]$ cd $ORACLE_HOME/appsutil/bin
[oracle@funebs122 bin]$ pperl txkCreatePDB.pl -dboraclehome=$ORACLE_HOME 
-outdir=$ORACLE_HOME/appsutil/log \
-cdbsid=funcdb -pdbsid=FUAT -dbuniquename=funcdb -servicetype=onpremise
I am keeping the data top for non-CDB(FUAT) and PDB the same on ASM. Make sure you have sufficient space where PDB datafiles will sit

Non-CDB on ASM--+EBS_DATA
PDB on ASM--+EBS_DATA
DATA_TOP_1(In case of file system below)
===========
Enter the non-CDB data top [/oraapps122/DATABASE/FUAT/data]: 
Enter the corresponding PDB data top [/oraapps122/DATABASE/FUAT/data]: 
In case of ASM

Number of DATA_TOPs: 2


DATA_TOP_2
===========
Enter the non-CDB data top [+EBS_DATA/FUAT/TEMPFILE]:
Enter the corresponding PDB data top [+EBS_DATA/FUAT/TEMPFILE]:

DATA_TOP_1
===========
Enter the non-CDB data top [+EBS_DATA/FUAT/DATAFILE]:
Enter the corresponding PDB data top [+EBS_DATA/FUAT/DATAFILE]:


e) Run the post PDB script

Source 19c
export ORACLE_SID=funcdb
sqlplus '/as sysdba'
alter user system identified by OraHim#123;

change CDB system password

Use the following commands to run the txkPostPDBCreationTasks.pl script. This updates the PDB configuration.

$ cd $ORACLE_HOME/appsutil
$ . ./txkSetCfgCDB.env dboraclehome=<full path of ORACLE_HOME>
$ perl $ORACLE_HOME/appsutil/bin/txkPostPDBCreationTasks.pl -dboraclehome=<ORACLE_HOME> \
-outdir=<ORACLE_HOME>/appsutil/log -cdbsid=<CDB SID> -pdbsid=<PDB SID> \
-appsuser=apps -dbport=<CDB TNS port number> -servicetype=onpremise

[oracle@funebs122 bin]$ cd $ORACLE_HOME/appsutil
[oracle@funebs122 appsutil]$ . ./txkSetCfgCDB.env dboraclehome=$ORACLE_HOME

Oracle Home being passed: /oraapps122/DATABASE/FUAT/19c
[oracle@funebs122 appsutil]$ perl $ORACLE_HOME/appsutil/bin/txkPostPDBCreationTasks.pl 
-dboraclehome=$ORACLE_HOME \
-outdir=$ORACLE_HOME/appsutil/log -cdbsid=funcdb -pdbsid=FUAT \
-appsuser=apps -dbport=1522 -servicetype=onpremise
Enter the APPS Password: 

Enter the CDB SYSTEM Password: 

Give CDB System password with password complexity.
Password must contain at least 1 special character
Note: Use the same command options for Oracle Cloud Infrastructure Compute environments.

This step also runs the autoconfig at DB level.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 FUAT                           READ WRITE NO


f) Change Initialization Parameters

Use the following sections in My Oracle Support Knowledge Document 396009.1Database Initialization Parameter Settings for Oracle E-Business Suite Release 12, as a guideline in modifying your initialization parameters.

[oracle@funebs122 dbs]$ export ORACLE_SID=funcdb
[oracle@funebs122 dbs]$ sqlplus '/as sysdba'

alter system set event='10946 trace name context forever, level 8454144' scope=spfile;
 alter system set sec_case_sensitive_logon=FALSE scope=spfile;



35) Run Autoconfig on the Application tier

Add the CDB entry in tnsnames.ora of Application

<TWO_TASK> =
 (DESCRIPTION =
  (ADDRESS = (PROTOCOL=tcp)(HOST=<hostname>.<domain>)(PORT=<port number>))
  (CONNECT_DATA = (SERVICE_NAME=ebs_<PDB SID>)(INSTANCE_NAME=<CDB SID>))
 )

As the user of the applications server node, on both the Patch and Run APPL_TOP, modify the $TNS_ADMIN/tnsnames.ora file to specify the CDB instance name. The following shows the format of the new TNS entry.

funcdb =
 (DESCRIPTION =
  (ADDRESS = (PROTOCOL=tcp)(HOST=funebs122.lab)(PORT=1522))
  (CONNECT_DATA = (SERVICE_NAME=ebs_FUAT)(INSTANCE_NAME=funcdb))
 )

Update the following values in the context file of every Applications tier server node.
Variable Name Value
s_dbport New database port
s_apps_jdbc_connect_descriptor NULL
s_applptmp Directory (not /usr/tmp) defined in UTL_FILE_DIR
To identify the allowable directories for s_applptmp use, connect to the Oracle E-Business Suite database instance as the apps user (on PDB)and run the following query:

SQL> select value from v$parameter where name='utl_file_dir';

Run AutoConfig on both patch and run APPL_TOPs using the following command.

$INST_TOP/admin/scripts/adautocfg.sh

Note: When running AutoConfig on the patch file system APPL_TOP, ignore all errors.

36) Apply post-upgrade WMS patches (Conditional)-Not Needed

If you upgraded from a database version prior to 12c, apply Patch 19007053. Since the WLS admin server has not yet been brought up, apply the patch in downtime mode on the run APPL_TOP by running the following command:

$ adop phase=apply patches=19007053 apply_mode=downtime


37) Recreate custom database links (Conditional)

If the Oracle Net listener in the 19c Oracle home is defined differently to the one used by the old Oracle home, you must recreate any custom self-referential database links that exist in the Oracle E-Business Suite database instance. To check for the existence of database links, use SQL*Plus on the database server node to connect to the database instance as apps and run the following query:

$ sqlplus apps/<apps password>
SQL> select db_link from all_db_links;
The EDW_APPS_TO_WH and APPS_TO_APPS database links, if they exist, should have been updated with the new port number by AutoConfig.
If you have custom self-referential database links in the database instance, use the following commands to drop and recreate them:

$ sqlplus apps/<apps password>
SQL> drop database link <custom database link>;
SQL> create database link <custom database link> connect to <user> identified by
<password> using '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<hostname>)
(PORT=<port number>))(CONNECT_DATA=(SID=<ORACLE_SID>)))';


38) Start Application Services and Validate the Database Version






Finally this completes our upgrade to 19c


Please also check document for issues after upgrade

19c Database with Oracle E-Business Suite R12 Known Issues & Solutions (Doc ID 2662860.1)


References:
MOS Doc Id. 1594274.1 Install Oracle Database binaries 19c and apply EBS overlay patches as per
MOS Doc Id. 2552181.1 Interoperability Notes: Oracle E-Business Suite Release 12.2 with Oracle EBS Database 19c
MOS (Doc ID 396009.1) Database Initialization Parameters for Oracle E-Business Suite Release 12
(MOS Note 2530665.1) Using Oracle Database 19c RAC Multitenant (Single PDB) with Oracle E-Business Suite Release 12.2
(MOS Note 2554156.1) Export/Import Process for Oracle E-Business Suite Release 12.2 Database Instances Using Oracle Database 19

Number of Visitors