Thursday, January 14, 2021

resize boot volume in oracle cloud infrastructure aka OCI for a Linux instance

 

The Oracle Cloud Infrastructure Block Volume service lets you scaleup the size of block volumes and boot volumes. Well, one fine day, my boot volume was short of space and i was looking for some vaccum in my  mount point. I had the challenge, where  /u01 was mounted on boot volume and it had free space of 30 GB only. My requirement was to have around 150 GB. Thanks to OCI, we can scale up the boot volume. 

P.S:-As per https://docs.oracle.com/en-us/iaas/Content/Block/Tasks/resizingavolume.htm, we cannot scale up IDE type boot volume. Also we cannot scale down the boot volume.

 

Open the navigation menu in Oracle Cloud Infrastructure console. Under Core Infrastructure, go to Compute and click Boot Volumes.

 



 

 

In the Boot Volumes list, click the boot volume you want to resize.Click Edit Size or Performance.Specify the new size in VOLUME SIZE (IN GB). You must specify a larger value than the boot volume's current size.

 

 

 

After the volume is provisioned, for the volume resize to take effect, Log on to your instance and then paste and run the rescan commands
 
1. Run the applicable rescan commands.
sudo dd iflag=direct if=/dev/<device_name> of=/dev/null count=1
echo "1" | sudo tee /sys/class/block/<device_name>/device/rescan
2. Extend the partition manually. 
[opc@apps ~]$ sudo su -
Last login: Mon Jan 11 14:17:16 GMT 2021 on pts/0
[root@apps ~]# df -kh
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        7.2G     0  7.2G   0% /dev
tmpfs           7.3G     0  7.3G   0% /dev/shm
tmpfs           7.3G   25M  7.2G   1% /run
tmpfs           7.3G     0  7.3G   0% /sys/fs/cgroup
/dev/sda3       367G  333G   35G  91% /
/dev/sda1       200M  8.6M  192M   5% /boot/efi
tmpfs           1.5G     0  1.5G   0% /run/user/994
tmpfs           1.5G     0  1.5G   0% /run/user/1000
 
Now, extend the partition

[root@apps ~]# sudo /usr/libexec/oci-growfs
CHANGE: partition=3 start=17188864 old: size=769243102 end=786431966 new: size=1031387102 end=1048575966
Confirm? [y/n]y
CHANGED: partition=3 start=17188864 old: size=769243102 end=786431966 new: size=1031387102 end=1048575966
meta-data=/dev/sda3              isize=256    agcount=39, agsize=2515200 blks
         =                       sectsz=4096  attr=2, projid32bit=1
         =                       crc=0        finobt=0 spinodes=0 rmapbt=0
         =                       reflink=0
data     =                       bsize=4096   blocks=96155387, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal               bsize=4096   blocks=4912, version=2
         =                       sectsz=4096  sunit=1 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 96155387 to 128923387
 
 
Confirm the changes
 
[root@apps ~]# df -kh
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        7.2G     0  7.2G   0% /dev
tmpfs           7.3G     0  7.3G   0% /dev/shm
tmpfs           7.3G   25M  7.2G   1% /run
tmpfs           7.3G     0  7.3G   0% /sys/fs/cgroup
/dev/sda3       492G  333G  160G  68% /
/dev/sda1       200M  8.6M  192M   5% /boot/efi
tmpfs           1.5G     0  1.5G   0% /run/user/994
tmpfs           1.5G     0  1.5G   0% /run/user/1000
[root@apps ~]#

 

 In this post, i have tried to demonstrate on how we can scale up the boot volume online in Oracle Cloud Infrastructure. Hope it helps someone. Happy learning Cloud.

 

 

Monday, January 11, 2021

localhost: timed out, nothing received while running ntpq -p

 I was trying to configure NTP in my Oracle Linux 7 Server. The content of /etc/ntp.conf file was

server NTP_server_1

server NTP_server_2

server NTP_server_3

server  127.127.1.0

fudge   127.127.1.0 stratum 10

