Oracle EBS Database Upgrade from 12c to 19c Part-2

Oracle EBS Database Upgrade from 12c to 19c Part-2

Β 

This post is a continuation of the previous article on Oracle EBS Database Upgrade from 12c to 19c Part-1. Here, we will delve into the remaining part of the database upgrade process from 12c to 19c. Let’s begin with Section 6, building upon Section 5 discussed in the last post.

Β 

Section 6 – Create the CDB through DBCA

Step 1. 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)(prodcdb), 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@test1 ~]$ . ./19c.env

[oracle@test1 ~]$Β  cd $ORACLE_HOME/bin

[oracle@test1 bin]$ ./dbca

  1. Select “Create a Database”
  2. Click Next
  1. Select “Advance Configuration”
  2. Click Next
  1. Select “General Purpose or Transaction Processing”
  2. Click Next
  1. Enter the Following Highlighted
  2. Select “Create as Container Database”Β 
  3. Select “Use Local Undo tablespace for PDBs”
  4. Click Next
  1. Select The Following as Shown in the Picture
  2. Click Next
  1. Click Next
  1. Click Next
  1. Click Next
  1. Enter the Following as Shown in the PictureΒ 
  2. Click “Character Sets” TAB
  1. Select The Following as Shown in the Picture
  2. Click Next
  1. De Select the Following EM Configuration
  2. Click Next
  1. Enter Password
  2. Click Next
  1. Select “Create Database”Β 
  2. Click Next
  1. Click Finish

Database Creation Process Starts

  1. Click Close

Β 

Step 2. Run DataPatch on the CDB

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

Source 19 environment File

[oracle@test1 ~]$ . ./19c.env

[oracle@test1 ~]$ export ORACLE_SID=prodcdb

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

SQL Patching tool version 19.19.0.0.0 Production on Mon Jul 17 03:01:50 2023

Copyright (c) 2012, 2023, Oracle.Β  All rights reserved.

Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_29132_2023_07_17_03_01_50/

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 35050341 (OJVM RELEASE UPDATE: 19.19.0.0.230418 (35050341)):

Β  Binary registry: Installed

Β  PDB CDB$ROOT: Applied successfully on 17-JUL-23 02.35.23.436147 AM

Β  PDB PDB$SEED: Applied successfully on 17-JUL-23 02.47.06.787785 AM

Interim patch 35406065 (RESTORE DATABASE PREVIEW FAILING WITH RMAN-00600 [7004] [0] [KRMR_GET_ARCHIVED_NEXT_SCN_ALSCN] AFTER):

Β  Binary registry: Installed

Β  PDB CDB$ROOT: Applied successfully on 17-JUL-23 02.35.23.546590 AM

Β  PDB PDB$SEED: Applied successfully on 17-JUL-23 02.47.06.898928 AM

Current state of release update SQL patches:

Β  Binary registry:

Β Β Β  19.19.0.0.0 Release_Update 230322020406: Installed

Β  PDB CDB$ROOT:

Β Β Β  Applied 19.19.0.0.0 Release_Update 230322020406 successfully on 17-JUL-23 02.35.23.428107 AM

Β  PDB PDB$SEED:

Β Β Β  Applied 19.19.0.0.0 Release_Update 230322020406 successfully on 17-JUL-23 02.47.06.781113 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 Mon Jul 17 03:02:14 2023

Β 

Β 

Step 3. Create the CDB MGDSYS schema

Use SQL*Plus to connect to the CDB as SYSDBA and run the $ORACLE_HOME/rdbms/admin/catmgd.sql script. This creates the new MGDSYS schema on the CDB

Source 19c Environment

[oracle@test1 ~]$ . ./19c.env

[oracle@test1 ~]$ sqlplus ‘/as sysdba’

SQL*Plus: Release 19.0.0.0.0 – Production on Mon Jul 17 03:04:08 2023

Version 19.19.0.0.0

Copyright (c) 1982, 2022, Oracle.Β  All rights reserved.

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

Version 19.19.0.0.0

SQL> @$ORACLE_HOME/rdbms/admin/catmgd.sql

This creates the new MGDSYS schema on the CDB.

Β 

Β 

Step 4. 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.

$ 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@test1 ~]$ . ./19c.env

[oracle@test1 ~]$ cd $ORACLE_HOME/appsutil

[oracle@test1 appsutil]$ . ./txkSetCfgCDB.env dboraclehome=$ORACLE_HOMEΒ 

Oracle Home being passed: /u01/oracle/PROD/19.0.0

[oracle@test1 appsutil]$ cd $ORACLE_HOME/appsutil/binΒ 

[oracle@test1 bin]$ perl txkGenCDBTnsAdmin.pl -dboraclehome=$ORACLE_HOME

-cdbname=prodcdb -cdbsid=prodcdb -dbport=1522 -outdir=$ORACLE_HOME/appsutil/log

Script NameΒ Β Β  : txkGenCDBTnsAdmin.pl

Script Version : 120.0.12020000.11

StartedΒ Β Β Β Β Β Β  : Mon Jul 17 03:10:02 PKT 2023

Log FileΒ Β Β Β Β Β  : /u01/oracle/PROD/19.0.0/appsutil/log/

TXK_CDB_TNS_ADMIN_Mon_Jul_17_03_10_02_2023/txkGenCDBTnsAdmin.log

———–

Values used

———–

Database Oracle HomeΒ Β Β  : /u01/oracle/PROD/19.0.0

CDB NAMEΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β  : prodcdb

CDB SIDΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  : prodcdb

Database portΒ Β Β Β Β Β Β Β Β Β  : 1522

OUT DirectoryΒ Β Β Β Β Β Β Β  Β Β : /u01/oracle/PROD/19.0.0/appsutil/log

Is RAC?Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  : No

Virtual HostnameΒ Β Β Β Β Β Β  :

Logical HostnameΒ Β Β Β Β Β Β  :

