0% found this document useful (0 votes)
220 views118 pages

3.1 Upgrading Oracle EBS Database to 19c_7

Uploaded by

Pavan Raghu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
220 views118 pages

3.1 Upgrading Oracle EBS Database to 19c_7

Uploaded by

Pavan Raghu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 118

Author – A.

Kishore
http://www.appsdba.info

Contents
Upgrading Oracle EBS Database to 19c ........................................................................................................ 3
About the Upgrade ................................................................................................................................... 3
Environment: ............................................................................................................................................ 3
Here are support notes that we are going to follow ................................................................................ 5
Let’s download 19.3 from below links ...................................................................................................... 5
Highlevel Steps .......................................................................................................................................... 6
Before the Database Installation .......................................................................................................... 6
After the Database Upgrade ................................................................................................................. 6
Convert Database to Multitenant Architecture .................................................................................... 6
Before the Database Installation .............................................................................................................. 7
Run hcheck.sql .......................................................................................................................................... 7
Apply required patches on R12.2.x ....................................................................................................... 8
Migrate Autoconfig to DB Tier: ........................................................................................................... 10
Create the initialization parameter setup files: ...................................................................................... 11
Install Oracle Database 19c................................................................................................................. 12
Install vncserver .................................................................................................................................. 12
Disable firewall in Linux 7 ................................................................................................................... 12
Upgrade Oracle Home from 19.3 to 19.12 ......................................................................................... 24
Apply the latest 19c Database Patches: .............................................................................................. 27
Create the nls/data/9idata directory .................................................................................................. 28
Create appsutil.zip and copy it to the database tier ........................................................................... 28
Install JRE 8 ....................................................................................................................................... 29
Create the container database - DEVCDB ........................................................................................... 29
Create the CDB MGDSYS schema........................................................................................................ 53
Create the CDB TNS Files: ................................................................................................................... 53
Shutdown the CDB now............................................................................................................. 54
Author – A.Kishore
http://www.appsdba.info

Database upgrade ................................................................................................................................... 55


Store the UTL_FILE_DIR parameter values ......................................................................................... 55
Drop SYS.ENABLED$INDEXES ........................................................................................................ 57
Remove the MGDSYS schema (not applicable for our version) .......................................................... 57
Shut down the database listener ........................................................................................................ 58
Database Pre-Upgrade Steps: ............................................................................................................. 58
Run the Pre-upgrade Tool: .................................................................................................................. 59
Make changes to initDEV.ora file as follows ....................................................................................... 71
Upgrade the database instance .......................................................................................................... 73
Issues and Solutions ............................................................................................................................ 83
Perform patch post-install instructions .............................................................................................. 86
After the Database Upgrade .............................................................. Error! Bookmark not defined.
Run adgrants.sql ................................................................................................................................. 86
Grant create procedure privilege on CTXSYS ...................................................................................... 88
Compile invalid objects ....................................................................................................................... 88
Grant datastore access ....................................................................................................................... 88
Convert Database to Multitenant Architecture: ................................................................................. 90
Run the post PDB script ................................................................................................................. 100
Modify initialization parameters:...................................................................................................... 105
How to Connect as SYSDBA without password into a PDB directly .................................................. 114
Verify ETCC patches are applied ....................................................................................................... 116
References: ........................................................................................................................................... 117
Author – A.Kishore
http://www.appsdba.info

Upgrading Oracle EBS Database to 19c

About the Upgrade

• In this article, we are going to see how to upgrade Oracle EBS Suite R12.2.10 with
Oracle Database 12c database to Oracle Database 19c (19.12). When upgrading your
Oracle E-Business Suite to Oracle Database 19c, your database will be converted to the
multitenant architecture, with a Container Database (CDB) and a single Pluggable
Database. Only multitenant architecture databases are certified 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.

Environment:

I used an Oracle EBS 12.2.10 Instance with database 12.1.0.2 as an example

Environment Details

Current Database 12.1.0.2

Target Database 19.12

Database size 100 GB

EBS application version R12.2.10

Operating System Oracle Linux 7.6

Source ORACLE_HOME /d02/oracle/DEV/12.1.0


Author – A.Kishore
http://www.appsdba.info

Target ORACLE_HOME /d02/oracle/DEV/19.0.0

Instance Name DEV

Source Instance Details


Author – A.Kishore
http://www.appsdba.info

Here are support notes that we are going to follow

• Interoperability Notes: Oracle E-Business Suite Release 12.2 with