driftfile /var/lib/ntp/drift

restrict default nomodify notrap nopeer noquery


Changed the firewall

[root@apps etc]# firewall-cmd --zone=public --add-service=ntp

success

[root@apps etc]# firewall-cmd --zone=public --permanent --add-service=ntp

success

[root@apps etc]# systemctl start ntpd
[root@apps etc]# systemctl enable ntpd


Now, when i tried to run ntpq -p, got the below error

Error Message:-
localhost: timed out, nothing received
***Request timed out


Solution:-
The error message indicates that the ntpq command can not access localhost.localdomain, it means the localhost can not access the local ntpq service.

The restrict option in /etc/ntp.conf allows you to control which machines can access your server.

added the below line in /etc/ntp.conf file.

[root@apps etc]# grep 127.0.0.1 /etc/ntp.conf
restrict 127.0.0.1


[root@apps etc]# service ntpd restart
Redirecting to /bin/systemctl restart ntpd.service


[root@apps etc]# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*LOCAL(0)        .LOCL.          10 l   12   64    1    0.000    0.000   0.000



Sunday, January 10, 2021

step by step configure EBS cloud manager

In this post, i will try to give the step by step on how to configure EBS cloud manager. It is already assumed that by going through the link Oracle® E-Business Suite Cloud Manager Guide https://docs.oracle.com/cd/E26401_01/doc.122/f35809/toc.htm, all the prerequisite tasks and EBS Cloud manager topology have been have been completed. If you need an overview of EBS Cloud manager, you can go through my earlier blog https://samappsdba.blogspot.com/2021/01/oracle-e-business-suite-cloud-manager-compute-instance-configuration-issues.html

In the EBS Cloud manager compute instance, Run Oracle E-Business Suite Cloud Manager Configure Script for the First Time

-bash-4.2$ perl configure.pl


Created log file: /u01/install/APPS/apps-unlimited-ebs/out/configure_2021-01-09_09_33_15.log

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

Configuring Oracle E-Business Suite Cloud Manager VM 20.2.1

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


Enter Oracle E-Business Suite Cloud Manager Admin Password                       : *************


Enter Oracle E-Business Suite Cloud Manager Admin User OCID (Non-Federated)      : ocid1.user.oc1..********************

Enter Full path to API Private Signing Key                                       : /u01/install/APPS/.oci/oci_api_key.pem

Enter Tenancy OCID                                                               : ocid1.tenancy.oc1..*******************


Validating OCI credentials. Please wait.

Do you wish to use an existing Load Balancer??


1: yes

2: no


Enter your choice: 1


Getting list of available Load Balancers. Please wait.

Available Load Balancers:

1: Cloud_manager


Choose Load Balancer from above list: 1

Enter Load Balancer Listener Port                                                : 443

Validating Port. Please wait.

Enter CIDR Block (Range) from which Client can Access Load Balancer Listener Port: 192.0***/24



----------------------------------------------------------------------------------------------------------

Summary of Inputs

----------------------------------------------------------------------------------------------------------

Oracle E-Business Suite Cloud Manager User Name ( Non Federated )           : *****

Oracle E-Business Suite Cloud Manager User OCID ( Non Federated )           : ocid1.user.oc******************

Fingerprint of API Public Key                                               : 1d:**************

Path to Private PEM key file                                                : /u01/install/APPS/.oci/oci_api_key.pem

Tenancy OCID                                                                : ocid1.tenancy.*************

Region                                                                      : us-ashburn-1

Oracle E-Business Suite Cloud Manager VM Compartment Name                   : ebscm-compartment

Oracle E-Business Suite Cloud Manager VM Compartment OCID                   : ocid1.com****************

Network Compartment Name                                                    : ebscm-compartment

Network Compartment OCID                                                    : ocid1.compartment.*********************

Network VCN Name                                                            : ebscm-vcn

Network VCN OCID                                                            : ocid1.vcn.oc1.***************

Use an existing Load Balancer                                               : true

Load Balancer Listener Port                                                 : 443