Script execution modeΒ Β  : generate

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

Validating oracle home…

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

Oracle Home: /u01/oracle/PROD/19.0.0 exists.

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

Validating out directory…

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

Out directory: /u01/oracle/PROD/19.0.0/appsutil/log exists.

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

Validating script execution mode…

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

Script execution mode: generate

Script execution mode is valid.

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

Inside getDBHostDetails()…

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

DB Hostname : test1

DB DomainΒ Β  : example.com

Logical hostname is not passed, hence using physical hostname details.

Logical Hostname : test1

Logical DomainΒ Β  : example.com

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

Inside getDBPort()…

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

DB Port passed as an argument, using the same.

DB Port: 1522

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

Inside generateCDBTNSAdminContent()…

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

Creating the directory: /u01/oracle/PROD/19.0.0/appsutil/log/

TXK_CDB_TNS_ADMIN_Mon_Jul_17_03_10_02_2023/tns_admin_cdb_bkp

Creating the directory: /u01/oracle/PROD/19.0.0/appsutil/log/

TXK_CDB_TNS_ADMIN_Mon_Jul_17_03_10_02_2023/tns_admin_cdb_temp

listener_template: listener_ora_cdb_db19.tmp

sqlnet_template: sqlnet_ora_cdb_db19.tmp

Copying the file

—————-

SOURCE : /u01/oracle/PROD/19.0.0/appsutil/template/listener_ora_cdb_db19.tmp

TARGET : /u01/oracle/PROD/19.0.0/appsutil/log/TXK_CDB_TNS_ADMIN_Mon_Jul_17_03_10_02_2023

/tns_admin_cdb_temp/listener.ora

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

Inside replaceContextVariables()…

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

File /u01/oracle/PROD/19.0.0/network/admin/listener.ora does not exist.

Copying the file

—————-

SOURCE : /u01/oracle/PROD/19.0.0/appsutil/log/TXK_CDB_TNS_ADMIN_Mon_Jul_17_03_10_02_2023

/tns_admin_cdb_temp/listener.ora

TARGET : /u01/oracle/PROD/19.0.0/network/admin/listener.ora

Copying the file

—————-

SOURCE : /u01/oracle/PROD/19.0.0/appsutil/template/tnsnames_ora_cdb_db121.tmp

TARGET : /u01/oracle/PROD/19.0.0/appsutil/log/TXK_CDB_TNS_ADMIN_Mon_Jul_17_03_10_02_2023

/tns_admin_cdb_temp/tnsnames.ora

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

Inside replaceContextVariables()…

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

File /u01/oracle/PROD/19.0.0/network/admin/tnsnames.ora does not exist.

Copying the file

—————-

SOURCE : /u01/oracle/PROD/19.0.0/appsutil/log/TXK_CDB_TNS_ADMIN_Mon_Jul_17_03_10_02_2023

/tns_admin_cdb_temp/tnsnames.ora

TARGET : /u01/oracle/PROD/19.0.0/network/admin/tnsnames.ora

Copying the file

—————-

SOURCE : /u01/oracle/PROD/19.0.0/appsutil/template/sqlnet_ora_cdb_db19.tmp

TARGET : /u01/oracle/PROD/19.0.0/appsutil/log/TXK_CDB_TNS_ADMIN_Mon_Jul_17_03_10_02_2023

/tns_admin_cdb_temp/sqlnet.ora

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

Inside replaceContextVariables()…

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

File /u01/oracle/PROD/19.0.0/network/admin/sqlnet.ora does not exist.

Copying the file

—————-

SOURCE : /u01/oracle/PROD/19.0.0/appsutil/log/TXK_CDB_TNS_ADMIN_Mon_Jul_17_03_10_02_2023

/tns_admin_cdb_temp/sqlnet.ora

TARGET : /u01/oracle/PROD/19.0.0/network/admin/sqlnet.ora

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

Inside updateCDBSqlNetOra()…

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

Updating the IFILE entry…

Exiting from the script.

Ended: Mon Jul 17 03:10:02 PKT 2023

Β 

Step 5. Shut down the CDB

Source 19c environment file andΒ Use SQL*Plus to connect to the CDB as SYSDBA and use the following command to shut down the database:

[oracle@test1 bin]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 – Production on Mon Jul 17 03:12:11 2023

Version 19.19.0.0.0

Copyright (c) 1982, 2022, Oracle.Β  All rights reserved.

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

Version 19.19.0.0.0

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

Β 

Β 


Β 

Section 7 – Preparing DB Upgrade

Step 1. Complete the patching cycle and remove ADOP-created editions

As the owner of the source administration server, execute any of the following commands that have not been executed before. This action will remove any editions that were created during previous adop patching cycles, thereby cleaning up the environment. Additionally, these commands will finalize any pending patching cycles that are still open.

On Application Tier source run file system environmentΒ 

[oracle@test1 ~]$ . ./EBSapps.env run

Β  E-Business Suite Environment Information

Β  —————————————-

Β  RUN File SystemΒ Β Β Β Β Β Β Β Β Β  : /u01/oracle/PROD/fs2/EBSapps/appl

Β  PATCH File SystemΒ Β Β Β Β Β Β Β  : /u01/oracle/PROD/fs1/EBSapps/appl

Β  Non-Editioned File System : /u01/oracle/PROD/fs_ne

Β  DB Host: test1.example.comΒ  Service/SID: PROD

Β  Sourcing the RUN File System …

$ adop phase=prepareΒ 

$ adop phase=actualize_allΒ  Β 

$ adop phase=finalize finalize_mode=fullΒ 

$ adop phase=cutover mtrestart=noΒ 

Note: The steps mentioned above may require a significant amount of time to complete. Therefore, it is advised to relax and monitor the progress during this period.

Β 

Source the Environment Again On the new run file system

oracle@test1 ~]$ . ./EBSapps.env run