Oracle Database 19c (Doc ID 2552181.1)
• 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)
• Oracle E-Business Suite Release 12.2: Consolidated List of Patches and
Technology Bug Fixes (Doc ID 1594274.1

Let’s download 19.3 from below links


• Firstly, I downloaded the Oracle Database 19.3 DB Software i.e.
V982063-01.zip from edelivery.oracle.com. Then all the patches that are
needed as per the above mentioned MOS Documents.
Or

https://www.oracle.com/database/technologies/oracle19c-linux-downloads.html

LINUX.X64_193000_db_home.zip
Author – A.Kishore
http://www.appsdba.info

Highlevel Steps

Upgrading an Oracle E-Business Suite Release 12 Database to Oracle Database 19c

Before the Database Installation


➢ Apply required patches on R12.2.x
➢ Create the initialization parameter setup files
➢ Prepare to create the 19c Oracle home
➢ Install Oracle Database 19c
➢ Apply additional 19c RDBMS patches
➢ Create the nls/data/9idata directory
➢ Create appsutil.zip and copy it to the database tier
➢ Install JRE 8
➢ Create the CDB
➢ Run datapatch on the CDB
➢ Create the CDB MGDSYS schema
➢ Create the CDB TNS files
Database Upgrade
➢ Store the UTL_FILE_DIR parameter values
➢ Shut down the application tier server processes
➢ Drop SYS.ENABLED$INDEXES
➢ Remove the MGDSYS schema
➢ Shut down the database listener
➢ Prepare to upgrade
➢ Upgrade the database instance
➢ Perform patch post-install instructions
After the Database Upgrade
➢ Run adgrants.sql
➢ Grant create procedure privilege on CTXSYS
➢ Compile invalid objects
➢ Grant datastore access
➢ Gather statistics for the SYS schema
➢ Create the new MGDSYS schema
Convert Database to Multitenant Architecture
➢ Create the PDB descriptor
➢ Update the CDB initialization parameters
➢ Check for PDB violations
Author – A.Kishore
http://www.appsdba.info

➢ Create the PDB


➢ Run the post PDB script
➢ Modify initialization parameters
➢ Run AutoConfig on applications tier
➢ Restart application tier server processes

Before the Database Installation

Run hcheck.sql

hcheck.sql - Script to Check for Known Problems in Oracle8i, Oracle9i, Oracle10g, Oracle 11g and Oracle
12c and Above (Doc ID 136697.1)

[oradev@erpr12 ~]$ . ./DEV_erpr12.env

[oradev@erpr12 ~]$ sqlplus "/as sysdba"

spool hcheck.lst

@hcheck.sql

spool off
Author – A.Kishore
http://www.appsdba.info

Apply required patches on R12.2.x

Based on Interoperability, I need to apply below Patches

• Patch 26521736 - 19c interoperability patch for Release 12.2 - Pending


• Patch 31088182 - pending
• Patch 31349591 - pending
• Patch 31800803 - pending
• Patch 33346385 - pending
• Patch 28732161 - Apply on Release 12.2.6 or later versions. - Pending

and

AutoConfig - R12.TXK.C.delta.11 – Already applied

select patch_level from apps.fnd_product_installations where patch_level like '%AD%';

We are in AD delta 12, Autoconfig patch are already apply

select release_name from apps.fnd_product_groups;


Author – A.Kishore
http://www.appsdba.info

adop phase=fs_clone
adop phase=prepare
adop phase=apply patches=26521736 patchtop=/home/oradev/patches workers=8
adop phase=apply patches=31349591 patchtop=/home/oradev/patches workers=8
adop phase=apply patches=28732161 patchtop=/home/oradev/patches workers=8
adop phase=apply patches=31800803 patchtop=/home/oradev/patches workers=8
adop phase=apply patches=31088182 patchtop=/home/oradev/patches workers=8
adop phase=apply patches=33346385 patchtop=/home/oradev/patches workers=8
adop phase=finalize
adop phase=cutover
adop phase=cleanup
Author – A.Kishore
http://www.appsdba.info

Migrate Autoconfig to DB Tier:

On application Tier

perl $AD_TOP/bin/admkappsutil.pl

Now copy the appsutil.zip to the DB Home, extract appsutil.zip and run Autoconfig on DB Tier

cd $ORACLE_HOME

unzip -o appsutil.zip

cd $ORACLE_HOME/appsutil/scripts/DEV_erpr12

sh adautocfg.sh

Run autoconfig on Application tier

cd $ADMIN_SCRIPTS_HOME
adautocfg.sh
Author – A.Kishore
http://www.appsdba.info

Create the initialization parameter setup files:


Run the following commands to create the
$ORACLE_HOME/dbs/[ORACLE_SID]_initparam.sql and
$ORACLE_HOME/dbs/[ORACLE_SID]_datatop.txt files.

Safeguard these files, they will be used after 19c upgrade

On DB Tier (12c Home)

. ./DEV_erpr12.env

cd $ORACLE_HOME/appsutil

. ./txkSetCfgCDB.env dboraclehome=/d02/oracle/DEV/12.1.0

export ORACLE_SID=DEV

cd $ORACLE_HOME/appsutil/bin

perl txkOnPremPrePDBCreationTasks.pl -dboraclehome=/d02/oracle/DEV/12.1.0 -


outdir=/d02/oracle/DEV/12.1.0/appsutil/log -appsuser=apps -dbsid=DEV -skipdbshutdown=yes
Author – A.Kishore
http://www.appsdba.info

The above script will create below new files in below location

cd $ORACLE_HOME/dbs
DEV_initparam.sql
DEV_datatop.txt
DEV_PDBDesc.xml

Install Oracle Database 19c

Install vncserver

yum install tigervnc-server - Install vncserver

Disable firewall in Linux 7


https://linuxconfig.org/how-to-stop-start-and-disable-enable-firewall-on-redhat-7-linux-system

service firewalld stop

systemctl status firewalld

systemctl disable firewalld


Author – A.Kishore
http://www.appsdba.info

Let’s install Oracle 19c database home alone, there is change how you install 19c as compared to earlier
versions, here we copy the database zip file (eg LINUX.X64_193000_db_home.zip) to ORACLE_HOME
and extract and then run runInstaller.

As root

xhost +

As Oracle user

export DISPLAY=:1

mkdir -p /d02/oracle/DEV/19.0.0

cd /d01/oracle/software/19c/1912

cp LINUX.X64_193000_db_home.zip /d02/oracle/DEV/19.0.0/

cd /d02/oracle/DEV/19.0.0/

unzip LINUX.X64_193000_db_home.zip

Run runInstaller
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info

Click ok
Author – A.Kishore
http://www.appsdba.info

Here are the steps to create 19c environment file

19c environment file

cp DEV_erpr12.env DEV_erpr12_19c.env

vi DEV_erpr12_19c.env

%s,12.1.0,19.0.0
Author – A.Kishore
http://www.appsdba.info

Upgrade Oracle Home from 19.3 to 19.12

Download patch - Database Release Update 19.12.0.0.210720 Patch 32904851

OPatch version - 12.2.0.1.25 or later to apply this patch

Verify the opatch version

. ./DEV_erpr12_19c.env

$ORACLE_HOME/OPatch/opatch version

OPatch Version: 12.2.0.1.17

OPatch succeeded.

How To Download And Install The Latest OPatch(6880880) Version (Doc ID 274526.1

Let’s download 12.2.0.1.25 opatch

p6880880_210000_Linux-x86-64

cd $ORACLE_HOME/

mv OPatch OPatch_old

cp p6880880_210000_Linux-x86-64 cd $ORACLE_HOME/

unzip p6880880_210000_Linux-x86-64

$ORACLE_HOME/OPatch/opatch version

OPatch Version: 12.2.0.1.28


Author – A.Kishore
http://www.appsdba.info

OPatch succeeded.

Download 19.12 patch - p32904851_190000_Linux-x86-64.zip

cd /d01/oracle/software/19c/1912

unzip p32904851_190000_Linux-x86-64.zip

Check the Database release update

$ORACLE_HOME/OPatch/opatch lspatches

Apply the patch 32904851

$ORACLE_HOME/OPatch/opatch apply
Author – A.Kishore
http://www.appsdba.info

$ORACLE_HOME/OPatch/opatch lspatches

32904851;Database Release Update : 19.12.0.0.210720 (32904851)

29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)

OPatch succeeded.
Author – A.Kishore
http://www.appsdba.info

Apply the latest 19c Database Patches:


We need to apply latest 19c Database patches, please follow below note to get
the latest patches.

Oracle E-Business Suite Release 12.2: Consolidated List of Patches and Technology Bug Fixes (Doc
ID 1594274.1)

32904851 – already applied


32876380
31424070

Apply patches 32876380 and 31424070

cd 32876380
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
$ORACLE_HOME/OPatch/opatch apply

cd 31424070/
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
$ORACLE_HOME/OPatch/opatch apply
Author – A.Kishore
http://www.appsdba.info

Verify the database version

Create the nls/data/9idata directory

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

Create appsutil.zip and copy it to the database tier

See the "Copy AutoConfig to the RDBMS ORACLE_HOME" step of the Patching AutoConfig subsection of
the Technical Configuration section of the Oracle E-Business Suite Setup Guide Release 12.2, for
instructions on how to create appsutil.zip and copy it to the database tier.

On application tier

[oracle@erpr12 bin]$ cd $AD_TOP/bin

[oracle@erpr12 bin]$ perl admkappsutil.pl

Starting the generation of appsutil.zip

Copy the appsutil.zip to DB ORACLE_HOME. Don’t run Autoconfig now.

cd $ORACLE_HOME

unzip -o appsutil.zip
Author – A.Kishore
http://www.appsdba.info

Install JRE 8

$ cd $ORACLE_HOME/appsutil

$ cp -r $ORACLE_HOME/jdk/jre .

$ cp $ORACLE_HOME/jlib/orai18n.jar $ORACLE_HOME/appsutil/jre/lib/ext

Create the container database - DEVCDB

On the database server node, 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, 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 size 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.

[oradev@erpr12 ~]$ . ./DEV_erpr12_19c.env

[oradev@erpr12 ~]$ dbca &


Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info

DEVCDB

The CDB SID has to be different from the current ORACLE_SID which will be the PDB
SID
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info

Find the database character set from 12c database

select * from NLS_DATABASE_PARAMETERS;

NLS_NCHAR_CHARACTERSET

AL16UTF16

SQL> select * from nls_database_parameters where parameter='NLS_CHARACTERSET';

PARAMETER
--------------------------------------------------------------------------------
VALUE
----------------------------------------------------------------
NLS_CHARACTERSET
US7ASCII

SQL> SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET' ;

VALUE$
--------------------------------------------------------------------------------
US7ASCII
Author – A.Kishore
http://www.appsdba.info

Update the character set according to 12c database


Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info

oracle_4U
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info

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.

Verify the size of existing redo logs

select BYTES,MEMBERS from v$log;

select 1048576000/1024/1024 from dual;

Change all the Redo log Groups and apply the changes
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info

[oracle@erpr12 ~]$ ps -ef |grep smon


oradev 18567 1 0 22:28 ? 00:00:00 ora_smon_DEVCDB
oradev 19148 7590 0 22:30 pts/0 00:00:00 grep --color=auto smon
oradev 20379 1 0 Dec20 ? 00:00:05 ora_smon_DEV
[oracle@erpr12 ~]$ export ORACLE_SID=DEVCDB
[oracle@erpr12 ~]$ sqlplus "/as sysdba"
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info

Run datapatch on the CDB

Let’s apply datapatch as we have applied few patches on 19c home

$ export ORACLE_SID=DEVCDB
$ $ORACLE_HOME/OPatch/datapatch
Author – A.Kishore
http://www.appsdba.info

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.

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

Create the CDB TNS Files:

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

cd $ORACLE_HOME/appsutil
. ./txkSetCfgCDB.env dboraclehome=/d02/oracle/DEV/19.0.0

Oracle Home being passed: /d02/oracle/DEV/19.0.0

cd $ORACLE_HOME/appsutil/bin
perl txkGenCDBTnsAdmin.pl -dboraclehome=/d02/oracle/DEV/19.0.0 -cdbname=DEVCDB \
-cdbsid=DEVCDB -dbport=1531 -outdir=/d02/oracle/DEV/19.0.0/appsutil/log
Author – A.Kishore
http://www.appsdba.info

Above script will create below 3 files

cd /d02/oracle/DEV/19.0.0/network/admin

Shutdown the CDB now.

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

export ORACLE_SID=DEVCDB

$ sqlplus "/ as sysdba"


shutdown immediate;

Take a backup for DEVCDB database


cd /d02/oracle/DEV/oradata
cp -R DEVCDB DEVCDB_bak
Author – A.Kishore
http://www.appsdba.info

Database upgrade

Store the UTL_FILE_DIR parameter values

From Oracle 18c onwards UTL_FILE_DIR initialization parameter is desupported and is part of the
database, we can refer v$parameter views for information about UTL_FILE_DIR

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)