CIDR Block (Range) from which Client can Access Load Balancer Listener Port : 192*****

Load Balancer Name                                                          : Cloud_manager

Load Balancer OCID                                                          : ocid1.*****************************

Load Balancer Visibility Type                                               : Public

Load Balancer Shape                                                         : flexible

Load Balancer Subnet Name                                                   : lbaas-subnet-phx

Load Balancer Subnet OCID                                                   : ocid1.subnet*******************

Load Balancer Subnet CIDR                                                   : 10.******

----------------------------------------------------------------------------------------------------------



Do you wish to continue??


1: yes

2: no


Enter your choice: 1


Database schema is already configured. No action needed.


Setting up Load Balancer for Oracle E-Business Suite Cloud Manager VM. This may take a few minutes. Please wait.


Checking Security Lists of LBaaS Subnet, lbaas-subnet-phx

Checking Security Lists of Oracle E-Business Suite Cloud Manager VM Subnet, ebscm-subnet-phx with source CIDR 10.0**********

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

Load Balancer Cloud_manager configuration completed. It is not ready to use until you add required rules as per any errors mentioned above.

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

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

Register confidential application in IDCS with URL: https://193.********:443 and then re-run this script to update your IDCS configuration.

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

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

Finished Configuring Oracle E-Business Suite Cloud Manager VM.

Login URL: https://193.*********:443

Ensure the confidential application is correctly configured in IDCS as per the documentation.

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


Register Oracle E-Business Suite Cloud Manager as a Confidential Application

Login to the IDCS console using the non federated user credentials which you have created during the initial setup.



Select confidential application






Under grant, click on add and select authenticator and me



Note down the following

Client ID, Client Secret and Oracle identity service tenant value.


Run Oracle E-Business Suite Cloud Manager Configure Script for the Second Time


-bash-4.2$ perl configure.pl


Created log file: /u01/install/APPS/apps-unlimited-ebs/out/configure_2021-01-09_10_27_12.log

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

Configuring Oracle E-Business Suite Cloud Manager VM 20.2.1

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


Enter Oracle E-Business Suite Cloud Manager Admin Password                       : *************


Enter IDCS Client ID                                                             : d*********************

Enter IDCS Client Secret                                                         : 6********************************

Enter IDCS Client Tenant                                                         : idcs-*****************



----------------------------------------------------------------------------------------------------------

Summary of Inputs

----------------------------------------------------------------------------------------------------------

IDCS Client ID                                                              : d*******************

IDCS Client Secret                                                          : 6********************

IDCS Client Tenant                                                          : idcs-*****************

IDCS Host                                                                   : https://idc******************

----------------------------------------------------------------------------------------------------------



Do you wish to continue??


1: yes

2: no


Enter your choice: 1


Database schema is already configured. No action needed.


Load Balancer Cloud_manager is already configured. No action needed.


Configuring IDCS


Installing Chef Server. Please wait.

Starting ChefServer.

Uploading cookbooks

Stopping Node and Job Server if running.

Starting Node and Job Server.

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

Finished Configuring Oracle E-Business Suite Cloud Manager VM.

Login URL: https://19**********:443

Ensure the confidential application is correctly configured in IDCS as per the documentation.

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

Update local machine etc host file.

load balancer IP        public IP for EBS Compute instance


Create Network Profile

bash-4.2$ cd /u01/install/APPS/apps-unlimited-ebs/bin

-bash-4.2$ perl ProvisionOCINetwork.pl


Program: ProvisionOCINetwork.pl started at Sun Jan 10 08:58:23 2021

Log File : /u01/install/APPS/apps-unlimited-ebs/out/ProvisionOCINetwork_Sun_Jan_10_08_58_23_2021.log



This script will be creating following subnets

EBS subnet 1: This subnet will be used in One-Click Provisioning to deploy Single Image EBS VM. For Advanced Provisioning this subnet will be used to deploy EBS apps tier VM.

EBS subnet 2: This subnet will be used in Advanced Provisioning to deploy EBS db tier VM.