Β  E-Business Suite Environment Information

Β  —————————————-

Β  RUN File SystemΒ Β Β Β Β Β Β Β Β Β  : /u01/oracle/PROD/fs2/EBSapps/appl

Β  PATCH File SystemΒ Β Β Β Β Β Β Β  : /u01/oracle/PROD/fs1/EBSapps/appl

Β  Non-Editioned File System : /u01/oracle/PROD/fs_ne

Β  DB Host: test1.example.comΒ  Service/SID: PROD

Β  Sourcing the RUN File System …

Β 

$ adop phase=cleanup cleanup_mode=full

These maintenance operations will have a significantly longer duration compared to a typical online patching cycle. Therefore, it is recommended to perform them only when there is no urgent requirement to initiate a new online patching cycle.

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

Β 

You Can monitor the above process through ADOPMON

[oracle@test1 PROD]$ adopmon

Running script. Press Ctrl-C to quit.

Enter the APPS password:

Validating credentials…

Printing the log statements starting from sequence #702651

TimestampΒ Β Β Β Β Β Β Β Β Β  Node nameΒ Β Β Β Β Β Β Β Β Β  Message Type Message Text

—————————————————————————————————————————

2023/07/17 17:30:38 test1Β Β Β Β Β Β Β Β Β Β Β Β Β Β  EVENTΒ Β Β Β Β Β Β  Drop covered objects, pass #11 complete, dropped: 122, errors: 0

2023/07/17 17:31:03 test1Β Β Β Β Β Β Β Β Β Β Β Β Β Β  EVENTΒ Β Β Β Β Β Β  Drop covered objects, pass #12 complete, dropped: 52, errors: 0

2023/07/17 17:31:19 test1Β Β Β Β Β Β Β Β Β Β Β Β Β Β  EVENTΒ Β Β Β Β Β Β  Drop covered objects, pass #13 complete, dropped: 15, errors: 0

2023/07/17 17:31:35 test1Β Β Β Β Β Β Β Β Β Β Β Β Β Β  EVENTΒ Β Β Β Β Β Β  Drop covered objects, pass #14 complete, dropped: 1, errors: 0

2023/07/17 17:31:47 test1Β Β Β Β Β Β Β Β Β Β Β Β Β Β  EVENTΒ Β Β Β Β Β Β  Drop covered objects, pass #15 complete, dropped: 0, errors: 0

2023/07/17 17:31:47 test1Β Β Β Β Β Β Β Β Β Β Β Β Β Β  EVENTΒ Β Β Β Β Β Β  Drop Covered Objects – alternate method

2023/07/17 17:32:10 test1Β Β Β Β Β Β Β Β Β Β Β Β Β Β  EVENTΒ Β Β Β Β Β Β  Cleanup crossedition triggers

2023/07/17 17:32:11 test1Β Β Β Β Β Β Β Β Β Β Β Β Β Β  EVENTΒ Β Β Β Β Β Β  Cleanup unused columns

2023/07/17 17:33:04Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  EVENTΒ Β Β Β Β Β Β  Drop Edition: “ORA$BASE”

2023/07/17 18:25:51Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Β Β Β Β Β EVENTΒ Β Β Β Β Β Β  Drop Edition: “V_20230716_1415”

2023/07/17 18:25:55 test1Β Β Β Β Β Β Β Β Β Β Β Β Β Β  EVENTΒ Β Β Β Β Β Β  Generating log report.

2023/07/17 18:25:55 test1Β Β Β Β Β Β Β Β Β Β Β Β Β Β  EVENTΒ Β Β Β Β Β Β  Output: /u01/oracle/PROD/fs_ne/EBSapps

Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  /log/adop/8/20230717_144033/clea

Β Β Β Β Β  Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β nup/test1/adzdshowlog.out

2023/07/17 18:25:56 test1Β Β Β Β Β Β Β Β Β Β Β Β Β Β  EVENTΒ Β Β Β Β Β Β  The cleanup phase completed successfully.

Β 

Β 

Β Step 2. Store the UTL_FILE_DIR parameter values

In Oracle EBS, the PLSQL IO files are typically stored in the /usr/tmp directory of the Database Node. This is a common practice across all EBS versions, starting from 11i to R12.2. EBS achieves this by utilizing the UTL_FILE_DIR initialization parameter. However, starting from version 18c, the UTL_FILE_DIR initialization parameter has been deprecated and is no longer supported.

To address this change in Oracle 19c, Oracle for EBS has introduced new views in the APPS schema, namely apps.v$parameter and apps.v$parameter2, which provide a supplemental parameter for UTL_FILE_DIR. In order to configure this parameter, please refer to the instructions provided in Section 3.1.1 of the document titled ‘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).”

Now, we need to execute the txkCfgUtlfileDir.pl script twice in different modes to complete this task. First, run the script in the ‘getUtlFileDir‘ mode to retrieve the directory paths previously specified in the UTL_FILE_DIR database initialization parameter and prepare them for the upgrade. Subsequently, execute the script in the ‘setUtlFileDir’ mode to store the directory paths in the new Oracle E-Business Suite tables that underlie 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, follow these steps:

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

[oracle@test1 ~]$ . ./PROD_test1.env

[oracle@test1 ~]$ echo $CONTEXT_FILE

/u01/oracle/PROD/12.1.0/appsutil/PROD_test1.xml

[oracle@test1 ~]$ echo $ORACLE_HOME

/u01/oracle/PROD/12.1.0

Β 

b) Run 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@test1 ~]$ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=/u01/oracle/PROD/12.1.0/appsutil/PROD_test1.xml -oraclehome=/u01/oracle/PROD/12.1.0 -outdir=/tmp -upgradedhome=/u01/oracle/PROD/19.0.0Β  -mode=getUtlFileDir -servicetype=onpremise

Enter the APPS Password:

Script NameΒ Β Β  : txkCfgUtlfileDir.pl