Connect to 12c Database:

. ./DEV_erpr12.env

perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=/d02/oracle/DEV/12.1.0/appsutil/DEV_erpr12.xml -


oraclehome=/d02/oracle/DEV/12.1.0 -outdir=/tmp/txkCfgUtlfileDir -upgradedhome=/d02/oracle/DEV/19.0.0 -
mode=getUtlFileDir
Author – A.Kishore
http://www.appsdba.info

Above script will create utl_file locations

cd $ORACLE_HOME/dbs

DEV_utlfiledir.txt

cat DEV_utlfiledir.txt
Author – A.Kishore
http://www.appsdba.info

Shut down the Applications server processes and database listener

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.

cd $ADMIN_SCRIPTS_HOME
sh adstpall.sh apps/apps

Drop SYS.ENABLED$INDEXES

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;

Remove the MGDSYS schema (not applicable for our version)

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
Author – A.Kishore
http://www.appsdba.info

Shut down the database listener

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

lsnrctl stop DEV

Database Pre-Upgrade Steps:

We shall use DBUA for the upgrade, before running DBUA lets run pre-upgrade
tool

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.
• 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'

Note: comment local_listener in the database node

initDEV.ora
#local_listener = DEV_LOCAL
EVENT='10946 trace name context forever, level 8454144'
Author – A.Kishore
http://www.appsdba.info