LBaaS subnet: This subnet will be used for Advanced Provisioning and One-Click Provisioning to deploy Load Balancer.


Enter Y to proceed or N to exit: Y


Enter user ocid: *******************

Enter absolute path of private key of API signing key: /u01/install/APPS/.oci/oci_api_key.pem

Enter tenancy ocid: *********************************************


Validating user and fetching OCI metadata...


Enter unique identifier for the EBS network: ebscmnet

Enter EBS subnet 1 CIDR (E.g. 10.0.1.0/24): 

Enter EBS subnet 2 CIDR (E.g. 10.0.2.0/24): 

Enter LBaaS subnet CIDR (E.g. 10.0.3.0/24): 


Are you sure you want to proceed with the above inputs? [Y/N]: Y


Creating network for EBS with unique identifier ebscmnet

Executing command: /u01/install/APPS/bin/terraform init

Executing command: /u01/install/APPS/bin/terraform apply -auto-approve

Creating network profile /u01/install/APPS/apps-unlimited-ebs/ebscmnet_networkprofile.txt


Creating ingress Security Rule with source 10.****** and port 443 for Security List ebscmvm-seclist.


Creating ingress Security Rule with source 10.0.******** and port 443 for Security List ebscmvm-seclist.


Oracle EBS Cloud related network created successfully.


List of resources created:

ebscmnet_lbaas_subnet

ebscmnet_lbaas_seclist

ebscmnet_lbaas_routetable

ebscmnet_db_subnet

ebscmnet_db_seclist

ebscmnet_db_routetable

ebscmnet_apps_subnet

ebscmnet_apps_seclist

ebscmnet_apps_routetable


Program: ProvisionOCINetwork.pl completed at Sun Jan 10 09:04:03 2021

Advanced Network Profile JSON Path: /u01/install/APPS/apps-unlimited-ebs/build/ebscmnet/ebscmnet_DEFAULT_PROFILE_ADVANCED.json

OneClick Network Profile JSON Path: /u01/install/APPS/apps-unlimited-ebs/build/ebscmnet/ebscmnet_DEFAULT_PROFILE_ONECLICK.json

Execute /u01/install/APPS/apps-unlimited-ebs/bin/UploadOCINetworkProfile.pl to Upload JSON into DB


-bash-4.2$



Now run the upload script. The script needs to be uploaded twice, the first time for the One-Click Provisioning default network profile and the second time for the Advanced Provisioning default network profile.



-bash-4.2$ cd /u01/install/APPS/apps-unlimited-ebs/bin

-bash-4.2$ perl UploadOCINetworkProfile.pl


Log File : /u01/install/APPS/apps-unlimited-ebs/out/UploadOCINetworkProfile_Sun_Jan_10_09_04_56_2021.log



Enter Network profile JSON file absolute path: /u01/install/APPS/apps-unlimited-ebs/build/ebscmnet/ebscmnet_DEFAULT_PROFILE_ADVANCED.json

Enter User OCID: oci**************************

Enter Absolute path of private key of API signing key: /u01/install/APPS/.oci/oci_api_key.pem

Enter Tenancy OCID: ocid1.*************

Enter Oracle E-Business Suite Cloud Manager Admin Password:

Executing: ebscm_add_default_network_profile API for DEFAULT_PROFILE_ADVANCE

Executing Stored Procedure: ebscm_add_default_network_profile

RetCode: 0

Row count: 0


ADVANCED Network Profile uploaded successfully.


-bash-4.2$ perl UploadOCINetworkProfile.pl


Log File : /u01/install/APPS/apps-unlimited-ebs/out/UploadOCINetworkProfile_Sun_Jan_10_09_07_15_2021.log



Enter Network profile JSON file absolute path: /u01/install/APPS/apps-unlimited-ebs/build/ebscmnet/ebscmnet_DEFAULT_PROFILE_ONECLICK.json

Enter User OCID: ocid******************

Enter Absolute path of private key of API signing key: /u01/install/APPS/.oci/oci_api_key.pem