Script Version : 120.0.12020000.29

StartedΒ Β Β Β Β Β Β  : Mon Jul 17 18:47:47 PKT 2023

Log FileΒ Β Β Β Β Β  : /tmp/TXK_UTIL_DIR_Mon_Jul_17_18_47_46_2023/txkCfgUtlfileDir.log

Β 

Context file: /u01/oracle/PROD/12.1.0/appsutil/PROD_test1.xml exists.

Β 

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

Β 

Successfully generated the below file with UTL_FILE_DIR content:

/u01/oracle/PROD/12.1.0/dbs/PROD_utlfiledir.txt

Β 

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

Β 

CompletedΒ Β Β Β Β Β Β  : Mon Jul 17 18:47:48 PKT 2023

Successfully Completed the script

ERRORCODE = 0 ERRORCODE_END

Using this command, the script retrieves the directory paths stored in the UTL_FILE_DIR database initialization parameter. It then modifies these paths to prepare them for usage in Oracle Database 19c. As a result, a text file named <DB_NAME>_utlfiledir.txt is created in the <ORACLE_HOME>/dbs directory. This file contains the list of modified directory paths.

Additionally, the script saves the original values from the 11g or 12c UTL_FILE_DIR database initialization parameter, along with the corresponding 19c replacement values, in a text file located in the log directory. To review the modifications made by the script, you can compare this log file with the <DB_NAME>_utlfiledir.txt file present in the <ORACLE_HOME>/dbs directory.

Β 

c) Creating the directory paths of the directories for UTL in the end of the file created /u01/oracle/PROD/12.1.0/dbs/PROD_utlfiledir.txt

[oracle@test1 ~]$ cat /u01/oracle/PROD/12.1.0/dbs/PROD_utlfiledir.txt

/u01/oracle/PROD/temp/PROD

/u01/oracle/PROD/temp/PROD

/u01/oracle/PROD/19.0.0/appsutil/outbound/PROD_test1

/u01/oracle/PROD/temp/PROD

[oracle@test1 ~]$ mkdir -p /u01/oracle/PROD/temp/PROD

[oracle@test1 ~]$ mkdir -p /u01/oracle/PROD/temp/PROD

[oracle@test1 ~]$ mkdir -p /u01/oracle/PROD/19.0.0/appsutil/outbound/PROD_test1

[oracle@test1 ~]$ mkdir -p /u01/oracle/PROD/temp/PROD

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

[oracle@test1 ~]$ . ./PROD_test1.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@test1 ~]$ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=/u01/oracle/PROD/12.1.0/appsutil/PROD_test1.xml -oraclehome=/u01/oracle/PROD/12.1.0 -outdir=/tmp -upgradedhome=/u01/oracle/PROD/19.0.0Β  -mode=setUtlFileDir -servicetype=onpremise

Enter the APPS Password:

Script NameΒ Β Β  : txkCfgUtlfileDir.pl

Script Version : 120.0.12020000.29

StartedΒ Β Β Β Β Β Β  : Mon Jul 17 19:03:46 PKT 2023

Log FileΒ Β Β Β Β Β  : /tmp/TXK_UTIL_DIR_Mon_Jul_17_19_03_45_2023/txkCfgUtlfileDir.log

Context file: /u01/oracle/PROD/12.1.0/appsutil/PROD_test1.xml exists.

Enter the ebs_system Password:

CompletedΒ Β Β Β Β Β Β  : Mon Jul 17 19:03:52 PKT 2023

Successfully Completed the script

ERRORCODE = 0 ERRORCODE_END

Β 

Step 3. 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.

Β 

Step 4. Drop SYS.ENABLED$INDEXES

Source 12c Database environment file

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

[oracle@test1 ~]$ sqlplus / as sysdba

SQL> drop table sys.enabled$indexes;

drop table sys.enabled$indexes

Β Β Β Β Β Β Β Β Β Β Β Β Β Β  *

ERROR at line 1:

ORA-00942: table or view does not exist

Proceed Further if table doesn’t exists.

Β 

Step 5. Shut down the database listener

Source 12c Environment file

[oracle@test1 ~]$ . ./PROD_test1.env

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

[oracle@test1 ~]$ lsnrctl stop $ORACLE_SID

LSNRCTL for Linux: Version 12.1.0.2.0 – Production on 17-JUL-2023 19:09:23

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test1.example.com)(PORT=1521)))

The command was 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.

Β 

[oracle@test1 ~]$ sqlplus / as sysdba

SQL> show parameter LOCAL_LISTENER

NAMEΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Β Β Β Β  TYPE VALUE

———————————— ———– ——————————

local_listenerΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Β Β Β Β  stringΒ Β Β Β Β Β Β Β Β Β Β Β Β Β  PROD_LOCAL

SQL> alter system set local_listener=”;

System altered.

SQL> show parameter LOCAL_LISTENER

NAMEΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Β Β Β Β  TYPE VALUE

———————————— ———– —- ————————–

local_listenerΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Β Β Β Β  string

Β 

Step 6. Database Pre Upgrade Steps

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.

SQL> 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

SQL>Β  alter system set event=’10946 trace name context forever, level 8454144′ scope=spfile;

Shut down and restart the database to enable the parameters.

Β 

Step 7. Run the Pre-upgrade Tool

Connect to the 12c Database and run the command as below:

[oracle@test1 ~]$ /u01/oracle/PROD/12.1.0/jdk/bin/java -jar /u01/oracle/PROD/19.0.0/rdbms/admin/preupgrade.jar

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

PREUPGRADE SUMMARY

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

Β  /u01/oracle/PROD/12.1.0/cfgtoollogs/PROD/preupgrade/preupgrade.log

Β  /u01/oracle/PROD/12.1.0/cfgtoollogs/PROD/preupgrade/preupgrade_fixups.sql

Β  /u01/oracle/PROD/12.1.0/cfgtoollogs/PROD/preupgrade/postupgrade_fixups.sql