Shut down and restart the database to enable the parameters.

Run the Pre-upgrade Tool:


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

Note:
12c database is up
12c listener is down
R12.2.10 application is down
19c DEVCDB database is down
Author – A.Kishore
http://www.appsdba.info

$ORACLE_HOME/jdk/bin/java -jar /d02/oracle/DEV/19.0.0/rdbms/admin/preupgrade.jar TERMINAL


TEXT

Report generated by Oracle Database Pre-Upgrade Information Tool Version


19.0.0.0.0 Build: 11 on 2021-12-22T22:52:38

Upgrade-To version: 19.0.0.0.0

=======================================
Status of the database prior to upgrade
=======================================
Database Name: DEV
Container Name: DEV
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: NOARCHIVELOG
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

*
Author – A.Kishore
http://www.appsdba.info

* ALL Components in This Database Registry:


*
Component Current Current Original Previous Component
CID Version Status Version Version Schema
---------- ----------- ----------- ----------- ----------- ------------
AMD 11.2.0.3.0 OPTION OFF 10.2.0.2.0 11.2.0.2.0 OLAPSYS
APS 12.1.0.2.0 VALID 9.2.0.5.0 11.2.0.3.0 SYS
CATALOG 12.1.0.2.0 VALID 9.2.0.5.0 9.2.0.5.0 SYS
CATJAVA 12.1.0.2.0 VALID 9.2.0.5.0 11.2.0.3.0 SYS
CATPROC 12.1.0.2.0 VALID 9.2.0.5.0 11.2.0.3.0 SYS
CONTEXT 12.1.0.2.0 VALID 9.2.0.5.0 11.2.0.3.0 CTXSYS
JAVAVM 12.1.0.2.0 VALID 9.2.0.5.0 11.2.0.3.0 SYS
MGD 12.1.0.2.0 VALID MGDSYS
ORDIM 12.1.0.2.0 VALID 9.2.0.5.0 11.2.0.3.0 ORDSYS
RAC 12.1.0.2.0 OPTION OFF 9.2.0.5.0 11.2.0.3.0 SYS
SDO 12.1.0.2.0 VALID 9.2.0.5.0 11.2.0.3.0 MDSYS
XDB 12.1.0.2.0 VALID 10.2.0.1.0 11.2.0.3.0 XDB
XML 12.1.0.2.0 VALID 9.2.0.7.0 11.2.0.3.0 SYS
XOQ 12.1.0.2.0 VALID 9.2.0.5.0 11.2.0.3.0 SYS

==============
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
Author – A.Kishore
http://www.appsdba.info

upgrading, those asterisked parameter values may be reset if needed.

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

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.

5. To remove duplicate objects, refer to Doc ID 1030426.6.


To query for these duplicates owned by both SYS and SYSTEM, run:
SELECT object_name, object_type
Author – A.Kishore
http://www.appsdba.info

FROM dba_objects
WHERE object_name||'_'||object_type IN
(SELECT object_name||'_'||object_type
FROM dba_objects WHERE owner = 'SYS')
AND owner = 'SYSTEM' AND object_name NOT IN ('AQ$_SCHEDULES',
'AQ$_SCHEDULES_PRIMARY','DBMS_REPCAT_AUTH','DBMS_REPCAT_AUTH');

