Steps to Upgrade 11g DB System to 19c DB System for Oracle E-Business Suite 12.1.3 on OCI Cloud
Source Oracle Database 11.2.0.4, OS Linux 7.9 VM
Target Oracle Database 19.23.0.0.0 DBCS
select * from v$encryption_wallet;
WRL_TYPE
--------------------
WRL_PARAMETER
--------------
STATUS
------------------
file
/u01/app/oracle/product/11.2.0.4/dbhome_1/admin/PROD/wallet
CLOSED
mkdir -p /u01/app/oracle/product/11.2.0.4/dbhome_1/admin/PROD/wallet
SQL> ALTER SYSTEM SET ENCRYPTION KEY IDENTIFIED BY "anything";
System altered.
SQL> select * from v$encryption_wallet;
WRL_TYPE
--------------------
WRL_PARAMETER
-----------------
STATUS
------------------
file
/u01/app/oracle/product/11.2.0.4/dbhome_1/admin/PROD/wallet
OPEN
ls -ltr /u01/app/oracle/product/11.2.0.4/dbhome_1/admin/PROD/wallet
total 4
-rw-r--r-- 1 oracle oinstall 2576 Jul 5 21:43 ewallet.p12
SQL> alter system set encryption wallet close identified by "anything";
System altered.
SQL> select * from v$encryption_wallet;
WRL_TYPE
--------------------
WRL_PARAMETER
---------------
STATUS
------------------
file
/u01/app/oracle/product/11.2.0.4/dbhome_1/admin/PROD/wallet
CLOSED
SQL> ALTER SYSTEM SET ENCRYPTION WALLET OPEN IDENTIFIED BY "anything";
System altered.
SQL> select * from v$encryption_wallet;
WRL_TYPE
--------------------
WRL_PARAMETER
--------------
STATUS
------------------
file
/u01/app/oracle/product/11.2.0.4/dbhome_1/admin/PROD/wallet
OPEN
orapki wallet display -wallet .
Oracle PKI Tool : Version 11.2.0.4.0 - Production
Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
Enter wallet password:
Requested Certificates:
Subject: CN=oracle
User Certificates:
Oracle Secret Store entries:
ORACLE.SECURITY.DB.ENCRYPTION.AcvSpemcs0+Tvz/WHeItwskAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
ORACLE.SECURITY.DB.ENCRYPTION.MASTERKEY
Trusted Certificates:
Check the NLS Character Set
SQL> select * from NLS_DATABASE_PARAMETERS where parameter='NLS_CHARACTERSET';
PARAMETER
------------------------------
VALUE
-----------
NLS_CHARACTERSET
AL32UTF8
Check current db version
SQL> select banner from v$version;
BANNER-----------------------------------------------------------------------Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionPL/SQL Release 11.2.0.4.0 - ProductionCORE 11.2.0.4.0 ProductionTNS for Linux: Version 11.2.0.4.0 - ProductionNLSRTL Version 11.2.0.4.0 - Production
Check apps version
SQL> select release_name from apps.fnd_product_groups;
RELEASE_NAME--------------------------------------------------12.1.3
1) Run hcheck.sql
Follow My Oracle Support Knowledge Document 136697.1 hcheck.sql - Script to Check Data Dictionary for Known Problems, to run hcheck.sql, which looks for some known common Data Dictionary problems.
2) Apply EBS Patches as part for Pre-requisites.
- Patch 8796558
- Patch 9239090 - Oracle E-Business Suite 12.1.3.
- Patch 23569686 - R12.AD.B.delta.8.
- Patch 27135427 - R12.TXK.B.delta.4.
- Patch 30033914 - 19c interoperability patch for Release 12.1.3.
- Patch 27102203 - Prerequisite patch for 28613638.
- Patch 28613638
- Patch 28685719
- Patch 29178111
- Patch 29583055
- Patch 29905536
- Patch 30370150
- Patch 30601878
- Patch 30844256
- Patch 31209544
- Patch 31527189
- Patch 32141931
- Patch 31867474
- Patch 33798766
sqlplus apps/appspassword
SQL>@$AD_TOP/patch/115/sql/adsetmmd.sql ENABLE
adpatch defaultsfile=$APPL_TOP/admin/PROD/my_def.txt
adpatch defaultsfile=$APPL_TOP/admin/PROD/my_def.txt \
logfile=adpatch.log \
patchtop=/home/applprod/DB_UPGRADE/patches/30033914 \
driver=u30033914.drv \
workers=6 \
interactive=no
sqlplus apps/appspassword
SQL>@$AD_TOP/patch/115/sql/adsetmmd.sql DISABLE
Select bug_number,creation_date from apps.ad_bugs where bug_number in ('28292585','8796558','9239090','23569686','27135427','30033914','27102203','28613638','28685719','29178111','29414243','29583055','29905536','30370150','30601878','31209544','31406810','31470349','30844256','31527189','32141931','31867474','33798766');
3) Apply Patch 6400501 - Not needed in my environment as it was already applied
Check SEC_CASE_SENSITIVE_LOGON parameter is database is set to false. If not set then, please set it to false.
SQL> show parameter case
NAME TYPE VALUE
------------------------------------ ----------- ----------------------sec_case_sensitive_logon boolean FALSE
5) Create New Target Oracle Database 19c DB System on Oracle Cloud
- Login to the Oracle Cloud Infrastructure Console using your Oracle Cloud Infrastructure credentials.
- Select the menu at the upper left corner of the page. Then under Oracle Database, select Oracle Base Database Service to display the Database Cloud Service console.
- Click Create DB System to create a DB system with the values indicated. For more details on each of the fields refer to "To create a DB system".
- Compartment: Select the same compartment as the source DB System.
- Display Name: The name for the new DB System deployment.
- Availability Domain: The availability domain (within the region) in which the DB system will reside.
- Shape Type: Virtual Machine
- Shape: The shape to use to launch the DB system.
- The recommendation for Oracle E-Business Suite is to use a minimum of VM.Standard2.x shape for the OCI DB System.
- OCI DB System Shapes are available from the "VM Shapes."
- Consider the OCPU, memory, local disk, and network bandwidth requirements when selecting a shape to the meet the system needs.
- Total Node Count: The number of nodes in the DB system. Enter the same number of nodes as the source system.
- Select Software Edition to the same as the source DB System.
- Storage Management Software: Choose "Oracle Grid Infrastructure".
- Available Storage Size (GB): Enter a valid value based on the source DB System size.
- Total Storage Size (GB): Total storage includes available storage plus recovery logs. This value will be selected for you based on the available storage size. For more details refer to "Storage Options for Virtual Machine DB Systems".
- Cluster Name: This is an optional name. This field is only present when "Total Node Count=2" (such as for a 2-Node DB System).
- SSH Public Key: Specify the same public key used to connect to the source DB System.
- License Type: The type of license you want to use for the DB System. Your choice affects metering for billing.
- Virtual Cloud Network: The VCN must match the source DB System.
- Client Subnet: The database tier subnet must match the source DB System.
- Hostname Prefix: The host name for a DB System must begin with an alphabetic character, be no longer than 16 characters, and can contain only alphanumeric characters and hyphens (-). Also, the host name must be unique within the subnet. Otherwise, the DB System will fail to provision.
- Host Domain Name: The domain name of the DB system, populated as <db_subnet_name>.<VCN_Name>.oraclevcn.com format. This cannot be changed.
- Host and Domain URL: Combines the host and domain names to display the fully qualified domain name (FQDN) for the database.
- Continue with creation of the DB System by clicking Next.
- Database Name: The name for the database.
- Database Image, click Change Database Image
- Select Oracle Provided Database Software Images,
- Under Database Version, select the check box DISPLAY ALL AVAILABLE VERSIONS.
- In the Database Version drop-down list, select 19.23.0.0
- PDB name: (Required) The name of the default pluggable database (PDB). As part of an Oracle Database 19c deployment, a PDB name is mandatory, but the actual pluggable database created at this point will not be used by Oracle E-Business Suite. Therefore, enter a dummy value such as "DUMMYPDB." It will be removed later in this section.
- Database Admin Password: The password for Oracle Database administrative users.
- Automatic Backup: Select the check box if you want to enable automatic incremental backups for this database.
- Click Show Advanced Options:
- Character Set: The character set for the database. This value must match the value of the on-premises Oracle E-Business Suite database.
- National Character Set: The national character set for the database. This value must match the value of the source Oracle E-Business Suite database.
- Tags: Optionally, you can apply tags.
- Click Create DB System.
sudo su -
vi /etc/ssh/sshd_config
Add following line:
AllowUsers oracle opc
vi /etc/ssh/sshd_config
modify (or add, if necessary) the settings shown
# To allow multi-threaded transfer of files.
MaxStartups 100
# To prevent client timeout.
ClientAliveInterval 100
ClientAliveCountMax 99999
Now run following with ROOT user
/sbin/service sshd restart
- Log in to the Oracle Cloud Infrastructure Console using your Oracle Cloud Infrastructure credentials.
- Open the navigation menu. Select Oracle Database, then select Oracle Base Database.
- Select your Compartment. A list of DB systems is displayed.
- In the list of DB systems, find the DB system containing the PDB you want to delete. Click the DB system name to display details about it.
- In the list of databases, find the database containing the PDB you want to delete. Click the database name to display details about it.
- In the Resources section of the page, click Pluggable Databases.
- In the list of PDBs, find the PDB you want to delete. Click the "DUMMYPDB" name to display details about it.
- From the PDB details page, click More actions, and then click Delete.
- In the Delete PDB dialog, click Delete PDB to confirm.
$ cp $ORACLE_HOME/jlib/orai18n.jar $ORACLE_HOME/jdk/jre/lib/ext
6) Prepare 11g Database for Upgrade
$ . ./txkSetCfgCDB.env dboraclehome=/u01/app/oracle/product/11.2.0.4/dbhome_1
$ export ORACLE_SID=PROD
$ cd $ORACLE_HOME/appsutil/bin
$ perl txkOnPremPrePDBCreationTasks.pl -dboraclehome=/u01/app/oracle/product/11.2.0.4/dbhome_1 \
-outdir=/u01/app/oracle/product/11.2.0.4/dbhome_1/appsutil/log -appsuser=apps \
-dbsid=PROD -skipdbshutdown=yes
7) Prepare 19c Home for 11g Upgrade to 19c before migration on DBCS
Install the 19c Pre-requisites on same server where 11g DB home is already present.
yum install -y oracle-database-preinstall-19c
yum install java
Take gold copy from DBCS and use to 19c setup on premises. I will not need to apply any patches as it is already applied to DBCS Home.
export ORACLE_HOME=/u01/app/oracle/product/19.0.0
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/perl/bin
export ORACLE_BASE=/u01/app/oracle
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PERL5LIB=$ORACLE_HOME/perl/lib/5.28.1:$ORACLE_HOME/perl/lib/site_perl/5.28.1
[oracle@fundb OPatch]$ ./opatch lspatches
36195566;JDK BUNDLE PATCH 19.0.0.0.240416
36459041;MERGE ON DATABASE RU 19.23.0.0.0 OF 34697081 36294695
36199232;OJVM RELEASE UPDATE: 19.23.0.0.240416 (36199232)
36260537;DSTV43 UPDATE - TZDATA2024A - NEED OJVM FIX
36240578;OCW RELEASE UPDATE 19.23.0.0.0 (36240578)
36233263;Database Release Update : 19.23.0.0.240416 (36233263)
OPatch succeeded.
8) UTL_FILE_DIR Setup
On 11g DB run the below commands
Run the txkCfgUtlfileDir.pl script in getUtlFileDir mode using the following command:
Source 11g home
$ 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@fundb 19.0.0]$ pwd
/u01/app/oracle/product/19.0.0
[oracle@fundb 19.0.0]$ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=/u01/app/oracle/product/11.2.0.4/dbhome_1/appsutil/PROD_fundb.xml \
-oraclehome=/u01/app/oracle/product/11.2.0.4/dbhome_1 -outdir=/u01/app/oracle/product/11.2.0.4/dbhome_1/appsutil/log \
-upgradedhome=/u01/app/oracle/product/19.0.0 -mode=getUtlFileDir -servicetype=onpremise
Enter the APPS Password:
*** ALL THE FOLLOWING FILES ARE REQUIRED FOR RESOLVING RUNTIME ERRORS
*** Log File = /u01/app/oracle/product/11.2.0.4/dbhome_1/appsutil/log/TXK_UTIL_DIR_Sat_Jul_6_12_24_50_2024/txkCfgUtlfileDir.log
Program : started @ Sat Jul 6 12:24:56 2024
*** Log File = /u01/app/oracle/product/11.2.0.4/dbhome_1/appsutil/log/TXK_UTIL_DIR_Sat_Jul_6_12_24_50_2024/txkCfgUtlfileDir.log
Script Name : txkCfgUtlfileDir.pl
Script Version : 120.0.12010000.10
Started : Sat Jul 6 12:24:56 +08 2024
Log File : /u01/app/oracle/product/11.2.0.4/dbhome_1/appsutil/log/TXK_UTIL_DIR_Sat_Jul_6_12_24_50_2024/txkCfgUtlfileDir.log
Context file: /u01/app/oracle/product/11.2.0.4/dbhome_1/appsutil/PROD_fundb.xml exists.
==============================================================================
Successfully generated the below file with UTL_FILE_DIR content:
/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/PROD_utlfiledir.txt
==============================================================================
Completed : Sat Jul 6 12:24:56 +08 2024
Successfully Completed the script
ERRORCODE = 0 ERRORCODE_END
SQL> PURGE DBA_RECYCLEBIN;
$ORACLE_HOME/jdk/bin/java -jar /u01/app/oracle/product/19.0.0/rdbms/admin/preupgrade.jar TERMINAL TEXT
9) Upgrade 11g to 19c Non Container Database
Validate entry in /etc/oratab
$ORACLE_HOME/bin/dbua -keepEvents
Post Upgrade Tasks
Run the post upgrade fix up script.
Now we will use 19c db home
[oracle@fundb ~]$ . oraenv
ORACLE_SID = [oracle] ? PROD
The Oracle base remains unchanged with value /u01/app/oracle
Run Datapatch
cd /u01/app/oracle/product/19.0.0/OPatch
./datapatch
SQL Patching tool version 19.23.0.0.0 Production on Sat Sep 21 08:55:34 2024
Copyright (c) 2012, 2024, Oracle. All rights reserved.
Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_795_2024_09_21_08_55_34/sqlpatch_invocation.log
Connecting to database...OK
Gathering database info...done
Bootstrapping registry and package to current versions...done
Determining current state...done
Current state of interim SQL patches:
Interim patch 36199232 (OJVM RELEASE UPDATE: 19.23.0.0.240416 (36199232)):
Binary registry: Installed
SQL registry: Applied successfully on 21-SEP-24 05.07.40.296503 AM
Current state of release update SQL patches:
Binary registry:
19.23.0.0.0 Release_Update 240406004238: Installed
SQL registry:
Applied 19.23.0.0.0 Release_Update 240406004238 successfully on 21-SEP-24 05.07.40.274434 AM
Adding patches to installation queue and performing prereq checks...done
Installation queue:
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 Sat Sep 21 08:55:48 2024
Restart Database
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.
Total System Global Area 3.4360E+10 bytes
Fixed Size 13693168 bytes
Variable Size 2348810240 bytes
Database Buffers 3.1944E+10 bytes
Redo Buffers 53411840 bytes
Database mounted.
Database opened.
Copy the encryption key to 19c
[oracle@fundb ~]$ mkdir -p /u01/app/oracle/admin/PROD/wallet/
[oracle@fundb ~]$ cp /u01/app/oracle/product/11.2.0.4/dbhome_1/admin/PROD/wallet/ewallet.p12 /u01/app/oracle/admin/PROD/wallet/
sqlplus '/as sysdba'
ALTER SYSTEM SET ENCRYPTION WALLET OPEN IDENTIFIED BY "anything";
Fixing Spatial Component
Connect as SYSDBA and execute below
@$ORACLE_HOME/md/admin/sdopatch.sql
exec sys.VALIDATE_SDO();
Restart the database
Fixing Apex Component
cd /u01/app/oracle/product/19.0.0/apex
Connect as SYSDBA and execute below
drop user APEX_050100 cascade;
@apexins.sql SYSAUX SYSAUX TEMP /i/
Validate the Components now
set line 200;
set pagesize 9999;
col COMP_ID format a15;
col COMP_NAME format a40;
col STATUS format a15;
select COMP_ID,COMP_NAME,STATUS,version from dba_registry;
COMP_ID COMP_NAME STATUS VERSION
--------------- ---------------------------------------- --------------- --------------
CATALOG Oracle Database Catalog Views VALID 19.0.0.0.0
CATPROC Oracle Database Packages and Types VALID 19.0.0.0.0
JAVAVM JServer JAVA Virtual Machine VALID 19.0.0.0.0
CATJAVA Oracle Database Java Packages VALID 19.0.0.0.0
XML Oracle XDK VALID 19.0.0.0.0
RAC Oracle Real Application Clusters OPTION OFF 19.0.0.0.0
APS OLAP Analytic Workspace VALID 19.0.0.0.0
ORDIM Oracle Multimedia VALID 19.0.0.0.0
SDO Spatial UPGRADED 19.0.0.0.0
CONTEXT Oracle Text VALID 19.0.0.0.0
XOQ Oracle OLAP API VALID 19.0.0.0.0
XDB Oracle XML Database VALID 19.0.0.0.0
APEX Oracle Application Express VALID 18.2.0.00.12
13 rows selected.
Compile Invalid Objects
sqlplus "/ as sysdba" @$ORACLE_HOME/rdbms/admin/utlrp.sql
10) Moving the NON-CDB 19c DB to DBCS 19c Home
On DBCS 19c
cp /tmp/ewallet.p12 /opt/oracle/dcs/commonstore/wallets/tde/PROD/
I will move the data from Source 19c NON CDB to DBCS 19c using active duplicate.
On OCI DBCS system as oracle user add below in the listener.ora file
Shut down listener running from grid home.
[oracle@ebsdboci admin]$ vi listener.ora
PROD_CL =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.2.1)(PORT = 1522))
)
)
SID_LIST_PROD_CL =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME= /u01/app/oracle/product/19.0.0.0/dbhome_1)
(SID_NAME = PROD)
)
)
Start listener
[oracle@ebsdboci admin]$ lsnrctl start PROD_CL
Onpremises VM
Copy the tnsnames.ora ,sqlnet.ora and listener.ora from 11g home to 19c home on-prem server.
if static listener registration is not present then add and start listener
PROD =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.2.7)(PORT = 1521))
)
)
SID_LIST_PROD =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME= /u01/app/oracle/product/11.2.0.4/dbhome_1)
(SID_NAME = PROD)
)
)
Add the below entries on tnsnames.ora on both sides
SOURCE=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.2.7)(PORT = 1521)))(CONNECT_DATA =(ORACLE_SID = PROD)))
TARGET_CL=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.2.1)(PORT =1522)))(CONNECT_DATA =(ORACLE_SID = PROD)))
Validate tnsping is wokring on both tns entries.
On 19c on premises create password file and copy to targte DBCS ORACLE_HOME/dbsid
orapwd file=orapwPROD password=oracle123
In case we are changing SID On target DBCS
copy the password file as orapwPROD to orapwNEWSID
create parameter file
vi initPROD.ora
Add below entry
DB_NAME=PROD
DB_UNIQUE_NAME=PROD_CL
DB_BLOCK_SIZE=8192
export ORACLE_SID=PROD
export ORACLE_UNQNAME=PROD_CL
Copy wallet from source to target.
cp ewallet.p12 /opt/oracle/dcs/commonstore/wallets/PROD_CL/tde
Startup nomount
SQL> startup nomount
ORACLE instance started.
Total System Global Area 436206376 bytes
Fixed Size 8940328 bytes
Variable Size 285212672 bytes
Database Buffers 134217728 bytes
Redo Buffers 7835648 bytes
SQL> ALTER SYSTEM SET ENCRYPTION WALLET OPEN IDENTIFIED BY "anything";
System altered.
SQL> administer key management create LOCAL auto_login keystore from keystore '/opt/oracle/dcs/commonstore/wallets/PROD_CL/tde/' identified by anything; --> .sso file will be created.
SQL> select * from v$encryption_wallet;
WRL_TYPE
--------------------
WRL_PARAMETER
--------------------------------------------------------------------------------
STATUS WALLET_TYPE WALLET_OR KEYSTORE FULLY_BAC
------------------------------ -------------------- --------- -------- ---------
CON_ID
----------
FILE
/opt/oracle/dcs/commonstore/wallets/PROD_CL/tde/
OPEN PASSWORD SINGLE NONE NO
0
On DBCS
Create the ASM directory structure
$ sudo su - grid
$ asmcmd
ASMCMD> mkdir +DATA/PRODCDB_DC/PROD
ASMCMD> mkdir +DATA/PRODCDB_DC/PROD/DATAFILE
ASMCMD> mkdir +RECO/PRODCDB_DC/PROD
ASMCMD> mkdir +RECO/PRODCDB_DC/PROD/ONLINELOG
vi rman_duplicate.cmd
set encryption off;RUN {
ALLOCATE AUXILIARY CHANNEL c1 DEVICE TYPE DISK;
ALLOCATE AUXILIARY CHANNEL c2 DEVICE TYPE DISK;
ALLOCATE AUXILIARY CHANNEL c3 DEVICE TYPE DISK;
ALLOCATE AUXILIARY CHANNEL c4 DEVICE TYPE DISK;
ALLOCATE AUXILIARY CHANNEL c5 DEVICE TYPE DISK;
ALLOCATE AUXILIARY CHANNEL c6 DEVICE TYPE DISK;
ALLOCATE AUXILIARY CHANNEL c7 DEVICE TYPE DISK;
ALLOCATE AUXILIARY CHANNEL c8 DEVICE TYPE DISK;
DUPLICATE TARGET DATABASE TO PROD
FROM ACTIVE DATABASE
spfile
SET CONTROL_FILES='+DATA','+RECO'
set db_unique_name='PROD'
set db_file_name_convert='/u02/PROD/db/data','+DATA/PRODCDB_DC/PROD/datafile','/u03/PROD/db/data','+DATA/PRODCDB_DC/PROD/datafile','/u04/PROD/db/data','+DATA/PRODCDB_DC/PROD/datafile'
set log_file_name_convert='/u03/PROD/db/data','+RECO/PRODCDB_DC/PROD/onlinelog','/u02/PROD/db/data','+RECO/PRODCDB_DC/PROD/onlinelog'
set diagnostic_dest='/u01/app/oracle'
set log_archive_dest_1='LOCATION=/u01/app/oracle'
NOFILENAMECHECK;
}
export TNS_ADMIN=/u01/app/oracle/product/19.0.0.0/dbhome_1/network/admin
Validate connectivity
sqlplus /nolog
connect sys/oracle123@SOURCE AS SYSDBA
connect sys/oracle123@TARGET_CL AS SYSDBA
Run RMAN command to duplicate.
rman target sys/oracle123@SOURCE auxiliary sys/oracle123@TARGET_CL cmdfile=rman_duplicate.cmd
Validate Database after duplicate finishes
SQL> select name from v$database;
NAME
---------
PROD
11) Move the datafiles to OMF format for 19c NON CDB which we moved to DBCS.
12) Additional steps to be performed on NON container 19c DB
export ORACLE_SID=PROD
export ORACLE_UNQNAME=PROD_CL
Add the following entry to the Oracle 19c non-CDB $ORACLE_HOME/network/admin/sqlnet.ora file on each of the Oracle RAC nodes:
SQLNET.ALLOWED_LOGON_VERSION_SERVER=10
Copy latest adgrants.sql script and run on 19c non container database using the following command:
Take the script from application server.
$ sqlplus / as sysdba @adgrants.sql apps
Grant CREATE PROCEDURE privilege to CTXSYS by running adctxprv.sql. Connect to the database as APPS and run the script using the following command:
Take the script from application server.
$ sqlplus apps/[APPS password] @$ORACLE_HOME/admin/adctxprv.sql [SYSTEM password] CTXSYS
sqlplus apps/apps @adctxprv.sql oracle123 CTXSYS
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
Connect to the database as SYSDBA and install the Object Label Security (OLS) component by running the catols.sql script as follows:
$ sqlplus "/ as sysdba"
SQL> @$ORACLE_HOME/rdbms/admin/catols.sql
Run the catmac.sql script to install the Database Vault (DV) component:
$ sqlplus "/ as sysdba"
SQL> @$ORACLE_HOME/rdbms/admin/catmac.sql SYSTEM <TEMP tablespace>
@$ORACLE_HOME/rdbms/admin/catmac.sql SYSTEM TEMP1
Run the following to grant DATASTORE ACCESS to PUBLIC:
$ sqlplus "/ as sysdba"
SQL> grant text datastore access to public;
Run adstats.sql to gather statistics for the SYS schema:
Take the script from application server.
$ sqlplus "/ as sysdba"
SQL> alter system enable restricted session;
SQL> @adstats.sql
$ sqlplus "/ as sysdba"
SQL> alter system disable restricted session;
SQL> exit;
13) Plug in Oracle Database 19c Non-CDB Database as a PDB
Ensure that TEMP table space contains at least 5GB available space:
$ export ORACLE_SID=<non-CDB_SID>
$ export ORACLE_UNQNAME=<non-CDB_SID uniquename>
$ sqlplus '/ as sysdba'
alter system set compatible='19.0.0.0' scope=spfile; --> based on value in CDB database.
SQL>
col TABLESPACE_NAME format a16
col TABLESPACE_SIZE format 999,999,999,999
col FREE_SPACE format 999,999,999,999
select TABLESPACE_NAME, TABLESPACE_SIZE, FREE_SPACE
from DBA_TEMP_FREE_SPACE;
Shut down and restart the non-CDB database in READ ONLY mode:
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database open read only;
Note: It is important the $ORACLE_UNQNAME is set correctly to the <$ORACLE_UNQNAME> with the correct case as this environment variable is part of the TDE ENCRYPTED_WALLET_LOCATION in the sqlnet.ora
Create a descriptor file $ORACLE_HOME/dbs/<PDB name>_PDBDesc.xml for the non-CDB that is to be plugged in.
SQL> BEGIN
DBMS_PDB.DESCRIBE(pdb_descr_file => '<19c Oracle Home>/dbs/<PDB name>_PDBDesc.xml');
end;
/
Note: The <PDB name> is the non-CDB database name. The non-CDB database must be open as READ ONLY when creating the PDB descriptor file.
Shut down the upgraded non-CDB database:
SQL> shutdown immediate;
The non-CDB database is now marked for plugging in as a PDB and it should not be opened as a normal database.
Update the initialization parameters on the Oracle 19c Container Database.
Set the CDB environment, mount the primary CDB instance and run <DB_NAME>_initparam.sql manually with sysdba privileges as per the following code. This file was created in 11g home and being used copied to DBCS $ORACLE_HOME/dbs
$ export ORACLE_HOME=<19c Oracle Home>
$ export ORACLE_SID=<CDB_SID>
$ export ORACLE_UNQNAME=<19c $ORACLE_UNQNAME>
$ export PATH=$ORACLE_HOME/bin:$PATH
$ sqlplus / as sysdba
SQL> startup nomount;
SQL> @$ORACLE_HOME/dbs/<DB_NAME>_initparam.sql
SQL> shutdown;
Restart the primary instance of the CDB for the initialization parameters to take effect.
Non-RAC:
$ srvctl start database -d PROD_CL
Run txkChkPDBCompatability.pl using the following commands.
This will perform prerequisite checks prior to plugging in the database as a PDB, and report any error conditions you need to fix before you proceed to the plugin phase:
$ cd <19c Oracle Home>/appsutil
$ . ./txkSetCfgCDB.env dboraclehome=<19c Oracle Home>
$ export ORACLE_SID=<19c CDB SID>
$ export ORACLE_UNQNAME=<19c $ORACLE_UNQNAME>
$ export TNS_ADMIN=<19c Oracle Home>/network/admin
$ perl $ORACLE_HOME/appsutil/bin/txkChkPDBCompatability.pl \
-dboraclehome=<19c Oracle Home> \
-outdir=<19c Oracle Home>/appsutil/log \
-cdbsid=<19c CDB SID> \
-pdbsid=<EBS Database name to be plugged in>
$ cd /u01/app/oracle/product/19.0.0.0/dbhome_1/appsutil
$ . ./txkSetCfgCDB.env dboraclehome=/u01/app/oracle/product/19.0.0.0/dbhome_1
$ export ORACLE_SID=PRODCDB
$ export ORACLE_UNQNAME=PRODCDB_DC
$ export TNS_ADMIN=/u01/app/oracle/product/19.0.0.0/dbhome_1/network/admin
$ perl $ORACLE_HOME/appsutil/bin/txkChkPDBCompatability.pl \
-dboraclehome=/u01/app/oracle/product/19.0.0.0/dbhome_1 \
-outdir=/u01/app/oracle/product/19.0.0.0/dbhome_1/appsutil/log \
-cdbsid=PRODCDB \
-pdbsid=PROD
Set Local listener parameter in CDB
alter system set local_listener =<node_name1>:<Grid Listener Port> ;
alter system set local_listener ='10.1.2.1:1521'
Plug the database into CDB
mkdir -p /u01/app/oracle/product/19.0.0.0/dbhome_1/appsutil/log
Run the script txkCreatePDB.pl as follows:
$ cd <19c Oracle Home>/appsutil
$ . ./txkSetCfgCDB.env dboraclehome=<19c Oracle Home>
$ export ORACLE_SID=<CDB SID>
$ export ORACLE_UNQNAME=<19c $ORACLE_UNQNAME>
$ export TNS_ADMIN=<19c Oracle Home>/network/admin
$ perl $ORACLE_HOME/appsutil/bin/txkCreatePDB.pl \
-dboraclehome=<19c Oracle Home> \
-outdir=<19c Oracle Home>/appsutil/log \
-dbuniquename=<CDB db_unique_name> \
-cdbsid=<CDB SID of the current RAC Node> \
-pdbsid=<EBS Database name to be plugged in> \
-noncdbdatadir=+DATA/<CDB db_unique_name>/<11g non-CDB name>/DATAFILE,+DATA/<CDB db_unique_name>/<11g non-CDB name>/TEMPFILE \
-pdbdatadir=+DATA/<CDB db_unique_name>/<11g non-CDB name>/DATAFILE,+DATA/<CDB db_unique_name>/<11g non-CDB name>/TEMPFILE \
-servicetype=dbsystem \
-istdeenabled=yes \
-promptsecretkey=yes \
-secretkeyfile=<export key file with full path created in Section 5.3 above> \
-keystoreloc=<19c CDB WALLET_LOCATION>
When prompted, enter the Oracle Database 19c CDB wallet password and the secret key password created earlier.
Enter the CDB wallet password: --> When we created. the DBCS same password should be by default if we have not changed.
Enter the secret key: 11g wallet password
If any issues are there then fix and rerun
14) Implement Autoconfig in Pluggable Database
If you are using the Grid listener, set the USE_SID_AS_SERVICE_<LISTENER_NAME>=ON parameter in the $GRID_HOME/network/admin/listener.ora file and restart the listener :
USE_SID_AS_SERVICE_<LISTENER_NAME>=ON
Set the environment for the CDB:
cd /u01/app/oracle/product/19.0.0.0/dbhome_1/appsutil
. ./txkSetCfgCDB.env dboraclehome=/u01/app/oracle/product/19.0.0.0/dbhome_1
export ORACLE_SID=PRODCDB
export ORACLE_UNQNAME=PRODCDB_DC
export TNS_ADMIN=/u01/app/oracle/product/19.0.0.0/dbhome_1/network/admin
Add the following entry to the Oracle 19c $ORACLE_HOME/network/admin/sqlnet.ora file:
SQLNET.ALLOWED_LOGON_VERSION_SERVER=10
As part of the migration from the UTL_FILE_DIR parameter, we're now using database objects for PL/SQL File I/O. All directories specified by these database objects must exist on the 19c Oracle DB System file system. Create them using the commands based on the following example:
$ mkdir -p <19c Oracle Home>/temp/<PDB NAME>
$ mkdir -p <19c ORACLE_HOME>/appsutil/outbound/<context name>
mkdir -p /u01/app/oracle/product/19.0.0.0/dbhome_1/temp/PROD
mkdir -p /u01/app/oracle/product/19.0.0.0/dbhome_1/appsutil/outbound/PROD_ebsdb
Run the following script to implement AutoConfig.
When prompted, provide the APPS user password and SYSTEM user password for the CDB.
$ perl $ORACLE_HOME/appsutil/bin/txkPostPDBCreationTasks.pl \
-dboraclehome=<19c Oracle Home> \
-outdir=<19c Oracle Home>/appsutil/log \
-cdbname=<CDB name> \
-dbuniquename=<CDB db_unique_name> \
-cdbsid=<CDB Instance Name> \
-pdbsid=<PDB Name> \
-appsuser=<apps user> \
-israc=<yes/no> \
-virtualhostname=<VIP Hostname> \
-dbport=<EBS DB port> \
-scanhostname=<Scan name> \
-scanport=<Scan Port> \
-servicetype=dbsystem
The scan name can be obtained by running the following command from the database Oracle Home:
$ srvctl config scan
perl $ORACLE_HOME/appsutil/bin/txkPostPDBCreationTasks.pl \
-dboraclehome=/u01/app/oracle/product/19.0.0.0/dbhome_1 \
-outdir=/u01/app/oracle/product/19.0.0.0/dbhome_1/appsutil/log \
-cdbname=PRODCDB \
-dbuniquename=PRODCDB_DC \
-cdbsid=PRODCDB \
-pdbsid=PROD \
-appsuser=apps \
-israc=no \
-dbport=1521 \
-servicetype=dbsystem
sh adautocfg.sh
Modify the initialization parameters for the PDB(based on requirement)
alter system set pga_aggregate_target=12G;
Enable Archive mode in database
$ sqlplus / as sysdba
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database archivelog;
SQL> select log_mode from v$database;
LOG_MODE
------------
ARCHIVELOG
SQL> alter database open;
Post a Comment
Post a Comment