Execute fixup scripts as indicated below:

Before upgrade:

Log into the database and execute the preupgrade fixups

@/u01/oracle/PROD/12.1.0/cfgtoollogs/PROD/preupgrade/preupgrade_fixups.sql

After the upgrade:

Log into the database and execute the postupgrade fixups

@/u01/oracle/PROD/12.1.0/cfgtoollogs/PROD/preupgrade/postupgrade_fixups.sql

Β 

As per the recommendation above by the Pre Upgrade tool we will execute preupgrade_fixups.sql

SQL> alter system set processes=300 scope=spfile;

SQL>set head off

SQL>zet lines 200 pages 200

SQL>set echo off

SQL>set feedback off;

SQL>spool hidden_parameter.sql

SQL>SELECT ‘alter system reset ‘||'”‘||name||'”‘||’ scope =spfile;’

FROM SYS.V$PARAMETER

WHERE name LIKE ‘_%’ ESCAPE ”;

SQL>spool off

SQL>@hidden_parameter.sql

Β 

SQL> @/u01/oracle/PROD/12.1.0/cfgtoollogs/PROD/preupgrade/preupgrade_fixups.sql

Executing Oracle PRE-Upgrade Fixup Script

Auto-Generated by:Β Β Β Β Β Β  Oracle Preupgrade Script

Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Β Β Β Version: 19.0.0.0.0 Build: 13

Generated on:Β Β Β Β Β Β Β Β Β Β Β  2023-07-17 21:56:05

For Source Database:Β Β Β Β  PROD

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. parameter_min_valΒ Β Β Β Β Β Β Β  NOΒ Β Β Β Β Β Β Β Β  Manual fixup recommended.
  2. parameter_obsoleteΒ Β Β Β Β Β Β  NOΒ Β Β Β Β Β Β Β Β  Manual fixup recommended.
  3. invalid_objects_existΒ Β Β Β  NOΒ Β Β Β Β Β Β Β Β  Manual fixup recommended.
  4. amd_existsΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β  NOΒ Β Β Β Β Β Β Β Β  Manual fixup recommended.
  5. duplic_sys_system_objsΒ Β Β  NOΒ Β Β Β Β Β Β Β Β  Manual fixup recommended.
  6. exclusive_mode_authΒ Β Β Β Β Β  NOΒ Β Β Β Β Β Β Β Β  Manual fixup recommended.
  7. case_insensitive_authΒ Β Β Β  NOΒ Β Β Β Β Β Β Β Β  Manual fixup recommended.
  8. mv_refreshΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β  NOΒ Β Β Β Β Β Β Β Β  Manual fixup recommended.
  9. hidden_paramsΒ Β Β Β Β Β Β Β Β Β Β Β  NOΒ Β Β Β Β Β Β Β Β  Informational only.

Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Further action is optional.

  1. underscore_eventsΒ Β Β Β Β Β Β Β  NOΒ Β Β Β Β Β Β Β Β  Informational only.

Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Further action is optional.

  1. dictionary_statsΒ Β Β Β Β Β Β Β Β  YESΒ Β Β Β Β Β Β Β  None.
  2. trgowner_no_admndbtrgΒ Β Β Β  YESΒ Β Β Β Β Β Β Β  None.
  3. component_infoΒ Β Β Β Β Β Β Β Β Β Β  NOΒ Β Β Β Β Β Β Β Β  Informational only.

Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Further action is optional.

  1. parameter_deprecatedΒ Β Β Β Β  NOΒ Β Β Β Β Β Β Β Β  Informational only.

Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Further action is optional.

  1. rman_recovery_versionΒ Β Β Β  NOΒ Β Β Β Β Β Β Β Β  Informational only.

Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Further action is optional.

  1. invalid_ora_obj_infoΒ Β Β Β Β  NOΒ Β Β Β Β Β Β Β Β  Informational only.

Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Further action is optional.

  1. invalid_app_obj_infoΒ Β Β Β Β  NOΒ Β Β Β Β Β Β Β Β  Informational only.

Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Further action is optional.

The fixup scripts have been run and resolved what they can. However,

there are still issues originally identified by the preupgrade that

have not been remedied and are still present in the database.

Depending on the severity of the specific issue, and the nature of

the issue itself, that could mean that your database is not ready

for upgrade.Β  To resolve the outstanding issues, start by reviewing

the preupgrade_fixups.sql and searching it for the name of

the failed CHECK NAME or Preupgrade Action Number listed above.

There you will find the original corresponding diagnostic message

from the preupgrade which explains in more detail what still needs

to be done.

Β 

PL/SQL procedure successfully completed.

Β 

Β 


Β 

Section 8 – Upgrade the database instance

Step 1. Running Database Upgrade using DBUAΒ 

Invoke DBUA using the following command. The keep events parameter allows events in the pre-upgraded 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 the below command

Source 19c Environment file

[oracle@test1 ~]$ . ./19c.env

[oracle@test1 ~]$ $ORACLE_HOME/bin/dbua -keepEvents

  1. Select “PROD”
  2. Enter User SYS and Password
  3. Click Next
  1. Wait for Performing Pre-Upgrade Checks
  1. Click Next
  1. Click Yes
  1. Select the following as shown in the Picture
  2. Click Next
  1. Select “I have my own Backup and restore strategy”
  2. Click Next
  1. Click Next
  1. Deselect the following in the Picture
  2. Click Next
  1. Click Finish
  1. Database Upgrade Started
  1. Click Close

The 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

Step 2. Run the Post Upgrade Script generated during the Pre-Upgrade Steps

Source 19c Environment

[oracle@test1 ~]$ . ./19c.env

[oracle@test1 ~]$ export ORACLE_SID=PROD

SQL> @/u01/oracle/PROD/12.1.0/cfgtoollogs/PROD/preupgrade/postupgrade_fixups.sql