There exists in the database duplicate object(s) that are owned by both
SYS and SYSTEM.

If an install script had been run as both SYS and SYSTEM, then it is
possible to have duplicate objects (with same object names and types)
owned by both of these Oracle users.

6. 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.

7. Set OLAP_PAGE_POOL_SIZE in the pfile/spfile to 0 before the upgrade, or


remove the setting entirely and accept the Oracle default.

The OLAP_PAGE_POOL_SIZE parameter is set to a non-zero value. This will


cause OLAP to allocate that amount of memory for each OLAP user, and may
interfere with the upgrade process.
Author – A.Kishore
http://www.appsdba.info

The OLAP_PAGE_POOL_SIZE initialization parameter controls the size of of


the OLAP page pool. Without an explicit setting or with it set to 0,
OLAP will dynamically resize the pool as needed. Setting it to a
non-zero value will cause OLAP to allocate that amount of memory as a
fixed-size pool, and never resize the pool. Oracle recommends removing
the parameter from the pfile/spfile.

8. 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.

9. 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.
Author – A.Kishore
http://www.appsdba.info

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

The database contains the following initialization parameters whose name


begins with an underscore:

_system_trig_enabled
_sort_elimination_cost_ratio
_b_tree_bitmap_plans
_fast_full_scan_enabled
_like_with_bind_as_equality
_optimizer_autostats_job
_trace_files_public

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.

11. 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.