Enter Tenancy OCID: ocid1****************

Enter Oracle E-Business Suite Cloud Manager Admin Password:

Executing: ebscm_add_default_network_profile API for DEFAULT_PROFILE_ONECLICK

Executing Stored Procedure: ebscm_add_default_network_profile

RetCode: 0

Row count: 0


ONECLICK Network Profile uploaded successfully.

-bash-4.2$


Access your EBS Cloud Manager URL now






This completes the configuration of EBS Cloud Manager and on how we can launch the GUI based interface. Lots of improvisation have been done which i will be exploring now and hopefully i will be able to blog them as well. Till then happy learning Oracle Cloud and off course EBS :)


References:-

https://docs.oracle.com/cd/E26401_01/doc.122/f35809/toc.htm

                https://docs.oracle.com/cd/E26401_01/doc.122/f35809/T679330T679340.htm#cmg_prepare_createnetrsrcs




Tuesday, January 5, 2021

Oracle E-Business Suite Cloud Manager Compute Instance configuration issues

Oracle E-Business Suite Cloud Manager Compute Instance configuration issues

Oracle E-Business Suite Cloud Manager - Oracle E-Business Suite Cloud Manager is a graphical user interface used for creating, managing, and configuring Oracle E-Business Suite environments on Oracle Cloud Infrastructure. Oracle E-Business Suite Cloud Manager can be used with the Oracle E-Business Suite Cloud Backup Module to lift and shift or clone environments from onpremises to Oracle Cloud Infrastructure


Issues Encountered:-

Recently, i was trying to configure Oracle E-Business Suite Cloud Manager and as part of which when i tried to run the perl configure.pl script, encountered the below error

[2021/01/02 14:37:20]:BMCUtils::printOutErrorUtil: INFO:
---- Err: START ----
ServiceError:
{
"code": "NotAuthorizedOrNotFound",
"message": "Authorization failed or requested resource not found",
"opc-request-id": "DAA8DCE74C3C4F6291B2E0A8F4011B72/8C171D153E97B1ECBB5D8A5553B8EFBD/CAC67E1B04F8787E886355B92D0FA89D",
"status": 404
}

To avoid the errors, we can crosscheck the below points

  1. make sure .pem files are owned by Oracle user
  2. check the permissions of the .oci directory and the .pem files inside it
  3. Ensure that the user who will do the api calling are non federated user
  4. Check if the non federated user has been assigned to any group in OCI

 Another issue which i encountered is:-