Β 

Step 3. Post-Upgrade Tasks

Source 19c Environment

[oracle@test1 ~]$ . ./19c.env

[oracle@test1 ~]$ export ORACLE_SID=PROD

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> shu immediate;

Database closed.

DatabasΒ edismounted.

ORACLE instance shut down.

SQL> startup

ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance

ORACLE instance started.

Total System Global Area 4294963248 bytes

Fixed SizeΒ Β Β Β Β Β Β  Β Β Β  8933424 bytes

Variable SizeΒ Β Β Β Β Β Β Β Β Β  2583691264 bytes

Database BuffersΒ  1677721600 bytes

Redo BuffersΒ Β Β Β Β Β Β Β Β Β Β  Β Β  24616960 bytes

Database mounted.

Database opened.

SQL> show parameter compatible

NAMEΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Β Β Β Β  TYPEΒ Β  VALUE

———————————— ———– ——————————

compatibleΒ Β Β Β Β Β Β Β Β Β Β Β Β  Β Β Β Β  string 19.0.0

noncdb_compatibleΒ Β Β Β Β Β  Β Β Β Β  booleanΒ Β Β Β Β  FALSE

Β 

Step 4. Run DataPatch

Source 19c Environment

[oracle@test1 ~]$ . ./19c.env

[oracle@test1 ~]$ export ORACLE_SID=PROD

[oracle@test1 OPatch]$ $ORACLE_HOME/OPatch/datapatch

Β 

Step 5. Connect to sysdba and run below

Source 19c Environment

[oracle@test1 ~]$ . ./19c.env

[oracle@test1 ~]$ export ORACLE_SID=PROD

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

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

Β 

Step 6. Run ADgrants

Source 19c Environment

[oracle@test1 ~]$ . ./19c.env

[oracle@test1 ~]$ export ORACLE_SID=PROD

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

[oracle@test1 ~]$ cp /u01/oracle/PROD/fs1/EBSapps/appl/admin/adgrants.sql /u01/oracle/PROD/19.0.0/appsutil

SQL> @/u01/oracle/PROD/19.0.0/appsutil/adgrants.sql apps

Β 

Step 7. Grant create procedure privilege on CTXSYS

Source 19c Environment

[oracle@test1 ~]$ . ./19c.env

[oracle@test1 ~]$ export ORACLE_SID=PROD

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:

[oracle@test1 admin]$ cp $AD_TOP/patch/115/sql/adctxprv.sql /u01/oracle/PROD/19.0.0/

$ sqlplus apps/<apps password> @adctxprv.sql <SYSTEM password> CTXSYS

[oracle@test1 ~]$ cd /u01/oracle/PROD/19.0.0/

[oracle@test1 19.0.0]$ sqlplus apps/apps @adctxprv.sql oracle CTXSYS

SQL*Plus: Release 19.0.0.0.0 – Production on Tue Jul 18 01:16:40 2023

Version 19.19.0.0.0

Copyright (c) 1982, 2022, Oracle.Β  All rights reserved.

Last Successful login time: Mon Jul 17 2023 19:03:52 +05:00

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

Version 19.19.0.0.0

Commit complete.

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

Version 19.19.0.0.0

Β 

Step 8. Compile invalid objects

Source 19c Environment

[oracle@test1 ~]$ . ./19c.env

[oracle@test1 ~]$ export ORACLE_SID=PROD

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

Run the following Query to check the INVALID Objects

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

Β 

Step 9. Grant datastore access

Source 19c Environment

[oracle@test1 ~]$ . ./19c.env

[oracle@test1 ~]$ export ORACLE_SID=PROD

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

[oracle@test1 ~]$ sqlplus “/ as sysdba”

SQL> grant text datastore access to public;

Grant succeeded.

Β 

Step 10. Gather statistics for the SYS schema

Source 19c Environment

[oracle@test1 ~]$ . ./19c.env

[oracle@test1 ~]$ export ORACLE_SID=PROD

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:

[oracle@test1 19.0.0]$ Β cp /u01/oracle/PROD/fs1/EBSapps/appl/admin/adstats.sql /u01/oracle/PROD/19.0.0/

[oracle@test1 ~]$ sqlplus / as sysdba

SQL> alter system enable restricted session;

System altered.

SQL> @adstats.sql

Connected.

————————————————–

— adstats.sql started at 2023-07-18 11:48:37 —

Checking for the DB version and collecting statistics …

PL/SQL procedure successfully completed.

————————————————

— adstats.sql ended at 2023-07-18 11:55:38 —

Commit complete.

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

Version 19.19.0.0.0

[oracle@test1 19.0.0]$ sqlplus / as sysdba

SQL> alter system disable restricted session;

System altered.

SQL> exit

Β 

Step 11. Convert Database to Multitenant Architecture or PDB

Source 19c Environment

[oracle@test1 ~]$ . ./19c.env

[oracle@test1 ~]$ export ORACLE_SID=PROD

  • In this subsection, there are two databases that are associated with the 19c Oracle home, the CDB and the non-CDB database. Moreover, the non-CDB database will be migrated tothe 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>.

Β 

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@test1 ~]$ Β cd $ORACLE_HOME/appsutil[oracle@test1 appsutil]$ . ./txkSetCfgCDB.env dboraclehome=/u01/oracle/PROD/19.0.0Β Oracle Home being passed: /u01/oracle/PROD/19.0.0

oracle@test1 appsutil]$ export ORACLE_SID=PROD

oracle@test1 appsutil]$ cd $ORACLE_HOME/appsutil/bin

oracle@test1 bin]$ perl txkOnPremPrePDBCreationTasks.pl -dboraclehome=/u01/oracle/PROD/19.0.0 -outdir=/u01/oracle/PROD/19.0.0/appsutil/log -appsuser=apps -dbsid=PROD

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Β Β Β Β Β Β Β Β Β  *

*Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  *