12. (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.
Author – A.Kishore
http://www.appsdba.info

INFORMATION ONLY
================
13. Here are ALL the components in this database registry:

Component Current Current Original Previous Component


CID Version Status Version Version Schema
--------- ----------- ----------- ----------- ----------- -----------
AMD 11.2.0.3.0 OPTION OFF 10.2.0.2.0 11.2.0.2.0 OLAPSYS
APS 12.1.0.2.0 VALID 9.2.0.5.0 11.2.0.3.0 SYS
CATALOG 12.1.0.2.0 VALID 9.2.0.5.0 9.2.0.5.0 SYS
CATJAVA 12.1.0.2.0 VALID 9.2.0.5.0 11.2.0.3.0 SYS
CATPROC 12.1.0.2.0 VALID 9.2.0.5.0 11.2.0.3.0 SYS
CONTEXT 12.1.0.2.0 VALID 9.2.0.5.0 11.2.0.3.0 CTXSYS
JAVAVM 12.1.0.2.0 VALID 9.2.0.5.0 11.2.0.3.0 SYS
MGD 12.1.0.2.0 VALID MGDSYS
ORDIM 12.1.0.2.0 VALID 9.2.0.5.0 11.2.0.3.0 ORDSYS
RAC 12.1.0.2.0 OPTION OFF 9.2.0.5.0 11.2.0.3.0 SYS
SDO 12.1.0.2.0 VALID 9.2.0.5.0 11.2.0.3.0 MDSYS
XDB 12.1.0.2.0 VALID 10.2.0.1.0 11.2.0.3.0 XDB
XML 12.1.0.2.0 VALID 9.2.0.7.0 11.2.0.3.0 SYS
XOQ 12.1.0.2.0 VALID 9.2.0.5.0 11.2.0.3.0 SYS

Review the information before upgrading.

14. Consider removing the following deprecated initialization parameters.

Parameter
---------
sec_case_sensitive_logon

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

15. 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.
Author – A.Kishore
http://www.appsdba.info

16. Here is a count of invalid objects by Oracle-maintained users:

Oracle-Maintained User Name Number of INVALID Objects


--------------------------- -------------------------
None None

Review the information before upgrading.

17. Here is a count of invalid objects by Application users:

Application User Name Number of INVALID Objects


--------------------------- -------------------------
APPS 1

Review the information before upgrading.

ORACLE GENERATED FIXUP SCRIPT


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

SQL>@/d02/oracle/DEV/12.1.0/cfgtoollogs/DEV/preupgrade/preupgrade_fixups.sql

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

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

RECOMMENDED ACTIONS
===================
18. (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.


Author – A.Kishore
http://www.appsdba.info

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.

19. 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.

20. 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 10 user directory objects to be checked: APPS_DATA_FILE_DIR,


AW_DIR, CSR_XML_TOP, 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.

21. (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
Author – A.Kishore
http://www.appsdba.info

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.

22. 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
================
23. 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 DEV
which are identified above as AFTER UPGRADE "(AUTOFIXUP)" can be resolved by
executing the following

SQL>@/d02/oracle/DEV/12.1.0/cfgtoollogs/DEV/preupgrade/postupgrade_fixups.sq
l
Author – A.Kishore
http://www.appsdba.info

==================
PREUPGRADE SUMMARY
==================
/d02/oracle/DEV/12.1.0/cfgtoollogs/DEV/preupgrade/preupgrade.log
/d02/oracle/DEV/12.1.0/cfgtoollogs/DEV/preupgrade/preupgrade_fixups.sql
/d02/oracle/DEV/12.1.0/cfgtoollogs/DEV/preupgrade/postupgrade_fixups.sql

Execute fixup scripts as indicated below:

Before upgrade:

Log into the database and execute the preupgrade fixups


@/d02/oracle/DEV/12.1.0/cfgtoollogs/DEV/preupgrade/preupgrade_fixups.sql

After the upgrade:

Log into the database and execute the postupgrade fixups


@/d02/oracle/DEV/12.1.0/cfgtoollogs/DEV/preupgrade/postupgrade_fixups.sql

Preupgrade complete: 2021-12-23T10:22:38.


Author – A.Kishore
http://www.appsdba.info

Make changes to initDEV.ora file as follows

processes = 300
sessions = 600
#*.o7_dictionary_accessibility=FALSE#MP
#optimizer_adaptive_features
#utl_file_dir
#sec_case_sensitive_logon = FALSE
#olap_page_pool_size = 4194304
olap_page_pool_size = 0

#_system_trig_enabled
#_sort_elimination_cost_ratio
#_b_tree_bitmap_plans
#_fast_full_scan_enabled
#_like_with_bind_as_equality
#_optimizer_autostats_job
#_trace_files_public
Author – A.Kishore
http://www.appsdba.info

Remove OLAP Catalog by running the 12.1.0.2.0 SQL script

sqlplus "/as sysdba" @$ORACLE_HOME/olap/admin/catnoamd.sql

SQLNET.ALLOWED_LOGON_VERSION_SERVER=11 in sqlnet.ora file

EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;

sqlplus "/as sysdba" @/d02/oracle/DEV/12.1.0/cfgtoollogs/DEV/preupgrade/preupgrade_fixups.sql

shutdown immediate

startup
Author – A.Kishore
http://www.appsdba.info

Again let’s run the script preupgrade.jar on 12c database

$ORACLE_HOME/jdk/bin/java -jar /d02/oracle/DEV/19.0.0/rdbms/admin/preupgrade.jar TERMINAL


TEXT

Upgrade the database instance

Note: If you are going to run dbua for the second time, ensure below files are not available in
$ORACLE_HOME/dbs, else the upgrade will fail

initTEST.ora
hc_TEST.dat
spfileTEST.ora

cat /etc/oratab

DEVCDB:/d02/oracle/DEV/19.0.0:N
DEV:/d02/oracle/DEV/12.1.0:N

Invoke DBUA using the following command. The keepEvents parameter allows events in the
preupgraded database to be enabled during the upgrade.
dbua -keepEvents
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info

Note : OLAP has to be dropped before the upgrade

$ORACLE_HOME/olap/admin/catnoamd.sql

olap_page_pool_size= 0
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info

Upgrade is completed, it took around 3 hours


Author – A.Kishore
http://www.appsdba.info

Issues and Solutions

At 42% few errors

Log file locations

/d02/oracle/DEV/cfgtoollogs/dbua

Solution : OLAP should be dropped on the source and olap_page_pool_size= 0


Author – A.Kishore
http://www.appsdba.info

Continue .. if you see above error


Author – A.Kishore
http://www.appsdba.info

Run the Post Upgrade Script generated during the Pre-Upgrade Steps. Then
perform miscellaneous post-upgrade tasks needed such as Gathering Stats,
Compiling Invalids etc.
sqlplus "/as sysdba" @/d02/oracle/DEV/12.1.0/cfgtoollogs/DEV/preupgrade/postupgrade_fixups.sql
Author – A.Kishore
http://www.appsdba.info

Perform patch post-install instructions

. ./DEV_erpr12_19c.env

[oradev@erpr12 12cenv]$ sqlplus "/as sysdba"

alter trigger SYSTEM.EBS_LOGON compile;

@?/rdbms/admin/dbmsxdbschmig.sql

@?/rdbms/admin/prvtxdbschmig.plb

alter system set SEC_CASE_SENSITIVE_LOGON=false scope=spfile;

alter system set compatible='19.0.0' scope=spfile;

Run adgrants.sql

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

@adgrants.sql APPS
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info

Grant create procedure privilege on CTXSYS

cd $AD_TOP/patch/115/sql

copy the file adctxprv.sql to the database tier

From database node

sqlplus system/manager @adctxprv.sql manager CTXSYS

Compile invalid objects


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

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

COUNT(*)

----------

Grant datastore access

Use SQL*Plus to connect to the database as SYSDBA and run the following command:
export ORACLE_SID=DEV
sqlplus "/ as sysdba"
grant text datastore access to public;
Author – A.Kishore
http://www.appsdba.info

Gather statistics for the SYS schema

copy the adstats.sql from $APPL_TOP/admin/adstats.sql to Database


Tier and run as below:
$ sqlplus "/ as sysdba"
SQL>alter system enable restricted session;
SQL>@adstats.sql
$ sqlplus "/ as sysdba"
SQL>alter system disable restricted session;
SQL>exit;
Author – A.Kishore
http://www.appsdba.info

Convert Database to Multitenant Architecture:

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 to the PDB
database. Set the appropriate environment variables to connect to the appropriate database.

Only the txkSetCfgCDB.env 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 terminal is brought up every time. However, there is no need to run
txkSetCfgCDB.env twice on the same terminal. So, you may skip running the
txkSetCfgCDB.env 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 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 file. Then, run sqlplus
[user]/[password] or connect as SYSDBA.
• For the PDB database, source the $ORACLE_HOME/[CDB SID]_[HOST].env file. Set the
ORACLE_PDB_SID environment variable to [PDB SID]. Then, run sqlplus [user]/[password]@[PDB
SID] or connect as SYSDBA.
Author – A.Kishore
http://www.appsdba.info

Create PDB Descriptor File:

We have upgraded our EBS database from 12.1.0.2 to 19.x, lets convert our
Non CDB database to PDB.

Note: You should not open the database again till the entire PDB migration
process is complete.

cd $ORACLE_HOME/appsutil

pwd

/d02/oracle/DEV/19.0.0/appsutil

. ./txkSetCfgCDB.env dboraclehome=/d02/oracle/DEV/19.0.0

Oracle Home being passed: /d02/oracle/DEV/19.0.0

export ORACLE_SID=DEV

cd $ORACLE_HOME/appsutil/bin

perl txkOnPremPrePDBCreationTasks.pl -dboraclehome=$ORACLE_HOME \


-outdir=$ORACLE_HOME/appsutil/log -appsuser=apps -dbsid=DEV
Author – A.Kishore
http://www.appsdba.info

Update 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=/d02/oracle/DEV/19.0.0

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 and then use SQL*Plus to connect to the CDB as SYSDBA and
run the following commands to update the CDB initialization parameters:

cd /d02/oracle/DEV/12.1.0/dbs
cp DEV_initparam.sql DEV_datatop.txt /d02/oracle/DEV/19.0.0/dbs

export ORACLE_SID=DEVCDB

sqlplus '/as sysdba'

startup
Author – A.Kishore
http://www.appsdba.info

@$ORACLE_HOME/dbs/DEV_initparam.sql

alter system set LOCAL_LISTENER="erpr12:1531" scope=both;

alter system register;

Bounce the database

Check for PDB Violations:

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

PDB$SEED SQL Patch ERROR RESOLVED


‘19.0.0.0.0 Release_Update 1904101227’ is installed in the CDB but no release
updates are installed in the PDB

cd $ORACLE_HOME/appsutil

. ./txkSetCfgCDB.env dboraclehome=/d02/oracle/DEV/19.0.0

export ORACLE_SID=DEVCDB

cd $ORACLE_HOME/appsutil/bin

perl txkChkPDBCompatability.pl -dboraclehome=$ORACLE_HOME -


outdir=$ORACLE_HOME/appsutil/log -cdbsid=DEVCDB -pdbsid=DEV -
servicetype=onpremise
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info

cat
/d02/oracle/DEV/19.0.0/appsutil/log/TXK_CHK_PDB_COMPTABILITY_Thu_Dec_23_18_48_39_2021/che
ck_pdb_plugin_violations.out

3 errors, lets fix it

Run below command to fix above errors

$ORACLE_HOME/OPatch/datapatch

cd $ORACLE_HOME/appsutil
. ./txkSetCfgCDB.env dboraclehome=/d02/oracle/DEV/19.0.0

export ORACLE_SID=DEVCDB
cd $ORACLE_HOME/appsutil/bin
perl txkChkPDBCompatability.pl -dboraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log
-cdbsid=DEVCDB -pdbsid=DEV -servicetype=onpremise
Author – A.Kishore
http://www.appsdba.info

Note: Above errors are related to PDB, lets create the PDB and then check if it
resolves the errors
Author – A.Kishore
http://www.appsdba.info

Create PDB:

Load the environment variables by running the following commands.

Note: Run on vncserver

. ./DEV_erpr12_19c.env
export ORACLE_SID=DEVCDB

cd $ORACLE_HOME/appsutil
. ./txkSetCfgCDB.env dboraclehome=/d02/oracle/DEV/19.0.0
cd $ORACLE_HOME/appsutil/bin
perl txkCreatePDB.pl -dboraclehome=/d02/oracle/DEV/19.0.0 \
-outdir=/d02/oracle/DEV/19.0.0/appsutil/log -cdbsid=DEVCDB -pdbsid=DEV \
-dbuniquename=DEVCDB -servicetype=onpremise

Please enter
Author – A.Kishore
http://www.appsdba.info

Good query to verify the violations


select con_id, type, message, status
from PDB_PLUG_IN_VIOLATIONS
where status<>'RESOLVED'
order by timee;
Author – A.Kishore
http://www.appsdba.info

After conversion

Shutdown and Take a backup.

nohup tar -cvzf data_19c.tar.gz data &

nohup tar -cvzf oradata.19c.tar.gz oradata &


Author – A.Kishore
http://www.appsdba.info

Run the post PDB script

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

Change the system password

export ORACLE_SID=DEVCDB
alter user system identified by manager;

cd $ORACLE_HOME/appsutil
. ./txkSetCfgCDB.env dboraclehome=/d02/oracle/DEV/19.0.0

perl $ORACLE_HOME/appsutil/bin/txkPostPDBCreationTasks.pl -
dboraclehome=/d02/oracle/DEV/19.0.0 -outdir=/d02/oracle/DEV/19.0.0/appsutil/log -cdbsid=DEVCDB -
pdbsid=DEV -appsuser=apps -dbport=1531 -servicetype=onpremise
Author – A.Kishore
http://www.appsdba.info

Above script will create listener and start the listener


Author – A.Kishore
http://www.appsdba.info

lsnrctl status DEVCDB


Author – A.Kishore
http://www.appsdba.info

Also, 2 environment files are created

cd /d02/oracle/DEV/19.0.0
DEVCDB_erpr12.env
DEV_erpr12.env
cp DEVCDB_erpr12.env DEV_erpr12.env $HOME

connect to CDB
Author – A.Kishore
http://www.appsdba.info

Connect to PDB

https://mikedietrichde.com/2017/08/29/fallback-strategy-flashback-to-
guaranteed-restore-points/

Connect to sys user for PDB

export ORACLE_PDB_SID=DEV
Author – A.Kishore
http://www.appsdba.info

Modify initialization parameters:

Follow Document 396009.1: Database Initialization Parameter Settings for


Oracle E-Business Suite Release 12 to change the necessary parameters. I have
changed below. This marks the completion of all the steps in Database Tier.

SQL> alter system set event='10946 trace name context forever,


level 8454144' scope=spfile;

Note: In my cases it was already set.


Author – A.Kishore
http://www.appsdba.info

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)

cd /d02/oracle/DEV/19.0.0
DEVCDB_erpr12.env
DEV_erpr12.env

Copy the DEV_utlfiledir.txt from 12c home

cd /d02/oracle/DEV/19.0.0/dbs
cp /d02/oracle/DEV/12.1.0/dbs/DEV_utlfiledir.txt .

cat /d02/oracle/DEV/19.0.0/dbs/DEV_utlfiledir.txt

mkdir -p /d02/oracle/DEV/temp/DEV
mkdir -p /usr/tmp/DEV
mkdir -p /d02/oracle/DEV/19.0.0/appsutil/outbound/DEV_erpr12
mkdir -p /d02/oracle/DEV/temp/DEV

. ./DEV_erpr12.env
perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=$CONTEXT_FILE \
-oraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log -mode=setUtlFileDir

Enter the APPS Password:


Enter the SYSTEM Password:
Author – A.Kishore
http://www.appsdba.info
Author – A.Kishore
http://www.appsdba.info

. $ORACLE_HOME/DEV_erpr12.env

$ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=$CONTEXT_FILE \


-oraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log -mode=syncUtlFileDir

Above script will run autoconfig

To connect to TEST pdb (EBS Database)

. ./DEV_erpr12.env

sqlplus apps/apps@DEV

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


Author – A.Kishore
http://www.appsdba.info

Pre-Autoconfig Steps in Application Tier:

Running Autoconfig on the Application Tier is the final step we need to perform
in the Upgrade procees but before that we need to make couple of minor
changes in Application Tier. Add the CDB entry in tnsnames.ora of Application
as below:
Add a entry as below in the Application tnsnames.ora to ensure it connects to
the CDB and the Service Name “TEST” which is nothing but our EBS PDB.

watch

DEV=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=erpr12.appsdba.info)(PORT=1531))
(CONNECT_DATA=
(SERVICE_NAME= DEV)
(INSTANCE_NAME=DEVCDB)
)
)