Utils::executeConfigCmd: INFO: ^[[1m^[[31mError: ^[[0m^[[0m^[[1mService error:InvalidParameter. shapeDetails cannot be null when shape is flexible. http status code: 4

To get rid of this error, i had to create a flexible load balancer first and then deleted the listener which got created as part of load balancer creation.

Then choose the option of

1. Use an existing load balancer when you run the perl configure.pl script.


Issue:-log4j:WARN Please initialize the log4j system properly.log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.BMCS credential validation failed. Detailed error: (404, NamespaceNotFound, false) You do not have authorization to perform this request


Make sure the user for which you are passing the ocid have the authorization to create resources in the following compartment in which you want the backups and new provisioned environment to be.

Issue:-Trying to establish SSH connection using custom private key file /home/oracle/.ssh/id_rsacom.jcraft.jsch.JSchException: Auth failat com.jcraft.jsch.Session.connect(Session.java:512)at com.jcraft.jsch.Session.connect(Session.java:183)at oracle.apps.liftNshift.secure.util.STAGE.EBSLiftNShiftJSCHSessionManager.createJSCHSession(EBSLiftNShiftJSCHSessionManager.java:268)


Created a id_rsa and id_rsa.pub keys. Copied .pub keys to >>authorized_keys. And then using puttygen created a new ppk file from id_rsa file and copied it to server



In my next post https://samappsdba.blogspot.com/2021/01/step-by-step-configure-ebs-cloud-manager.html, i have demonstrated on how we can configure EBS Cloud Manager.

Where can i get  EBS Cloud Manager:-

As of now, the latest Oracle E-Business Suite Cloud Manager version is 20.2.1 which we can get it easily from Oracle Cloud Marketplace and configure it using https://docs.oracle.com/cd/E26401_01/doc.122/f35809/toc.htm





There are considerable changes done to this version and i can't wait to get my hands dirty and play with it.

What is new in this version:-

Advanced Provisioning

Multi-zone support

Enhanced logical hostname support

Public SSH keys deployment

Automated Standby Deployment (EBS 12.2 with DB 12.1.0.2 on Compute)

On-premise to cloud standby deployment

Reduced downtime lift and shift

Cloning on Compute

Option to choose different shapes for target

Extensibility Framework

Capability to add post-execution tasks to provisioning and cloning flows

Support for seeded and custom tasks

Capability to pause and resume execution flows

Lifecycle Management

Horizontal scaling

Backup scheduling



References:-

https://blogs.oracle.com/ebsandoraclecloud/get-ebs-cloud-manager-2021

https://docs.oracle.com/cd/E26401_01/doc.122/f35809/T679330T679337.htm#8732305

Sunday, December 27, 2020

upgrade EBS 12.2 database 12c(12.1.0.2) to 19c(19.3)-Part 3

upgrade EBS 12.2 database 12c(12.1.0.2) to 19c(19.3)-Part 3


In Continuation to my previous posts https://samappsdba.blogspot.com/2020/12/upgrade-EBS-12.2-database-12c12.1.0.2-to-19c19.3-Part-2.html, in this post, we will see the steps once the database is upgraded.


Run adgrants.sql

Copy $APPL_TOP/admin/adgrants.sql (adgrants_nt.sql for Windows) from the administration server node to the database server node. Use SQL*Plus to connect to the database as SYSDBA, and run the script using the following command:


sqlplus "/ as sysdba" @adgrants.sql apps;


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


Grant create procedure privilege on CTXSYS

Copy $AD_TOP/patch/115/sql/adctxprv.sql from the administration server node to the database server node. Use SQL*Plus to connect to the database as apps and run the script using the following command:
$ sqlplus apps/<apps password> @adctxprv.sql <SYSTEM password> CTXSYS
[oracle@apps sql]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Dec 18 05:19:37 2020
Version 19.3.0.0.0

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


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

SQL> @adctxprv.sql manager CTXSYS;

Connecting to SYSTEM
Connected.

PL/SQL procedure successfully completed.


Commit complete.

Compile invalid objects

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



Grant datastore access


Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

 

SQL> grant text datastore access to public;

 

Grant succeeded.


Gather statistics for the SYS schema


SQL> alter system enable restricted session;

 

System altered.

 

SQL> @adstats.sql;

Connected.

 

 

--------------------------------------------------

--- adstats.sql started at 2020-12-19 09:05:01 ---

 

 

Checking for the DB version and collecting statistics ...

 

 

 

 

 

PL/SQL procedure successfully completed.

 

 

 

------------------------------------------------

--- adstats.sql ended at 2020-12-19 09:27:23 ---

 

 

Commit complete.

 

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

Version 19.3.0.0.0

[oracle@apps ~]$

[oracle@apps ~]$

[oracle@apps ~]$

[oracle@apps ~]$ sqlplus / as sysdba

 

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Dec 19 09:29:28 2020

Version 19.3.0.0.0

 

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

 

 

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

 

SQL> alter system disable restricted session;

 

System altered.

 

SQL>



Convert Database to Multitenant Architecture


SID of PDB will same as of NON CDB of source which is ebsdb.

Source SID=ebsdb

Database name-ebscdb

CDB sid=ebscdb

 

 

perl txkOnPremPrePDBCreationTasks.pl -dboraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log -appsuser=apps -dbsid=ebsdb



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:

 

 

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

[oracle@apps appsutil]$ . ./txkSetCfgCDB.env dboraclehome=/u01/install/APPS/19.1.3

 

Oracle Home being passed: /u01/install/APPS/19.1.3

[oracle@apps appsutil]$ export ORACLE_SID=ebscdb

[oracle@apps appsutil]$ sqlplus / as sysdba

 

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Dec 19 12:14:16 2020

Version 19.3.0.0.0

 

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

 

Connected to an idle instance.

 

SQL> startup nomount;

ORACLE instance started.

 

Total System Global Area 4647286504 bytes

Fixed Size                  9144040 bytes

Variable Size             939524096 bytes

Database Buffers         3690987520 bytes

Redo Buffers                7630848 bytes

SQL> @/u01/install/APPS/19.1.3/dbs/ebsdb_initparam.sql;

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

 

System altered.

 

SQL> alter system set LOCAL_LISTENER="apps:1521" 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 2147482344 bytes

Fixed Size                  9136872 bytes

Variable Size             436207616 bytes

Database Buffers         1677721600 bytes

Redo Buffers               24416256 bytes

Database mounted.

Database opened.

SQL>


Check for PDB violations


export ORACLE_SID=ebscdb


[oracle@apps bin]$ perl txkChkPDBCompatability.pl -dboraclehome=/u01/install/APPS/19.1.3 -outdir=/u01/install/APPS/19.1.3/appsutil/log -cdbsid=ebscdb -pdbsid=ebsdb -servicetype=onpremise


Create the PDB

Make sure datatop.txt file exist under new oracle home/dbs. If not then copy it from old OH/dbs.

[oracle@apps appsutil]$ . ./txkSetCfgCDB.env dboraclehome=/u01/install/APPS/19.1.3

 

Oracle Home being passed: /u01/install/APPS/19.1.3

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

[oracle@apps bin]$ /u01/install/APPS/19.1.3/perl/bin/perl txkCreatePDB.pl -dboraclehome=/u01/install/APPS/19.1.3 -outdir=/u01/install/APPS/19.1.3/appsutil/log -cdbsid=ebscdb -pdbsid=ebsdb -dbuniquename=ebscdb -servicetype=onpremise


Note:Till the time this script will run, the status of the PDB will in read/write along with restricted=YES. Once the script completes, the status will change to restricted=NO.


Check the status of PDB now:-

SQL> show pdbs;


    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

---------- ------------------------------ ---------- ----------

         2 PDB$SEED                       READ ONLY  NO

         3 ebsdb                          READ WRITE NO


Run the post PDB script


[oracle@apps appsutil]$ perl $ORACLE_HOME/appsutil/bin/txkPostPDBCreationTasks.pl -dboraclehome=/u01/install/APPS/19.1.3 -outdir=/u01/install/APPS/19.1.3/appsutil/log -cdbsid=ebscdb -pdbsid=ebsdb -appsuser=apps -dbport=1521 -servicetype=onpremise


This will also run autoconfig in the database tier.


Modify initialization parameters

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.


SQL>


Modify the tnsnamnes.ora file in application patch and run file system


Add the following content of CDB to application run and patch tnsnames.ora

ebscdb=

        (DESCRIPTION=

                (ADDRESS=(PROTOCOL=tcp)(HOST=apps.example.com)(PORT=1521))

            (CONNECT_DATA=

                (SERVICE_NAME=ebsdb)--pdb sid

                (INSTANCE_NAME=ebscdb)--cdb sid

            )

        )


Modify the context file of application tier


In the context file

Replace

s_dbportNew database port

s_apps_jdbc_connect_descriptorNULL

s_applptmpDirectory (not /usr/tmp) defined in UTL_FILE_DIR


To identify the allowable directories for s_applptmp use, connect to the Oracle E-Business Suite database instance as the apps user and run the following query:

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

I replace it with 

/u01/install/APPS/19.1.3/temp/ebsdb

Remember to do the changes in patch file system also

Now run autoconfig


start the application tier



This completes the step by step approach on how we can upgrade EBS 12.2 database 12c(12.1.0.2) to 19c(19.3). Hope it helps someone.