****************************************************************************************

Exiting from the script.

Ended: Tue Jul 18 12:01:42 PKT 2023

Β 

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

  • $ 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@test1 bin]$ cd /u01/oracle/PROD/12.1.0/dbs

[oracle@test1 dbs]$ cp PROD_initparam.sql PROD_datatop.txt /u01/oracle/PROD/19.0.0/dbs/

[oracle@test1 dbs]$ cd $ORACLE_HOME/appsutil

[oracle@test1 appsutil]$ . ./txkSetCfgCDB.env dboraclehome=$ORACLE_HOME

Oracle Home being passed: /u01/oracle/PROD/19.0.0

[oracle@test1 appsutil]$ export ORACLE_SID=prodcdb

[oracle@test1 appsutil]$ sqlplus “/ as sysdba”

SQL*Plus: Release 19.0.0.0.0 – Production on Tue Jul 18 12:07:23 2023

Version 19.19.0.0.0

Copyright (c) 1982, 2022, 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/PROD_initparam.sql

SQL> alter system set LOCAL_LISTENER=”test1.example.com: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 4294963736 bytes

Fixed SizeΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Β Β Β  9171480 bytes

Variable SizeΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β  2583691264 bytes

Database BuffersΒ Β Β Β Β Β Β Β Β  1677721600 bytes

Redo BuffersΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Β Β  24379392 bytes

Database mounted.

Database opened.

SQL> select name,open_mode from v$database;

NAMEΒ  Β  OPEN_MODE

——— ——————–

PRODCDBΒ Β  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@test1 appsutil]$ cd $ORACLE_HOME/appsutil

[oracle@test1 appsutil]$ . ./txkSetCfgCDB.env dboraclehome=$ORACLE_HOME

Oracle Home being passed: /u01/oracle/PROD/19.0.0

[oracle@test1 appsutil]$ export ORACLE_SID=prodcdb

[oracle@test1 appsutil]$ cd $ORACLE_HOME/appsutil/bin

[oracle@test1 bin]$ perl txkChkPDBCompatability.pl -dboraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log -cdbsid=prodcdb -pdbsid=PROD -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.

Review all warnings and resolve all errors. Re-run the script to verify all errors have been resolved. 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@test1 bin]$ cd $ORACLE_HOME/appsutil

[oracle@test1 appsutil]$ . ./txkSetCfgCDB.env dboraclehome=$ORACLE_HOME

Oracle Home being passed: /u01/oracle/PROD/19.0.0

[oracle@test1 appsutil]$ cd $ORACLE_HOME/appsutil/bin

[oracle@test1 bin]$ perl txkCreatePDB.pl -dboraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log -cdbsid=prodcdb -pdbsid=PROD -dbuniquename=prodcdb -servicetype=onpremise

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

Inside promptDataTopDir()…

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

Number of DATA_TOPs: 1

DATA_TOP_1

===========

Enter the non-CDB data top [/u01/oracle/PROD/data]:

Enter the corresponding PDB data top [/u01/oracle/PROD/data]:

The PDB datafile location can be the same as the source datafile location.

Β 

e) Run the post-PDB script

Source 19c Environment

[oracle@test1 ~]$ . ./19c.env

[oracle@test1 ~]$ export ORACLE_SID=PROD

change CDB system password

[oracle@test1 ~]$ sqlplus / as sysdba

SQL> alter user system identified by oracle#123;

User altered.

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@test1 bin]$ cd $ORACLE_HOME/appsutil

[oracle@test1 appsutil]$ . ./txkSetCfgCDB.env dboraclehome=$ORACLE_HOME

Oracle Home being passed: /u01/oracle/PROD/19.0.0

[oracle@test1 appsutil]$ cd $ORACLE_HOME/appsutil/bin

[oracle@test1 appsutil perl $ORACLE_HOME/appsutil/bin/txkPostPDBCreationTasks.pl -dboraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log -cdbsid=prodcdb -pdbsid=PROD -appsuser=apps -dbport=1522 -servicetype=onpremise

Enter the APPS Password:

Enter the CDB SYSTEM Password:

#####################################################################

#Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  I M P O R T A N TΒ Β Β  N O T EΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  #

#Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  #

#Β Β  EBS_SYSTEM credentials are set to same value as that of SYSTEMΒ  #

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 PROD Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Β Β READ WRITE NO

Β 

f) Change Initialization Parameters

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

Β Β Β Β Β Β Β Β Β Β Β 

[oracle@test1 appsutil]$ export ORACLE_SID=prodcdb

[oracle@test1 appsutil]$ sqlplus / as sysdba

SQL> alter system set event=’10946 trace name context forever, level 8454144′ scope=spfile;

System altered.

SQL> alter system set sec_case_sensitive_logon=FALSE scope=spfile;

System altered.

Β 

Step 12. 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.

[oracle@test1 ~]$ . ./EBSapps.env run

Β E-Business Suite Environment Information

Β  —————————————-

Β  RUN File SystemΒ Β Β Β Β Β Β Β Β Β  : /u01/oracle/PROD/fs1/EBSapps/appl

Β  PATCH File SystemΒ Β Β Β Β Β Β Β  : /u01/oracle/PROD/fs2/EBSapps/appl

Β  Non-Editioned File System : /u01/oracle/PROD/fs_ne

Β  DB Host: test1.example.comΒ  Service/SID: PROD

Β  Sourcing the RUN File System …

[oracle@test1 ~]$ cd $TNS_ADMIN

[oracle@test1 admin]$ pwd

/u01/oracle/PROD/fs1/inst/apps/PROD_test1/ora/10.1.2/network/admin

[oracle@test1 admin]$ vi tnsnames.ora

prodcdb =

Β (DESCRIPTION =

Β  (ADDRESS = (PROTOCOL=tcp)(HOST= test1.example.com)(PORT=1522))

Β  (CONNECT_DATA = (SERVICE_NAME=ebs_PROD)(INSTANCE_NAME=prodcdb))

Β )

Β 

  • Edit the same in Patch File System

[oracle@test1 ~]$ . ./EBSapps.env patch

Β E-Business Suite Environment Information

Β  —————————————-

Β  RUN File SystemΒ Β Β Β Β Β Β Β Β Β  : /u01/oracle/PROD/fs1/EBSapps/appl

Β  PATCH File SystemΒ Β Β Β Β Β Β Β  : /u01/oracle/PROD/fs2/EBSapps/appl

Β  Non-Editioned File System : /u01/oracle/PROD/fs_ne

Β  DB Host: test1.example.comΒ  Service/SID: PROD

Β  Sourcing the PATCH File System …

[oracle@test1 ~]$ cd $TNS_ADMIN

[oracle@test1 admin]$ vi tnsnames.ora

Β 

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

[oracle@test1 admin]$ grep s_dbport $CONTEXT_FILE

Β Β Β Β Β  <dbport oa_var=”s_dbport” oa_type=”EXT_PORT” base=”1521″ step=”1″ range=”-1″ label=”Database Port”>1521</dbport>

[oracle@test1 admin]$ grep s_apps_jdbc_connect_descriptor $CONTEXT_FILE

Β Β Β Β Β Β Β Β  <jdbc_url oa_var=”s_apps_jdbc_connect_descriptor”>jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS=(PROTOCOL=tcp)(HOST=test1.example.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=PROD)))</jdbc_url>

[oracle@test1 admin]$ grep s_applptmp $CONTEXT_FILE

Β Β Β Β Β Β Β Β  <APPLPTMP oa_var=”s_applptmp” osd=”UNIX”>/usr/tmp</APPLPTMP>

To identify the allowable directories for s_applptmp use, connect to the Oracle E-Business Suite database instance as the app’s user (on PDB)and run the following query:

[oracle@test1 appsutil]$ sqlplus apps/apps@PROD

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

VALUE

——————————————————————————–

/u01/oracle/PROD/temp/PROD,/u01/oracle/PROD/temp/PROD,/u01/oracle/PROD/19.0.0/ap

psutil/outbound/PROD_test1,/u01/oracle/PROD/temp/PROD

/u01/oracle/PROD/temp/PROD

/u01/oracle/PROD/temp/PROD

/u01/oracle/PROD/19.0.0/appsutil/outbound/PROD_test1

[oracle@test1 admin]$ vi $CONTEXT_FILE

Enter the values of s_applptmp and save

[oracle@test1 admin]$ grep s_applptmp $CONTEXT_FILE

Β Β Β Β Β Β Β Β  <APPLPTMP oa_var=”s_applptmp” osd=”UNIX”>/u01/oracle/PROD/19.0.0/appsutil/outbound/PROD_test1</APPLPTMP>

Edit the same in Patch file System

[oracle@test1 admin]$ vi $CONTEXT_FILE

Enter the values of s_applptmp and save

[oracle@test1 admin]$ grep s_applptmp $CONTEXT_FILE

Β Β Β Β Β Β Β Β  <APPLPTMP oa_var=”s_applptmp” osd=”UNIX”>/u01/oracle/PROD/19.0.0/appsutil/outbound/PROD_test1</APPLPTMP>

Β 

Now, Run AutoConfig on both ‘PATCH’ and ‘RUN’ APPL_TOPs using the following command.

  • Running On Run File System

[oracle@test1 admin]$ $INST_TOP/admin/scripts/adautocfg.sh

  • Running On Patch File System

[oracle@test1 admin]$ $INST_TOP/admin/scripts/adautocfg.sh

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

Β 

Step 13. Start Application Services and Validate the Database Version

[oracle@test1 ~]$. ./EBSapps.env run

Β E-Business Suite Environment Information

Β  —————————————-

Β  RUN File SystemΒ Β Β Β Β Β Β Β Β Β  : /u01/oracle/PROD/fs1/EBSapps/appl

Β  PATCH File SystemΒ Β Β Β Β Β Β Β  : /u01/oracle/PROD/fs2/EBSapps/appl

Β  Non-Editioned File System : /u01/oracle/PROD/fs_ne

Β  DB Host: test1.example.comΒ  Service/SID: PROD

Β  Sourcing the RUN File System …

[oracle@test1 ~]$ cd $ADMIN_SCRIPTS_HOME

[oracle@test1 scripts]$ ./adstrtal.sh apps/apps

Β 

Thank you all for accompanying us on this journey of upgrading the EBS Apps Database from version12.1.0.2 to 19.19. I sincerely appreciate your time and interest. Please stay tuned for more informative content and updates. We look forward to welcoming you back soon.Β 

If you have not yet explored the blog on Oracle Apps R12.2.12 Installation Steps, we kindly encourage you to follow the provided link.

Oracle Apps R12.2.12 on Oracle Linux OEL 7.9 using Oracle VirtualBox

Β 

Β 

    About Syed Saad

    With 13 years of experience as a certified and skilled Oracle Database Administrator, I possess the expertise to handle various levels of database maintenance tasks and proficiently perform Oracle updates. Throughout my career, I have honed my analytical abilities, enabling me to swiftly diagnose and resolve issues as they arise. I excel in planning and executing special projects within time-sensitive environments, showcasing exceptional organizational and time management skills. My extensive knowledge encompasses directing, coordinating, and exercising authoritative control over all aspects of planning, organization, and successful project completions. Additionally, I have a strong aptitude for resolving customer relations matters by prioritizing understanding and effective communication. I am adept at interacting with customers, vendors, and management, ensuring seamless communication and fostering positive relationships.

    Check Also

    EBS_Latest_Configurations

    Apply EBS AD-TXK Release 16 Update

    Step By Step Guide to Apply Oracle E-Business Suite R12.2 ADTXK Update 16 Oracle Applications …