sqlplus apps/apps
Author – A.Kishore
http://www.appsdba.info

Update the context value for the parameter APPLPTMP with the first value of
utl_file_dir which /d02/oracle/DEV/temp/DEV

sqlplus apps/apps

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

grep APPLPTMP $CONTEXT_FILE


Author – A.Kishore
http://www.appsdba.info

Run Autoconfig on Application tier:

The most important step of the upgrade is to run the Autoconfig on the
Application Tier.

$INST_TOP/admin/scripts/adautocfg.sh
Author – A.Kishore
http://www.appsdba.info

Start Application Services and Check the Database Version:

cd $ADMIN_SCRIPTS_HOME

sh adstrtal.sh apps/apps

Connect to CDB
Author – A.Kishore
http://www.appsdba.info

Connect to PDB
Author – A.Kishore
http://www.appsdba.info

How to Connect as SYSDBA without password into a PDB directly

. ./DEVCDB_erpr12.env

export ORACLE_PDB_SID=DEV

How to run autoconfig on the database tier ?

. ./DEV_erpr12.env

cd $ORACLE_HOME/appsutil/DEV/DEV_erpr12

sh adautocfg.sh
Author – A.Kishore
http://www.appsdba.info

Issues and Solutions

Issue 1

Starting context file generation for db tier..


Using JVM from /d02/oracle/DEV/19.0.0/appsutil/jre/bin/java to execute java programs..
Exception in thread "main" java.lang.InternalError: Currency data format is incorrect
at java.util.Currency$1.run(Currency.java:229)
at java.util.Currency$1.run(Currency.java:214)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.Currency.<clinit>(Currency.java:214)
at java.text.DecimalFormatSymbols.initialize(DecimalFormatSymbols.java:638)
at java.text.DecimalFormatSymbols.<init>(DecimalFormatSymbols.java:113)
at
sun.util.locale.provider.DecimalFormatSymbolsProviderImpl.getInstance(DecimalFormatSymbolsProvide
rImpl.java:85)
at java.text.DecimalFormatSymbols.getInstance(DecimalFormatSymbols.java:180)
at
sun.util.locale.provider.NumberFormatProviderImpl.getInstance(NumberFormatProviderImpl.java:178)
at sun.util.locale.provider.NumberFormatProviderImpl.getInteg

cd $ORACLE_HOME
unzip appsutil.zip
$ cd $ORACLE_HOME/appsutil
$ cp -r $ORACLE_HOME/jdk/jre .

905 cp /d01/oracle/software/OAM12c/jdk-8u221-linux-x64.tar.gz .

906 tar -xvzf jdk-8u221-linux-x64.tar.gz

907 mv jdk1.8.0_221/ jdk


Author – A.Kishore
http://www.appsdba.info

908 pwd

909 cd jdk

910 ls

911 cp -R jre /d02/oracle/DEV/19.0.0/appsutil

912 ls -ltr /d02/oracle/DEV/19.0.0/appsutil/jre/bin/java

Issue 2.

Autoconfig on application failed – Refer Doc ID- 1912332.1

Pending

Verify ETCC patches are applied


Author – A.Kishore
http://www.appsdba.info

References:
Interoperability Notes: Oracle E-Business Suite Release 12.2 with Oracle Database 19c (Doc ID
2552181.1)
Author – A.Kishore
http://www.appsdba.info

Using Oracle 19c RAC Multitenant (Single PDB) with Oracle E-Business Suite Release 12.1 (Doc ID
2530680.1)

https://mikedietrichde.com/2017/08/29/fallback-strategy-flashback-to-guaranteed-restore-points/

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy