Tuesday, July 29, 2025

Oracle Database upgrade from 12c to 19c (Manual)

  • Introduction: As Oracle 19c stands as the Long-Term Support (LTS) release in Oracle’s database roadmap, upgrading from Oracle 12c is not merely a version shift—it’s a strategic move to maintain support, unlock advanced features, and ensure long-term performance, stability, and compliance. In this article, we will see how to upgrade the database from 12c to 19c step by step.

  • Methods of Upgradation:
    1. Using DBUA (Database Upgrade Assistant)
    2. Using Manual method
    3. Using autoupgrade.jar
    We have already covered the upgrade using DBUA. Please visit Upgrade Using DBUA
    In this article we will use Manual method for upgrade.

  • Prerequisites:
    • 12c binary installed with database.
    • 19c binary installed without database.
    • Sufficient disk space for tablespace & archive growth.
    • Minimum 6 hrs downtime for Production database.
  • Environment:
  • Source Database
    Hostname devdb.oraeasy.com
    Database Name DEVDB
    Database Version 12c(12.2.0.1)
    CDB/PDB Yes, Single Instance
    Oracle Home /u01/app/oracle/product/12c/db_1
    Datafile Location /u01/app/oracle/oradata/devdb

    Target Database
    Database Version 19c (19.3.0.0.0)
    Oracle Home /u01/app/oracle/product/19c/db_home

  • Now proceed for upgradation activity step by step:

1. Take precheck at source.
First create a table with test user so that data can be validated post upgradation:

SQL> show user
USER is "TEST"
SQL>
SQL> def
DEFINE _DATE           = "28-JUL-25" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "DEVDBPDB" (CHAR)
DEFINE _USER           = "TEST" (CHAR)
DEFINE _PRIVILEGE      = "" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1202000100" (CHAR)
DEFINE _EDITOR         = "vi" (CHAR)
DEFINE _O_VERSION      = "Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production" (CHAR)
DEFINE _O_RELEASE      = "1202000100" (CHAR)
SQL>
SQL> CREATE TABLE COMPANY (EMP_ID INT,NAME VARCHAR(255), COMPANY VARCHAR(255));

Table created.

SQL>
SQL> INSERT INTO COMPANY VALUES (101,'Yash','WIPRO');

1 row created.

SQL>
SQL> INSERT INTO COMPANY VALUES (102,'Vijay','AIRTEL');

1 row created.

SQL> INSERT INTO COMPANY VALUES (103,'Riya','TCS');

1 row created.

SQL> commit;

Commit complete.

SQL> select count(*) from COMPANY;

  COUNT(*)
----------
         3

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Now take Precheck like Tablespace, Invalid object count & Registery Components:

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 DEVDBPDB                       READ WRITE NO
         
SQL> set lines 200 pages 1000
SQL> select t.tablespace,  t.totalspace as " Totalspace(MB)",
round((t.totalspace-nvl(fs.freespace,0)),2) as "Used Space(MB)",
nvl(fs.freespace,0) as "Freespace(MB)",
round(((t.totalspace-nvl(fs.freespace,0))/t.totalspace)*100,2) as "%Used",
round((nvl(fs.freespace,0)/t.totalspace)*100,2) as "% Free"
from
(select round(sum(d.bytes)/(1024*1024)) as totalspace,d.tablespace_name tablespace
from dba_data_files d
group by d.tablespace_name) t,
(select round(sum(f.bytes)/(1024*1024)) as freespace,f.tablespace_name tablespace
from dba_free_space f
group by f.tablespace_name) fs
where t.tablespace=fs.tablespace (+)
order by "% Free";
SQL>  

TABLESPACE                      Totalspace(MB) Used Space(MB) Freespace(MB)      %Used     % Free
------------------------------ --------------- -------------- ------------- ---------- ----------
SYSTEM                                     800            796             4       99.5         .5
UNDOTBS1                                    70             66             4      94.29       5.71
SYSAUX                                     470            442            28      94.04       5.96
USERS                                        5              1             4         20         80

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

  COUNT(*)
----------
         0
         
SQL> col COMP_ID for a10
SQL> col COMP_NAME for a40
SQL> col VERSION for a15
SQL> set lines 180
SQL> set pages 9998
SQL> select COMP_ID,COMP_NAME,VERSION,STATUS from dba_registry;

COMP_ID    COMP_NAME                                VERSION         STATUS
---------- ---------------------------------------- --------------- ---------------
CATALOG    Oracle Database Catalog Views            12.2.0.1.0      VALID
CATPROC    Oracle Database Packages and Types       12.2.0.1.0      VALID
JAVAVM     JServer JAVA Virtual Machine             12.2.0.1.0      VALID
XML        Oracle XDK                               12.2.0.1.0      VALID
CATJAVA    Oracle Database Java Packages            12.2.0.1.0      VALID
APS        OLAP Analytic Workspace                  12.2.0.1.0      VALID
RAC        Oracle Real Application Clusters         12.2.0.1.0      OPTION OFF
XDB        Oracle XML Database                      12.2.0.1.0      VALID
OWM        Oracle Workspace Manager                 12.2.0.1.0      VALID
CONTEXT    Oracle Text                              12.2.0.1.0      VALID
ORDIM      Oracle Multimedia                        12.2.0.1.0      VALID
SDO        Spatial                                  12.2.0.1.0      VALID
XOQ        Oracle OLAP API                          12.2.0.1.0      VALID
OLS        Oracle Label Security                    12.2.0.1.0      VALID
DV         Oracle Database Vault                    12.2.0.1.0      VALID

15 rows selected.

SQL> alter session set container=DEVDBPDB;

Session altered.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         3 DEVDBPDB                       READ WRITE NO

SQL> set lines 200 pages 1000
SQL> select t.tablespace,  t.totalspace as " Totalspace(MB)",
round((t.totalspace-nvl(fs.freespace,0)),2) as "Used Space(MB)",
nvl(fs.freespace,0) as "Freespace(MB)",
round(((t.totalspace-nvl(fs.freespace,0))/t.totalspace)*100,2) as "%Used",
round((nvl(fs.freespace,0)/t.totalspace)*100,2) as "% Free"
from
(select round(sum(d.bytes)/(1024*1024)) as totalspace,d.tablespace_name tablespace
from dba_data_files d
group by d.tablespace_name) t,
(select round(sum(f.bytes)/(1024*1024)) as freespace,f.tablespace_name tablespace
from dba_free_space f
group by f.tablespace_name) fs
where t.tablespace=fs.tablespace (+)
order by "% Free";
SQL>  

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

  COUNT(*)
----------
         0

SQL> select COMP_ID,COMP_NAME,VERSION,STATUS from dba_registry;

COMP_ID    COMP_NAME                                VERSION         STATUS
---------- ---------------------------------------- --------------- -----------------
CATALOG    Oracle Database Catalog Views            12.2.0.1.0      VALID
CATPROC    Oracle Database Packages and Types       12.2.0.1.0      VALID
JAVAVM     JServer JAVA Virtual Machine             12.2.0.1.0      VALID
XML        Oracle XDK                               12.2.0.1.0      VALID
CATJAVA    Oracle Database Java Packages            12.2.0.1.0      VALID
APS        OLAP Analytic Workspace                  12.2.0.1.0      VALID
RAC        Oracle Real Application Clusters         12.2.0.1.0      OPTION OFF
XDB        Oracle XML Database                      12.2.0.1.0      VALID
OWM        Oracle Workspace Manager                 12.2.0.1.0      VALID
CONTEXT    Oracle Text                              12.2.0.1.0      VALID
ORDIM      Oracle Multimedia                        12.2.0.1.0      VALID
SDO        Spatial                                  12.2.0.1.0      VALID
XOQ        Oracle OLAP API                          12.2.0.1.0      VALID
OLS        Oracle Label Security                    12.2.0.1.0      VALID
DV         Oracle Database Vault                    12.2.0.1.0      VALID

15 rows selected.
2. Now we need to perform few steps before the upgradation. Below steps should be performed on CDB & each PDBs.

==> Gather Dictonary stats.

SQL> SET ECHO ON; SQL> SET SERVEROUTPUT ON; SQL> EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS; PL/SQL procedure successfully completed.

==> Recycle bin purging.

SQL> PURGE DBA_RECYCLEBIN; DBA Recyclebin purged.

==> Refresh Materlized views.

SQL> declare list_failures integer(3) :=0; begin DBMS_MVIEW.REFRESH_ALL_MVIEWS(list_failures,'C','', TRUE, FALSE); end; / PL/SQL procedure successfully completed.

==> Create a guarnteed flashback restore point for rollback (at CDB).

SQL> archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 5 Next log sequence to archive 7 Current log sequence 7 SQL> SQL> SQL> select flashback_on from v$database; FLASHBACK_ON ------------------ NO SQL> SQL> alter database flashback on; Database altered. SQL> select flashback_on from v$database; FLASHBACK_ON ------------------ YES SQL> select name,open_mode,log_mode from v$database; NAME OPEN_MODE LOG_MODE --------- -------------------- ------------ DEVDB READ WRITE ARCHIVELOG SQL> show parameter compatible NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ compatible string 12.2.0 noncdb_compatible boolean FALSE SQL> show parameter recovery NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string /u01/app/oracle/fast_recovery_ area/devdb db_recovery_file_dest_size big integer 5G db_unrecoverable_scn_tracking boolean TRUE recovery_parallelism integer 0 remote_recovery_file_dest string SQL> SQL> SQL> alter system set db_recovery_file_dest_size=15G; System altered. SQL> show parameter recovery NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string /u01/app/oracle/fast_recovery_ area/devdb db_recovery_file_dest_size big integer 15G db_unrecoverable_scn_tracking boolean TRUE recovery_parallelism integer 0 remote_recovery_file_dest string SQL> SQL> select * from V$restore_point; no rows selected. SQL> create restore point pre_upgrade12c guarantee flashback database; Restore point created. SQL> SQL> col name for a20 SQL> col GUARANTEE_FLASHBACK_DATABASE for a10 SQL> col TIME for a60 SQL> set lines 190 SQL> select NAME,GUARANTEE_FLASHBACK_DATABASE,TIME from V$restore_point; NAME GUARANTEE_ TIME -------------------- ---------- ------------------------------------------------------------ PRE_UPGRADE12C YES 28-JUL-25 10.39.05.000000000 AM SQL>
3. Now run the preupgrade script.

[oracle@devdb ~]$ mkdir preupgrade
[oracle@devdb ~]$ cd preupgrade/
[oracle@devdb preupgrade]$ pwd
/home/oracle/preupgrade

[oracle@devdb preupgrade]$ ls /u01/app/oracle/product/19c/db_home/rdbms/admin/preupgrade.jar
/u01/app/oracle/product/19c/db_home/rdbms/admin/preupgrade.jar

[oracle@devdb preupgrade]$ /u01/app/oracle/product/12c/db_1/jdk/bin/java -jar  /u01/app/oracle/product/19c/db_home/rdbms/admin/preupgrade.jar FILE DIR /home/oracle/preupgrade
==================
PREUPGRADE SUMMARY
==================
  /home/oracle/preupgrade/preupgrade.log
  /home/oracle/preupgrade/preupgrade_fixups.sql
  /home/oracle/preupgrade/postupgrade_fixups.sql

Execute fixup scripts across the entire CDB:

Before upgrade:

1. Execute preupgrade fixups with the below command
$ORACLE_HOME/perl/bin/perl -I$ORACLE_HOME/perl/lib -I$ORACLE_HOME/rdbms/admin $ORACLE_HOME/rdbms/admin/catcon.pl -l /home/oracle/preupgrade/ -b preup_devdb /home/oracle/preupgrade/preupgrade_fixups.sql

2. Review logs under /home/oracle/preupgrade/

After the upgrade:

1. Execute postupgrade fixups with the below command
$ORACLE_HOME/perl/bin/perl -I$ORACLE_HOME/perl/lib -I$ORACLE_HOME/rdbms/admin $ORACLE_HOME/rdbms/admin/catcon.pl -l /home/oracle/preupgrade/ -b postup_devdb /home/oracle/preupgrade/postupgrade_fixups.sql

2. Review logs under /home/oracle/preupgrade/

Preupgrade complete: 2025-07-28T10:43:32
[oracle@devdb preupgrade]$
4. Now run the preupgrade_fixups.sql for CDB & each PDBs.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 DEVDBPDB                       READ WRITE NO
SQL>
SQL>
SQL> @/home/oracle/preupgrade/preupgrade_fixups.sql
Executing Oracle PRE-Upgrade Fixup Script

Auto-Generated by:       Oracle Preupgrade Script
                         Version: 19.0.0.0.0 Build: 1
Generated on:            2025-07-28 10:42:11

For Source Database:     DEVDB
Source Database Version: 12.2.0.1.0
For Upgrade to Version:  19.0.0.0.0

Executing in container:  CDB$ROOT

Preup                             Preupgrade
Action                            Issue Is
Number  Preupgrade Check Name     Remedied    Further DBA Action
------  ------------------------  ----------  --------------------------------
    1.  pre_fixed_objects         YES         None.
    2.  tablespaces_info          NO          Informational only.
                                              Further action is optional.
    3.  cycle_number              NO          Informational only.
                                              Further action is optional.
    4.  rman_recovery_version     NO          Informational only.
                                              Further action is optional.

The fixup scripts have been run and resolved what they can. However,
there are still issues originally identified by the preupgrade that
have not been remedied and are still present in the database.
Depending on the severity of the specific issue, and the nature of
the issue itself, that could mean that your database is not ready
for upgrade.  To resolve the outstanding issues, start by reviewing
the preupgrade_fixups.sql and searching it for the name of
the failed CHECK NAME or Preupgrade Action Number listed above.
There you will find the original corresponding diagnostic message
from the preupgrade which explains in more detail what still needs
to be done.

PL/SQL procedure successfully completed.


Session altered.

SQL>

==> For PDB.

SQL> alter session set container=DEVDBPDB; Session altered. SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 3 DEVDBPDB READ WRITE NO SQL> @/home/oracle/preupgrade/preupgrade_fixups.sql Executing Oracle PRE-Upgrade Fixup Script Auto-Generated by: Oracle Preupgrade Script Version: 19.0.0.0.0 Build: 1 Generated on: 2025-07-28 10:42:11 For Source Database: DEVDB Source Database Version: 12.2.0.1.0 For Upgrade to Version: 19.0.0.0.0 Executing in container: DEVDBPDB Preup Preupgrade Action Issue Is Number Preupgrade Check Name Remedied Further DBA Action ------ ------------------------ ---------- -------------------------------- 1. pre_fixed_objects YES None. 2. tablespaces_info NO Informational only. Further action is optional. The fixup scripts have been run and resolved what they can. However, there are still issues originally identified by the preupgrade that have not been remedied and are still present in the database. Depending on the severity of the specific issue, and the nature of the issue itself, that could mean that your database is not ready for upgrade. To resolve the outstanding issues, start by reviewing the preupgrade_fixups.sql and searching it for the name of the failed CHECK NAME or Preupgrade Action Number listed above. There you will find the original corresponding diagnostic message from the preupgrade which explains in more detail what still needs to be done. PL/SQL procedure successfully completed. Session altered. SQL>
5. Now shutdown the 12c database and listener.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 DEVDBPDB                       READ WRITE NO
SQL>
SQL>  select name,open_mode,cdb,version,status from v$database, v$instance;

NAME      OPEN_MODE            CDB VERSION           STATUS
--------- -------------------- --- ----------------- ------------
DEVDB     READ WRITE           YES 12.2.0.1.0        OPEN

SQL>
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
[oracle@devdb ~]$
[oracle@devdb ~]$ lsnrctl stop

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 28-JUL-2025 10:54:36

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
The command completed successfully
6. Now copy spfile & password file from 12c ORACLE HOME to 19c ORACLE HOME.

[oracle@devdb ~]$ cd $ORACLE_HOME/dbs
[oracle@devdb dbs]$
[oracle@devdb dbs]$ ls -lrth
total 18M
-rw-r--r--. 1 oracle oinstall 3.1K May 15  2015 init.ora
-rw-r-----. 1 oracle oinstall   24 Jul  8 19:16 lkDEVDB
-rw-r-----. 1 oracle oinstall 3.5K Jul  8 19:26 orapwdevdb
-rw-r-----. 1 oracle oinstall  18M Jul 28 10:35 snapcf_devdb.f
-rw-r-----. 1 oracle oinstall 3.5K Jul 28 10:51 spfiledevdb.ora
-rw-rw----. 1 oracle oinstall 1.6K Jul 28 10:55 hc_devdb.dat
[oracle@devdb dbs]$
[oracle@devdb dbs]$ cp orapwdevdb spfiledevdb.ora /u01/app/oracle/product/19c/db_home/dbs/
[oracle@devdb dbs]$
[oracle@devdb dbs]$
[oracle@devdb dbs]$ ls -lrth /u01/app/oracle/product/19c/db_home/dbs/
total 12K
-rw-r--r--. 1 oracle oinstall 3.1K May 14  2015 init.ora
-rw-r-----. 1 oracle oinstall 3.5K Jul 28 10:57 spfiledevdb.ora
-rw-r-----. 1 oracle oinstall 3.5K Jul 28 10:57 orapwdevdb
[oracle@devdb dbs]$

7. Now set the environment for 19c and start database in UPGRADE mode.

[oracle@devdb ~]$ export ORACLE_HOME=/u01/app/oracle/product/19c/db_home
[oracle@devdb ~]$ export ORACLE_SID=devdb
[oracle@devdb ~]$ cd /u01/app/oracle/product/19c/db_home/bin/
[oracle@devdb bin]$ ./sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 28 11:00:32 2025
Version 19.3.0.0.0

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

Connected to an idle instance.

SQL>
SQL> startup upgrade
ORACLE instance started.

Total System Global Area 1174405120 bytes
Fixed Size                  9134080 bytes
Variable Size             419430400 bytes
Database Buffers          738197504 bytes
Redo Buffers                7643136 bytes
Database mounted.
Database opened.
SQL>
SQL> select name,open_mode,cdb,version,status from v$database, v$instance;

NAME      OPEN_MODE            CDB VERSION           STATUS
--------- -------------------- --- ----------------- ------------
DEVDB     READ WRITE           YES 19.0.0.0.0        OPEN MIGRATE

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       MIGRATE    YES
         3 DEVDBPDB                       MOUNTED
SQL>
SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /u01/app/oracle/product/19c/db
                                                 _home/dbs/spfiledevdb.ora
SQL>

8. Now run the dbupgrade from 19c ORACLE HOME.

[oracle@devdb bin]$ pwd
/u01/app/oracle/product/19c/db_home/bin
[oracle@devdb bin]$
[oracle@devdb bin]$ ls -lrth dbupgrade
-rwxr-x---. 1 oracle oinstall 3.1K Apr 17  2019 dbupgrade
[oracle@devdb bin]$
[oracle@devdb bin]$ nohup ./dbupgrade &
[1] 14989
[oracle@devdb bin]$ nohup: ignoring input and appending output to ‘nohup.out’

[oracle@devdb bin]$
[oracle@devdb bin]$ jobs -l
[1]+ 14989 Running                 nohup ./dbupgrade &
[oracle@devdb bin]$
[oracle@devdb bin]$ ps -ef | grep -i catctl.pl
oracle   14994 14989  2 11:05 pts/1    00:00:00 /u01/app/oracle/product/19c/db_home/perl/bin/perl -I/u01/app/oracle/product/19c/db_home/perl/lib /u01/app/oracle/product/19c/db_home/rdbms/admin/catctl.pl /u01/app/oracle/product/19c/db_home/rdbms/admin/catupgrd.sql
oracle   15138  3828  0 11:05 pts/1    00:00:00 grep --color=auto -i catctl.pl
[oracle@devdb bin]$
9. We can monitor the upgrade logs like below.

[oracle@devdb bin]$ more nohup.out

Argument list for [/u01/app/oracle/product/19c/db_home/rdbms/admin/catctl.pl]
For Oracle internal use only A = 0
Run in                       c = 0
Do not run in                C = 0
Input Directory              d = 0
Echo OFF                     e = 1
Simulate                     E = 0
Forced cleanup               F = 0
Log Id                       i = 0
Child Process                I = 0
Log Dir                      l = 0
Priority List Name           L = 0
Upgrade Mode active          M = 0
SQL Process Count            n = 0
SQL PDB Process Count        N = 0
Open Mode Normal             o = 0
Start Phase                  p = 0
End Phase                    P = 0
Reverse Order                r = 0
AutoUpgrade Resume           R = 0
Script                       s = 0
Serial Run                   S = 0
RO User Tablespaces          T = 0
Display Phases               y = 0
Debug catcon.pm              z = 0
Debug catctl.pl              Z = 0

catctl.pl VERSION: [19.0.0.0.0]
           STATUS: [Production]
            BUILD: [RDBMS_19.3.0.0.0DBRU_LINUX.X64_190417]


/u01/app/oracle/product/19c/db_home/rdbms/admin/orahome = [/u01/app/oracle/product/19c/db_home]
/u01/app/oracle/product/19c/db_home/bin/orabasehome = [/u01/app/oracle/product/19c/db_home]
catctlGetOraBaseLogDir = [/u01/app/oracle/product/19c/db_home]

Analyzing file /u01/app/oracle/product/19c/db_home/rdbms/admin/catupgrd.sql

Log file directory = [/tmp/cfgtoollogs/upgrade20250728110541]

catcon::set_log_file_base_path: ALL catcon-related output will be written to [/tmp/cfgtoollogs/upgrade20250728110541/catupgrd_catcon_14994.lst]

catcon::set_log_file_base_path: catcon: See [/tmp/cfgtoollogs/upgrade20250728110541/catupgrd*.log] files for output generated by scripts

catcon::set_log_file_base_path: catcon: See [/tmp/cfgtoollogs/upgrade20250728110541/catupgrd_*.lst] files for spool files, if any


Number of Cpus        = 2
Database Name         = devdb
DataBase Version      = 12.2.0.1.0
catcon::set_log_file_base_path: ALL catcon-related output will be written to [/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20250728110558/catu
pgrdcdbroot_catcon_14994.lst]

catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20250728110558/catupgrdcdbroot*.log] files for outpu
t generated by scripts

catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20250728110558/catupgrdcdbroot_*.lst] files for spoo
l files, if any


Log file directory = [/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20250728110558]

==> Navigate to log directory.

[oracle@devdb cfgtoollogs]$ cd /u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20250728110558 [oracle@devdb upgrade20250728110558]$ ls -lrth total 4.0M -rw-------. 1 oracle oinstall 556 Jul 28 11:05 catupgrdcdbroot_catcon_14994.lst -rw-r--r--. 1 oracle oinstall 656 Jul 28 11:06 catupgrdcdbroot_catcon_kill_sess_14994_ALL.sql -rw-r--r--. 1 oracle oinstall 63 Jul 28 11:06 catupgrdcdbroot_catcon_15200.done -rw-r--r--. 1 oracle oinstall 63 Jul 28 11:06 catupgrdcdbroot_catcon_15198.done -rw-r--r--. 1 oracle oinstall 63 Jul 28 11:06 catupgrdcdbroot_catcon_15199.done -rw-r--r--. 1 oracle oinstall 4.1K Jul 28 11:06 catupgrdcdbroot_20250728110618_14994.ora -rw-------. 1 oracle oinstall 1.4K Jul 28 11:07 catupgrdcdbroot1.log -rw-------. 1 oracle oinstall 1.4K Jul 28 11:07 catupgrdcdbroot3.log -rw-------. 1 oracle oinstall 1.4K Jul 28 11:07 catupgrdcdbroot2.log -rw-------. 1 oracle oinstall 2.7M Jul 28 11:09 catupgrdcdbroot0.log [oracle@devdb upgrade20250728110558]$ [oracle@devdb upgrade20250728110558]$ tail -100f catupgrdcdbroot0.log 11:09:29 10 OVERLOAD, OBJECT_TYPE, 11:09:29 11 AGGREGATE, PIPELINED, 11:09:29 12 IMPLTYPEOWNER, IMPLTYPENAME, PARALLEL, 11:09:29 13 INTERFACE, DETERMINISTIC, AUTHID, RESULT_CACHE, ORIGIN_CON_ID, 11:09:29 14 POLYMORPHIC 11:09:29 15 from NO_ROOT_SW_FOR_LOCAL(INT$DBA_PROCEDURES) 11:09:29 16 where OWNER = SYS_CONTEXT('USERENV', 'CURRENT_USER') 11:09:29 17 / View created. Elapsed: 00:00:00.07 11:09:30 SQL> 11:09:30 SQL> comment on table USER_PROCEDURES is 11:09:30 2 'Description of the user functions/procedures/packages/types/triggers' 11:09:30 3 / Comment created. Elapsed: 00:00:00.01 11:09:30 SQL> comment on column USER_PROCEDURES.OBJECT_NAME is 11:09:30 2 'Name of the object: top level function/procedure/package/type/trigger name' 11:09:30 3 / Comment created. Elapsed: 00:00:00.02 11:09:30 SQL> comment on column USER_PROCEDURES.PROCEDURE_NAME is 11:09:30 2 'Name of the package or type subprogram' 11:09:30 3 /
10. Post completion, we will get output like below.

------------------------------------------------------
Phases [0-107]         End Time:[2025_07_28 14:12:16]
Container Lists Inclusion:[PDB$SEED] Exclusion:[NONE]
------------------------------------------------------

Grand Total Time: 6455s [PDB$SEED]

 LOG FILES: (/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20250728110558/catupgrdpdb_seed*.log)

Upgrade Summary Report Located in:
/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20250728110558/upg_summary.log

     Time: 4661s For CDB$ROOT
     Time: 6517s For PDB(s)

Grand Total Time: 11178s

 LOG FILES: (/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20250728110558/catupgrdcdbroot*.log)

Upgrade Summary Report Located in:
/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20250728110558/upg_summary.log

Grand Total Upgrade Time:    [0d:3h:6m:18s]
^C
[1]+  Done                    nohup ./dbupgrade
[oracle@devdb bin]$

==> Verify summary.

[oracle@devdb upgrade20250728110558]$ ls -lrth total 209M -rw-------. 1 oracle oinstall 556 Jul 28 11:05 catupgrdcdbroot_catcon_14994.lst -rw-r--r--. 1 oracle oinstall 0 Jul 28 12:08 catupgrdcdbroot_datapatch_upgrade.err -rw-r--r--. 1 oracle oinstall 1.6K Jul 28 12:16 catupgrdcdbroot_datapatch_upgrade.log -rw-------. 1 oracle oinstall 7.8M Jul 28 12:24 catupgrdcdbroot1.log -rw-------. 1 oracle oinstall 5.6M Jul 28 12:24 catupgrdcdbroot2.log -rw-------. 1 oracle oinstall 8.9M Jul 28 12:24 catupgrdcdbroot3.log -rw-------. 1 oracle oinstall 558 Jul 28 12:24 catupgrdpdb_seed_catcon_530.lst -rw-------. 1 oracle oinstall 558 Jul 28 12:24 catupgrddevdbpdb_catcon_533.lst -rw-r--r--. 1 oracle oinstall 0 Jul 28 13:50 catupgrddevdbpdb_datapatch_upgrade.err -rw-r--r--. 1 oracle oinstall 0 Jul 28 13:50 catupgrdpdb_seed_datapatch_upgrade.err -rw-r--r--. 1 oracle oinstall 1.6K Jul 28 13:55 catupgrdpdb_seed_datapatch_upgrade.log -rw-r--r--. 1 oracle oinstall 1.6K Jul 28 13:55 catupgrddevdbpdb_datapatch_upgrade.log -rw-r--r--. 1 oracle oinstall 11K Jul 28 14:00 catupgrddevdbpdb_stderr.log -rw-------. 1 oracle oinstall 57M Jul 28 14:00 catupgrddevdbpdb0.log -rw-------. 1 oracle oinstall 13M Jul 28 14:00 catupgrddevdbpdb1.log -rw-r--r--. 1 oracle oinstall 11K Jul 28 14:12 catupgrdpdb_seed_stderr.log -rw-------. 1 oracle oinstall 57M Jul 28 14:12 catupgrdpdb_seed0.log -rw-------. 1 oracle oinstall 13M Jul 28 14:12 catupgrdpdb_seed1.log -rw-r--r--. 1 oracle oinstall 39K Jul 28 14:12 catupgrdcdbroot_stderr.log -rw-r--r--. 1 oracle oinstall 5.5K Jul 28 14:12 upg_summary.log -rw-------. 1 oracle oinstall 48M Jul 28 14:12 catupgrdcdbroot0.log [oracle@devdb upgrade20250728110558]$ [oracle@devdb upgrade20250728110558]$ [oracle@devdb upgrade20250728110558]$ tail -200 upg_summary.log Oracle Database Release 19 Post-Upgrade Status Tool 07-28-2025 12:22:2 Container Database: DEVDB [CON_ID: 1 => CDB$ROOT] Component Current Full Elapsed Time Name Status Version HH:MM:SS Oracle Server UPGRADED 19.3.0.0.0 00:32:49 JServer JAVA Virtual Machine UPGRADED 19.3.0.0.0 00:03:36 Oracle XDK UPGRADED 19.3.0.0.0 00:02:06 Oracle Database Java Packages UPGRADED 19.3.0.0.0 00:00:28 OLAP Analytic Workspace UPGRADED 19.3.0.0.0 00:00:47 Oracle Label Security UPGRADED 19.3.0.0.0 00:00:21 Oracle Database Vault UPGRADED 19.3.0.0.0 00:00:48 Oracle Text UPGRADED 19.3.0.0.0 00:01:37 Oracle Workspace Manager UPGRADED 19.3.0.0.0 00:01:13 Oracle Real Application Clusters UPGRADED 19.3.0.0.0 00:00:00 Oracle XML Database UPGRADED 19.3.0.0.0 00:04:19 Oracle Multimedia UPGRADED 19.3.0.0.0 00:01:30 Spatial UPGRADED 19.3.0.0.0 00:10:13 Oracle OLAP API UPGRADED 19.3.0.0.0 00:00:32 Datapatch 00:07:46 Final Actions 00:08:25 Post Upgrade 00:00:49 Total Upgrade Time: 01:11:24 [CON_ID: 1 => CDB$ROOT] Database time zone version is 26. It is older than current release time zone version 32. Time zone upgrade is needed using the DBMS_DST package. Oracle Database Release 19 Post-Upgrade Status Tool 07-28-2025 13:59:2 Container Database: DEVDB [CON_ID: 3 => DEVDBPDB] Component Current Full Elapsed Time Name Status Version HH:MM:SS Oracle Server UPGRADED 19.3.0.0.0 00:52:17 JServer JAVA Virtual Machine UPGRADED 19.3.0.0.0 00:02:45 Oracle XDK UPGRADED 19.3.0.0.0 00:01:32 Oracle Database Java Packages UPGRADED 19.3.0.0.0 00:00:17 OLAP Analytic Workspace UPGRADED 19.3.0.0.0 00:00:51 Oracle Label Security UPGRADED 19.3.0.0.0 00:00:10 Oracle Database Vault UPGRADED 19.3.0.0.0 00:03:41 Oracle Text UPGRADED 19.3.0.0.0 00:00:44 Oracle Workspace Manager UPGRADED 19.3.0.0.0 00:01:01 Oracle Real Application Clusters UPGRADED 19.3.0.0.0 00:00:01 Oracle XML Database UPGRADED 19.3.0.0.0 00:04:46 Oracle Multimedia UPGRADED 19.3.0.0.0 00:01:00 Spatial UPGRADED 19.3.0.0.0 00:13:38 Oracle OLAP API UPGRADED 19.3.0.0.0 00:00:35 Datapatch 00:05:55 Final Actions 00:06:23 Post Upgrade 00:01:08 Total Upgrade Time: 01:32:17 [CON_ID: 3 => DEVDBPDB] Database time zone version is 26. It is older than current release time zone version 32. Time zone upgrade is needed using the DBMS_DST package. Oracle Database Release 19 Post-Upgrade Status Tool 07-28-2025 14:11:5 Container Database: DEVDB [CON_ID: 2 => PDB$SEED] Component Current Full Elapsed Time Name Status Version HH:MM:SS Oracle Server VALID 19.3.0.0.0 00:52:18 JServer JAVA Virtual Machine VALID 19.3.0.0.0 00:02:45 Oracle XDK VALID 19.3.0.0.0 00:01:32 Oracle Database Java Packages VALID 19.3.0.0.0 00:00:17 OLAP Analytic Workspace VALID 19.3.0.0.0 00:00:49 Oracle Label Security VALID 19.3.0.0.0 00:00:13 Oracle Database Vault VALID 19.3.0.0.0 00:03:41 Oracle Text VALID 19.3.0.0.0 00:00:44 Oracle Workspace Manager VALID 19.3.0.0.0 00:01:02 Oracle Real Application Clusters OPTION OFF 19.3.0.0.0 00:00:02 Oracle XML Database VALID 19.3.0.0.0 00:04:47 Oracle Multimedia VALID 19.3.0.0.0 00:01:00 Spatial VALID 19.3.0.0.0 00:13:38 Oracle OLAP API VALID 19.3.0.0.0 00:00:35 Datapatch 00:05:52 Final Actions 00:06:23 Post Upgrade 00:01:04 Post Compile 00:12:11 Total Upgrade Time: 01:44:24 [CON_ID: 2 => PDB$SEED * ] Asterisks denotes compilation time has been included during the upgrade process. Database time zone version is 26. It is older than current release time zone version 32. Time zone upgrade is needed using the DBMS_DST package. Upgrade Times Sorted In Descending Order Total Upgrade Time: 01:44:24 [CON_ID: 2 => PDB$SEED * ] Total Upgrade Time: 01:32:17 [CON_ID: 3 => DEVDBPDB] Total Upgrade Time: 01:11:24 [CON_ID: 1 => CDB$ROOT] Grand Total Upgrade Time: [0d:3h:6m:18s] [oracle@devdb upgrade20250728110558]$
11. Now edit /etc/oratab and enviornment variable for 19c. Then take bounce of the database.

[oracle@devdb bin]$ cat /etc/oratab
#

# This file is used by ORACLE utilities.  It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator.  A new line terminates
# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#   $ORACLE_SID:$ORACLE_HOME::
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
devdb:/u01/app/oracle/product/19c/db_home:N
[oracle@devdb bin]$


[oracle@devdb ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs
ORACLE_HOME=/u01/app/oracle/product/19c/db_home
export ORACLE_HOME
ORACLE_BASE=/u01/app/oracle
export ORACLE_BASE
ORACLE_SID=devdb
export ORACLE_SID
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:.
export LD_LIBRARY_PATH
LIBPATH=$ORACLE_HOME/lib32:$ORACLE_HOME/lib:/usr/lib:/lib
export LIBPATH
TNS_ADMIN=${ORACLE_HOME}/network/admin
export TNS_ADMIN
PATH=$ORACLE_HOME/bin:$PATH:.
export PATH
[oracle@devdb ~]$

[oracle@devdb ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 28 14:46:01 2025
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>
SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 DEVDBPDB                       MOUNTED
SQL>
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup
ORACLE instance started.

Total System Global Area 1174405120 bytes
Fixed Size                  9134080 bytes
Variable Size             520093696 bytes
Database Buffers          637534208 bytes
Redo Buffers                7643136 bytes
Database mounted.
Database opened.
SQL>
SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 DEVDBPDB                       READ WRITE NO
SQL>
SQL> select name,open_mode,cdb,version,status from v$database, v$instance;

NAME      OPEN_MODE            CDB VERSION           STATUS
--------- -------------------- --- ----------------- ------------
DEVDB     READ WRITE           YES 19.0.0.0.0        OPEN

SQL>
12. Now run the postfix script for CDB & PDB.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 DEVDBPDB                       READ WRITE NO
SQL>
SQL> @/home/oracle/preupgrade/postupgrade_fixups.sql

Session altered.


PL/SQL procedure successfully completed.


Commit complete.


Session altered.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


Package created.

No errors.

Package body created.


PL/SQL procedure successfully completed.

No errors.



Package created.

No errors.

Package body created.

No errors.
Executing Oracle POST-Upgrade Fixup Script

Auto-Generated by:       Oracle Preupgrade Script
                         Version: 19.0.0.0.0 Build: 1
Generated on:            2025-07-28 10:42:15

For Source Database:     DEVDB
Source Database Version: 12.2.0.1.0
For Upgrade to Version:  19.0.0.0.0

Executing in container:  CDB$ROOT

Preup                             Preupgrade
Action                            Issue Is
Number  Preupgrade Check Name     Remedied    Further DBA Action
------  ------------------------  ----------  --------------------------------
    5.  old_time_zones_exist      NO          Manual fixup recommended.
    6.  dir_symlinks              YES         None.
    7.  post_dictionary           YES         None.
    8.  post_fixed_objects        NO          Informational only.
                                              Further action is optional.

The fixup scripts have been run and resolved what they can. However,
there are still issues originally identified by the preupgrade that
have not been remedied and are still present in the database.
Depending on the severity of the specific issue, and the nature of
the issue itself, that could mean that your database upgrade is not
fully complete.  To resolve the outstanding issues, start by reviewing
the postupgrade_fixups.sql and searching it for the name of
the failed CHECK NAME or Preupgrade Action Number listed above.
There you will find the original corresponding diagnostic message
from the preupgrade which explains in more detail what still needs
to be done.

PL/SQL procedure successfully completed.


Session altered.

SQL>

==> For PDB.

SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 DEVDBPDB READ WRITE NO SQL> SQL> SQL> alter session set container=DEVDBPDB; Session altered. SQL> SQL> SQL> @/home/oracle/preupgrade/postupgrade_fixups.sql Session altered. PL/SQL procedure successfully completed. Commit complete. Session altered. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. Package created. No errors. Package body created. PL/SQL procedure successfully completed. No errors. Package created. No errors. Package body created. No errors. Executing Oracle POST-Upgrade Fixup Script Auto-Generated by: Oracle Preupgrade Script Version: 19.0.0.0.0 Build: 1 Generated on: 2025-07-28 10:42:15 For Source Database: DEVDB Source Database Version: 12.2.0.1.0 For Upgrade to Version: 19.0.0.0.0 Executing in container: DEVDBPDB Preup Preupgrade Action Issue Is Number Preupgrade Check Name Remedied Further DBA Action ------ ------------------------ ---------- -------------------------------- 3. old_time_zones_exist NO Manual fixup recommended. 4. dir_symlinks YES None. 5. post_dictionary YES None. 6. post_fixed_objects NO Informational only. Further action is optional. The fixup scripts have been run and resolved what they can. However, there are still issues originally identified by the preupgrade that have not been remedied and are still present in the database. Depending on the severity of the specific issue, and the nature of the issue itself, that could mean that your database upgrade is not fully complete. To resolve the outstanding issues, start by reviewing the postupgrade_fixups.sql and searching it for the name of the failed CHECK NAME or Preupgrade Action Number listed above. There you will find the original corresponding diagnostic message from the preupgrade which explains in more detail what still needs to be done. PL/SQL procedure successfully completed. Session altered. SQL>
13. As per above output, we need to update timezone for CDB & PDB. So let's proceed for that.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 DEVDBPDB                       READ WRITE NO
SQL>
SQL>
SQL> SELECT version FROM v$timezone_file;

   VERSION
----------
        26

SQL>
SQL> @/u01/app/oracle/product/19c/db_home/rdbms/admin/utltz_upg_check.sql

Session altered.

INFO: Starting with RDBMS DST update preparation.
INFO: NO actual RDBMS DST update will be done by this script.
INFO: If an ERROR occurs the script will EXIT sqlplus.
INFO: Doing checks for known issues ...
INFO: Database version is 19.0.0.0 .
INFO: This database is a Multitenant database.
INFO: Current container is CDB$ROOT .
INFO: Updating the RDBMS DST version of the CDB / CDB$ROOT database
INFO: will NOT update the RDBMS DST version of PDB databases in this CDB.
WARNING: There are 1 open PDBs .
WARNING: They will be closed when running utltz_upg_apply.sql .
INFO: Database RDBMS DST version is DSTv26 .
INFO: No known issues detected.
INFO: Now detecting new RDBMS DST version.
A prepare window has been successfully started.
INFO: Newest RDBMS DST version detected is DSTv32 .
INFO: Next step is checking all TSTZ data.
INFO: It might take a while before any further output is seen ...
A prepare window has been successfully ended.
INFO: A newer RDBMS DST version than the one currently used is found.
INFO: Note that NO DST update was yet done.
INFO: Now run utltz_upg_apply.sql to do the actual RDBMS DST update.
INFO: Note that the utltz_upg_apply.sql script will
INFO: restart the database 2 times WITHOUT any confirmation or prompt.

Session altered.

SQL>
SQL> @/u01/app/oracle/product/19c/db_home/rdbms/admin/utltz_upg_apply.sql

Session altered.

INFO: If an ERROR occurs, the script will EXIT SQL*Plus.
INFO: The database RDBMS DST version will be updated to DSTv32 .
INFO: This database is a Multitenant database.
INFO: Current container is CDB$ROOT .
INFO: Updating the RDBMS DST version of the CDB / CDB$ROOT database
INFO: will NOT update the RDBMS DST version of PDB databases in this CDB.
WARNING: There are 1 open PDBs .
WARNING: They will be closed when CDB$ROOT is restarted
WARNING: This script will restart the database 2 times
WARNING: WITHOUT asking ANY confirmation.
WARNING: Hit control-c NOW if this is not intended.
INFO: Restarting the database in UPGRADE mode to start the DST upgrade.
Database closed.
Database dismounted.
ORACLE instance shut down.
ORACLE instance started.

Total System Global Area 1174405120 bytes
Fixed Size                  9134080 bytes
Variable Size             520093696 bytes
Database Buffers          637534208 bytes
Redo Buffers                7643136 bytes
Database mounted.
Database opened.
INFO: Starting the RDBMS DST upgrade.
INFO: Upgrading all SYS owned TSTZ data.
INFO: It might take time before any further output is seen ...
An upgrade window has been successfully started.
INFO: Restarting the database in NORMAL mode to upgrade non-SYS TSTZ data.
Database closed.
Database dismounted.
ORACLE instance shut down.
ORACLE instance started.

Total System Global Area 1174405120 bytes
Fixed Size                  9134080 bytes
Variable Size             520093696 bytes
Database Buffers          637534208 bytes
Redo Buffers                7643136 bytes
Database mounted.
Database opened.
INFO: Upgrading all non-SYS TSTZ data.
INFO: It might take time before any further output is seen ...
INFO: Do NOT start any application yet that uses TSTZ data!
INFO: Next is a list of all upgraded tables:
Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_S"
Number of failures: 0
Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_L"
Number of failures: 0
Table list: "MDSYS"."SDO_DIAG_MESSAGES_TABLE"
Number of failures: 0
Table list: "DVSYS"."SIMULATION_LOG$"
Number of failures: 0
Table list: "DVSYS"."AUDIT_TRAIL$"
Number of failures: 0
INFO: Total failures during update of TSTZ data: 0 .
An upgrade window has been successfully ended.
INFO: Your new Server RDBMS DST version is DSTv32 .
INFO: The RDBMS DST update is successfully finished.
INFO: Make sure to exit this SQL*Plus session.
INFO: Do not use it for timezone related selects.

Session altered.

SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@devdb ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 28 15:01:04 2025
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> SELECT version FROM v$timezone_file;

   VERSION
----------
        32

SQL>

==> For PDB.

SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 DEVDBPDB READ WRITE NO SQL> SQL> alter session set container=DEVDBPDB; Session altered. SQL> SELECT version FROM v$timezone_file; VERSION ---------- 26 SQL> SQL> @/u01/app/oracle/product/19c/db_home/rdbms/admin/utltz_upg_check.sql Session altered. INFO: Starting with RDBMS DST update preparation. INFO: NO actual RDBMS DST update will be done by this script. INFO: If an ERROR occurs the script will EXIT sqlplus. INFO: Doing checks for known issues ... INFO: Database version is 19.0.0.0 . INFO: This database is a Multitenant database. INFO: This database is a PDB. INFO: Current PDB is DEVDBPDB . INFO: Database RDBMS DST version is DSTv26 . INFO: No known issues detected. INFO: Now detecting new RDBMS DST version. A prepare window has been successfully started. INFO: Newest RDBMS DST version detected is DSTv32 . INFO: Next step is checking all TSTZ data. INFO: It might take a while before any further output is seen ... A prepare window has been successfully ended. INFO: A newer RDBMS DST version than the one currently used is found. INFO: Note that NO DST update was yet done. INFO: Now run utltz_upg_apply.sql to do the actual RDBMS DST update. INFO: Note that the utltz_upg_apply.sql script will INFO: restart the database 2 times WITHOUT any confirmation or prompt. Session altered. SQL> SQL> SQL> @/u01/app/oracle/product/19c/db_home/rdbms/admin/utltz_upg_apply.sql Session altered. INFO: If an ERROR occurs, the script will EXIT SQL*Plus. INFO: The database RDBMS DST version will be updated to DSTv32 . INFO: This database is a Multitenant database. INFO: This database is a PDB. INFO: Current PDB is DEVDBPDB . WARNING: This script will restart the database 2 times WARNING: WITHOUT asking ANY confirmation. WARNING: Hit control-c NOW if this is not intended. INFO: Restarting the database in UPGRADE mode to start the DST upgrade. Pluggable Database closed. Pluggable Database opened. INFO: Starting the RDBMS DST upgrade. INFO: Upgrading all SYS owned TSTZ data. INFO: It might take time before any further output is seen ... An upgrade window has been successfully started. INFO: Restarting the database in NORMAL mode to upgrade non-SYS TSTZ data. Pluggable Database closed. Pluggable Database opened. INFO: Upgrading all non-SYS TSTZ data. INFO: It might take time before any further output is seen ... INFO: Do NOT start any application yet that uses TSTZ data! INFO: Next is a list of all upgraded tables: Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_S" Number of failures: 0 Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_L" Number of failures: 0 Table list: "MDSYS"."SDO_DIAG_MESSAGES_TABLE" Number of failures: 0 Table list: "DVSYS"."SIMULATION_LOG$" Number of failures: 0 Table list: "DVSYS"."AUDIT_TRAIL$" Number of failures: 0 INFO: Total failures during update of TSTZ data: 0 . An upgrade window has been successfully ended. INFO: Your new Server RDBMS DST version is DSTv32 . INFO: The RDBMS DST update is successfully finished. INFO: Make sure to exit this SQL*Plus session. INFO: Do not use it for timezone related selects. Session altered. SQL> SQL> SQL> exit Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0 [oracle@devdb ~]$ [oracle@devdb ~]$ sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 28 15:03:36 2025 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 session set container=DEVDBPDB; Session altered. SQL> SELECT version FROM v$timezone_file; VERSION ---------- 32 SQL>
14. Now run the utlusts.sql script to verify timezone status.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 DEVDBPDB                       READ WRITE NO
SQL>
SQL> @/u01/app/oracle/product/19c/db_home/rdbms/admin/utlusts.sql TEXT

Oracle Database Release 19 Post-Upgrade Status Tool    07-28-2025 15:14:0
Container Database: DEVDB
[CON_ID: 1 => CDB$ROOT]

Component                               Current         Full     Elapsed Time
Name                                    Status          Version  HH:MM:SS

Oracle Server                          UPGRADED      19.3.0.0.0  00:32:49
JServer JAVA Virtual Machine           UPGRADED      19.3.0.0.0  00:03:36
Oracle XDK                             UPGRADED      19.3.0.0.0  00:02:06
Oracle Database Java Packages          UPGRADED      19.3.0.0.0  00:00:28
OLAP Analytic Workspace                UPGRADED      19.3.0.0.0  00:00:47
Oracle Label Security                  UPGRADED      19.3.0.0.0  00:00:21
Oracle Database Vault                  UPGRADED      19.3.0.0.0  00:00:48
Oracle Text                            UPGRADED      19.3.0.0.0  00:01:37
Oracle Workspace Manager               UPGRADED      19.3.0.0.0  00:01:13
Oracle Real Application Clusters       UPGRADED      19.3.0.0.0  00:00:00
Oracle XML Database                    UPGRADED      19.3.0.0.0  00:04:19
Oracle Multimedia                      UPGRADED      19.3.0.0.0  00:01:30
Spatial                                UPGRADED      19.3.0.0.0  00:10:13
Oracle OLAP API                        UPGRADED      19.3.0.0.0  00:00:32
Datapatch                                                        00:07:46
Final Actions                                                    00:08:25
Post Upgrade                                                     00:00:49

Total Upgrade Time: 01:11:24 [CON_ID: 1 => CDB$ROOT]

Database time zone version is 32. It meets current release needs.

SQL>

==> For PDB.

SQL> alter session set container=DEVDBPDB; SQL> SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 3 DEVDBPDB READ WRITE NO SQL> SQL> @/u01/app/oracle/product/19c/db_home/rdbms/admin/utlusts.sql TEXT Oracle Database Release 19 Post-Upgrade Status Tool 07-28-2025 15:14:3 Container Database: DEVDB [CON_ID: 3 => DEVDBPDB] Component Current Full Elapsed Time Name Status Version HH:MM:SS Oracle Server UPGRADED 19.3.0.0.0 00:52:17 JServer JAVA Virtual Machine UPGRADED 19.3.0.0.0 00:02:45 Oracle XDK UPGRADED 19.3.0.0.0 00:01:32 Oracle Database Java Packages UPGRADED 19.3.0.0.0 00:00:17 OLAP Analytic Workspace UPGRADED 19.3.0.0.0 00:00:51 Oracle Label Security UPGRADED 19.3.0.0.0 00:00:10 Oracle Database Vault UPGRADED 19.3.0.0.0 00:03:41 Oracle Text UPGRADED 19.3.0.0.0 00:00:44 Oracle Workspace Manager UPGRADED 19.3.0.0.0 00:01:01 Oracle Real Application Clusters UPGRADED 19.3.0.0.0 00:00:01 Oracle XML Database UPGRADED 19.3.0.0.0 00:04:46 Oracle Multimedia UPGRADED 19.3.0.0.0 00:01:00 Spatial UPGRADED 19.3.0.0.0 00:13:38 Oracle OLAP API UPGRADED 19.3.0.0.0 00:00:35 Datapatch 00:05:55 Final Actions 00:06:23 Post Upgrade 00:01:08 Total Upgrade Time: 01:32:17 [CON_ID: 3 => DEVDBPDB] Database time zone version is 32. It meets current release needs.
15. Now run the catuppst.sql script to ensure registry consistency.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 DEVDBPDB                       READ WRITE NO
SQL>
SQL>
SQL> @/u01/app/oracle/product/19c/db_home/rdbms/admin/catuppst.sql

Session altered.


Session altered.


Session altered.


PL/SQL procedure successfully completed.


Session altered.


System altered.


PL/SQL procedure successfully completed.


Session altered.


TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP DBRESTART              2025-07-28 15:15:39
DBUA_TIMESTAMP DBRESTART     FINISHED 2025-07-28 15:15:39  Container=CDB$ROOT Id
=1
DBUA_TIMESTAMP DBRESTART         NONE 2025-07-28 15:15:39



TIMESTAMP
--------------------------------------------------------------------------------
DBUA_TIMESTAMP CATUPPST       STARTED 2025-07-28 15:15:39 Container=CDB$ROOT Id=
1



TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP POSTUP_BGN             2025-07-28 15:15:39
DBUA_TIMESTAMP POSTUP_BGN    FINISHED 2025-07-28 15:15:39  Container=CDB$ROOT Id
=1
DBUA_TIMESTAMP POSTUP_BGN        NONE 2025-07-28 15:15:39



TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP CATREQ_BGN             2025-07-28 15:15:39
DBUA_TIMESTAMP CATREQ_BGN    FINISHED 2025-07-28 15:15:39  Container=CDB$ROOT Id
=1
DBUA_TIMESTAMP CATREQ_BGN        NONE 2025-07-28 15:15:39



PL/SQL procedure successfully completed.

catrequtlmg: b_StatEvt     = TRUE
catrequtlmg: b_SelProps    = FALSE
catrequtlmg: b_UpgradeMode = FALSE
catrequtlmg: b_InUtlMig    = FALSE

PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP CATREQ_END             2025-07-28 15:15:39
DBUA_TIMESTAMP CATREQ_END    FINISHED 2025-07-28 15:15:39  Container=CDB$ROOT Id
=1
DBUA_TIMESTAMP CATREQ_END        NONE 2025-07-28 15:15:39


catuppst: Dropping library DBMS_DDL_INTERNAL_LIB

PL/SQL procedure successfully completed.

catuppst: Dropping view _CURRENT_EDITION_OBJ_MIG

PL/SQL procedure successfully completed.

catuppst: Dropping view _ACTUAL_EDITION_OBJ_MIG

PL/SQL procedure successfully completed.

catuppst: Dropping view DBA_PART_KEY_COLUMNS_V$_MIG

PL/SQL procedure successfully completed.

catuppst: Dropping view DBA_SUBPART_KEY_COLUMNS_V$_MIG

PL/SQL procedure successfully completed.

catuppst: Dropping table OBJ$MIG
catuppst: Dropping table USER$MIG
catuppst: Dropping table COL$MIG
catuppst: Dropping table CLU$MIG
catuppst: Dropping table CON$MIG
catuppst: Dropping table BOOTSTRAP$MIG
catuppst: Dropping table TAB$MIG
catuppst: Dropping table TS$MIG
catuppst: Dropping table IND$MIG
catuppst: Dropping table ICOL$MIG
catuppst: Dropping table LOB$MIG
catuppst: Dropping table COLTYPE$MIG
catuppst: Dropping table SUBCOLTYPE$MIG
catuppst: Dropping table NTAB$MIG
catuppst: Dropping table REFCON$MIG
catuppst: Dropping table OPQTYPE$MIG
catuppst: Dropping table ICOLDEP$MIG
catuppst: Dropping table VIEWTRCOL$MIG
catuppst: Dropping table ATTRCOL$MIG
catuppst: Dropping table TYPE_MISC$MIG
catuppst: Dropping table LIBRARY$MIG
catuppst: Dropping table ASSEMBLY$MIG
catuppst: Dropping table TSQ$MIG
catuppst: Dropping table FET$MIG

PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP POSTUP_END             2025-07-28 15:15:39
DBUA_TIMESTAMP POSTUP_END    FINISHED 2025-07-28 15:15:39  Container=CDB$ROOT Id
=1
DBUA_TIMESTAMP POSTUP_END        NONE 2025-07-28 15:15:39



TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP CATUPPST               2025-07-28 15:15:39
DBUA_TIMESTAMP CATUPPST      FINISHED 2025-07-28 15:15:39  Container=CDB$ROOT Id
=1
DBUA_TIMESTAMP CATUPPST          NONE 2025-07-28 15:15:39

Session altered.

SQL>

==> For PDB.

SQL> alter session set container=DEVDBPDB; Session altered. SQL> SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 3 DEVDBPDB READ WRITE NO SQL> @/u01/app/oracle/product/19c/db_home/rdbms/admin/catuppst.sql Session altered. Session altered. Session altered. PL/SQL procedure successfully completed. Session altered. System altered. PL/SQL procedure successfully completed. Session altered. TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP DBRESTART 2025-07-28 15:16:59 DBUA_TIMESTAMP DBRESTART FINISHED 2025-07-28 15:16:59 Container=DEVDBPDB Id =3 DBUA_TIMESTAMP DBRESTART NONE 2025-07-28 15:16:59 TIMESTAMP -------------------------------------------------------------------------------- DBUA_TIMESTAMP CATUPPST STARTED 2025-07-28 15:16:59 Container=DEVDBPDB Id= 3 TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP POSTUP_BGN 2025-07-28 15:16:59 DBUA_TIMESTAMP POSTUP_BGN FINISHED 2025-07-28 15:16:59 Container=DEVDBPDB Id =3 DBUA_TIMESTAMP POSTUP_BGN NONE 2025-07-28 15:16:59 TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP CATREQ_BGN 2025-07-28 15:16:59 DBUA_TIMESTAMP CATREQ_BGN FINISHED 2025-07-28 15:16:59 Container=DEVDBPDB Id =3 DBUA_TIMESTAMP CATREQ_BGN NONE 2025-07-28 15:16:59 PL/SQL procedure successfully completed. catrequtlmg: b_StatEvt = TRUE catrequtlmg: b_SelProps = FALSE catrequtlmg: b_UpgradeMode = FALSE catrequtlmg: b_InUtlMig = FALSE PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP CATREQ_END 2025-07-28 15:17:00 DBUA_TIMESTAMP CATREQ_END FINISHED 2025-07-28 15:17:00 Container=DEVDBPDB Id =3 DBUA_TIMESTAMP CATREQ_END NONE 2025-07-28 15:17:00 catuppst: Dropping library DBMS_DDL_INTERNAL_LIB PL/SQL procedure successfully completed. catuppst: Dropping view _CURRENT_EDITION_OBJ_MIG PL/SQL procedure successfully completed. catuppst: Dropping view _ACTUAL_EDITION_OBJ_MIG PL/SQL procedure successfully completed. catuppst: Dropping view DBA_PART_KEY_COLUMNS_V$_MIG PL/SQL procedure successfully completed. catuppst: Dropping view DBA_SUBPART_KEY_COLUMNS_V$_MIG PL/SQL procedure successfully completed. catuppst: Dropping table OBJ$MIG catuppst: Dropping table USER$MIG catuppst: Dropping table COL$MIG catuppst: Dropping table CLU$MIG catuppst: Dropping table CON$MIG catuppst: Dropping table BOOTSTRAP$MIG catuppst: Dropping table TAB$MIG catuppst: Dropping table TS$MIG catuppst: Dropping table IND$MIG catuppst: Dropping table ICOL$MIG catuppst: Dropping table LOB$MIG catuppst: Dropping table COLTYPE$MIG catuppst: Dropping table SUBCOLTYPE$MIG catuppst: Dropping table NTAB$MIG catuppst: Dropping table REFCON$MIG catuppst: Dropping table OPQTYPE$MIG catuppst: Dropping table ICOLDEP$MIG catuppst: Dropping table VIEWTRCOL$MIG catuppst: Dropping table ATTRCOL$MIG catuppst: Dropping table TYPE_MISC$MIG catuppst: Dropping table LIBRARY$MIG catuppst: Dropping table ASSEMBLY$MIG catuppst: Dropping table TSQ$MIG catuppst: Dropping table FET$MIG PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP POSTUP_END 2025-07-28 15:17:00 DBUA_TIMESTAMP POSTUP_END FINISHED 2025-07-28 15:17:00 Container=DEVDBPDB Id =3 DBUA_TIMESTAMP POSTUP_END NONE 2025-07-28 15:17:00 TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP CATUPPST 2025-07-28 15:17:00 DBUA_TIMESTAMP CATUPPST FINISHED 2025-07-28 15:17:00 Container=DEVDBPDB Id =3 DBUA_TIMESTAMP CATUPPST NONE 2025-07-28 15:17:00 Session altered. SQL>
16. Now again run the postfix.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 DEVDBPDB                       READ WRITE NO
SQL>
SQL>
SQL> @/home/oracle/preupgrade/postupgrade_fixups.sql

Session altered.


PL/SQL procedure successfully completed.


Commit complete.


Session altered.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


Package created.

No errors.

Package body created.


PL/SQL procedure successfully completed.

No errors.


Package created.

No errors.

Package body created.

No errors.
Executing Oracle POST-Upgrade Fixup Script

Auto-Generated by:       Oracle Preupgrade Script
                         Version: 19.0.0.0.0 Build: 1
Generated on:            2025-07-28 10:42:15

For Source Database:     DEVDB
Source Database Version: 12.2.0.1.0
For Upgrade to Version:  19.0.0.0.0

Executing in container:  CDB$ROOT

Preup                             Preupgrade
Action                            Issue Is
Number  Preupgrade Check Name     Remedied    Further DBA Action
------  ------------------------  ----------  --------------------------------
    5.  old_time_zones_exist      YES         None.
    6.  dir_symlinks              YES         None.
    7.  post_dictionary           YES         None.
    8.  post_fixed_objects        NO          Informational only.
                                              Further action is optional.

The fixup scripts have been run and resolved what they can. However,
there are still issues originally identified by the preupgrade that
have not been remedied and are still present in the database.
Depending on the severity of the specific issue, and the nature of
the issue itself, that could mean that your database upgrade is not
fully complete.  To resolve the outstanding issues, start by reviewing
the postupgrade_fixups.sql and searching it for the name of
the failed CHECK NAME or Preupgrade Action Number listed above.
There you will find the original corresponding diagnostic message
from the preupgrade which explains in more detail what still needs
to be done.

PL/SQL procedure successfully completed.


Session altered.

SQL>

==> For PDB.

SQL> alter session set container=DEVDBPDB; Session altered. SQL> SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 3 DEVDBPDB READ WRITE NO SQL> SQL> @/home/oracle/preupgrade/postupgrade_fixups.sql Session altered. PL/SQL procedure successfully completed. Commit complete. Session altered. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. Package created. No errors. Package body created. PL/SQL procedure successfully completed. No errors. Package created. No errors. Package body created. No errors. Executing Oracle POST-Upgrade Fixup Script Auto-Generated by: Oracle Preupgrade Script Version: 19.0.0.0.0 Build: 1 Generated on: 2025-07-28 10:42:15 For Source Database: DEVDB Source Database Version: 12.2.0.1.0 For Upgrade to Version: 19.0.0.0.0 Executing in container: DEVDBPDB Preup Preupgrade Action Issue Is Number Preupgrade Check Name Remedied Further DBA Action ------ ------------------------ ---------- -------------------------------- 3. old_time_zones_exist YES None. 4. dir_symlinks YES None. 5. post_dictionary YES None. 6. post_fixed_objects NO Informational only. Further action is optional. The fixup scripts have been run and resolved what they can. However, there are still issues originally identified by the preupgrade that have not been remedied and are still present in the database. Depending on the severity of the specific issue, and the nature of the issue itself, that could mean that your database upgrade is not fully complete. To resolve the outstanding issues, start by reviewing the postupgrade_fixups.sql and searching it for the name of the failed CHECK NAME or Preupgrade Action Number listed above. There you will find the original corresponding diagnostic message from the preupgrade which explains in more detail what still needs to be done. PL/SQL procedure successfully completed. Session altered.
17. Now check invalid objects count and run utlrp.sql if required.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 DEVDBPDB                       READ WRITE NO
SQL>
SQL>
SQL>  select count(*) from dba_objects where status='INVALID';

  COUNT(*)
----------
        48

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

Session altered.


TIMESTAMP
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN              2025-07-28 15:21:51

DOC>   The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC>   objects in the database. Recompilation time is proportional to the
DOC>   number of invalid objects in the database, so this command may take
DOC>   a long time to execute on a database with a large number of invalid
DOC>   objects.
DOC>
DOC>   Use the following queries to track recompilation progress:
DOC>
DOC>   1. Query returning the number of invalid objects remaining. This
DOC>      number should decrease with time.
DOC>         SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
DOC>
DOC>   2. Query returning the number of objects compiled so far. This number
DOC>      should increase with time.
DOC>         SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
DOC>
DOC>   This script automatically chooses serial or parallel recompilation
DOC>   based on the number of CPUs available (parameter cpu_count) multiplied
DOC>   by the number of threads per CPU (parameter parallel_threads_per_cpu).
DOC>   On RAC, this number is added across all RAC nodes.
DOC>
DOC>   UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
DOC>   recompilation. Jobs are created without instance affinity so that they
DOC>   can migrate across RAC nodes. Use the following queries to verify
DOC>   whether UTL_RECOMP jobs are being created and run correctly:
DOC>
DOC>   1. Query showing jobs created by UTL_RECOMP
DOC>         SELECT job_name FROM dba_scheduler_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>
DOC>   2. Query showing UTL_RECOMP jobs that are running
DOC>         SELECT job_name FROM dba_scheduler_running_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>#

PL/SQL procedure successfully completed.


TIMESTAMP
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_END              2025-07-28 15:21:58

DOC> The following query reports the number of invalid objects.
DOC>
DOC> If the number is higher than expected, please examine the error
DOC> messages reported with each object (using SHOW ERRORS) to see if they
DOC> point to system misconfiguration or resource constraints that must be
DOC> fixed before attempting to recompile these objects.
DOC>#

OBJECTS WITH ERRORS
-------------------
                  0

DOC> The following query reports the number of exceptions caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC> Note: Typical compilation errors (due to coding errors) are not
DOC>       logged into this table: they go into DBA_ERRORS instead.
DOC>#

ERRORS DURING RECOMPILATION
---------------------------
                          0


Function created.


PL/SQL procedure successfully completed.


Function dropped.


PL/SQL procedure successfully completed.

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

  COUNT(*)
----------
         0

SQL>

==> For PDB.

SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 DEVDBPDB READ WRITE NO SQL> SQL> SQL> alter session set container=DEVDBPDB; Session altered. SQL> SQL> select count(*) from dba_objects where status='INVALID'; COUNT(*) ---------- 2240 SQL> @?/rdbms/admin/utlrp.sql Session altered. TIMESTAMP -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- COMP_TIMESTAMP UTLRP_BGN 2025-07-28 15:22:46 DOC> The following PL/SQL block invokes UTL_RECOMP to recompile invalid DOC> objects in the database. Recompilation time is proportional to the DOC> number of invalid objects in the database, so this command may take DOC> a long time to execute on a database with a large number of invalid DOC> objects. DOC> DOC> Use the following queries to track recompilation progress: DOC> DOC> 1. Query returning the number of invalid objects remaining. This DOC> number should decrease with time. DOC> SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6); DOC> DOC> 2. Query returning the number of objects compiled so far. This number DOC> should increase with time. DOC> SELECT COUNT(*) FROM UTL_RECOMP_COMPILED; DOC> DOC> This script automatically chooses serial or parallel recompilation DOC> based on the number of CPUs available (parameter cpu_count) multiplied DOC> by the number of threads per CPU (parameter parallel_threads_per_cpu). DOC> On RAC, this number is added across all RAC nodes. DOC> DOC> UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel DOC> recompilation. Jobs are created without instance affinity so that they DOC> can migrate across RAC nodes. Use the following queries to verify DOC> whether UTL_RECOMP jobs are being created and run correctly: DOC> DOC> 1. Query showing jobs created by UTL_RECOMP DOC> SELECT job_name FROM dba_scheduler_jobs DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%'; DOC> DOC> 2. Query showing UTL_RECOMP jobs that are running DOC> SELECT job_name FROM dba_scheduler_running_jobs DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%'; DOC># PL/SQL procedure successfully completed. TIMESTAMP -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- COMP_TIMESTAMP UTLRP_END 2025-07-28 15:33:44 DOC> The following query reports the number of invalid objects. DOC> DOC> If the number is higher than expected, please examine the error DOC> messages reported with each object (using SHOW ERRORS) to see if they DOC> point to system misconfiguration or resource constraints that must be DOC> fixed before attempting to recompile these objects. DOC># OBJECTS WITH ERRORS ------------------- 0 DOC> The following query reports the number of exceptions caught during DOC> recompilation. If this number is non-zero, please query the error DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors DOC> are due to misconfiguration or resource constraints that must be DOC> fixed before objects can compile successfully. DOC> Note: Typical compilation errors (due to coding errors) are not DOC> logged into this table: they go into DBA_ERRORS instead. DOC># ERRORS DURING RECOMPILATION --------------------------- 0 Function created. PL/SQL procedure successfully completed. Function dropped. PL/SQL procedure successfully completed. SQL> SQL> SQL> SQL> SQL> select count(*) from dba_objects where status='INVALID'; COUNT(*) ---------- 0 SQL>
18. Now take a bounce of database and run the postcheck.

[oracle@devdb ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 28 15:41:25 2025
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> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup
ORACLE instance started.

Total System Global Area 1174405120 bytes
Fixed Size                  9134080 bytes
Variable Size             654311424 bytes
Database Buffers          503316480 bytes
Redo Buffers                7643136 bytes
Database mounted.
Database opened.
SQL>

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 DEVDBPDB                       READ WRITE NO
SQL>
SQL> SELECT version FROM v$timezone_file;

   VERSION
----------
        32

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

  COUNT(1)
----------
         0

SQL>
SQL> col COMP_ID for a10
SQL> col COMP_NAME for a40
SQL> col VERSION for a15
SQL> set lines 180
SQL> set pages 999
SQL> select COMP_ID,COMP_NAME,VERSION,STATUS from dba_registry;

COMP_ID    COMP_NAME                                VERSION         STATUS
---------- ---------------------------------------- --------------- --------------------------------------------
CATALOG    Oracle Database Catalog Views            19.0.0.0.0      VALID
CATPROC    Oracle Database Packages and Types       19.0.0.0.0      VALID
JAVAVM     JServer JAVA Virtual Machine             19.0.0.0.0      VALID
XML        Oracle XDK                               19.0.0.0.0      VALID
CATJAVA    Oracle Database Java Packages            19.0.0.0.0      VALID
APS        OLAP Analytic Workspace                  19.0.0.0.0      VALID
RAC        Oracle Real Application Clusters         19.0.0.0.0      OPTION OFF
XDB        Oracle XML Database                      19.0.0.0.0      VALID
OWM        Oracle Workspace Manager                 19.0.0.0.0      VALID
CONTEXT    Oracle Text                              19.0.0.0.0      VALID
ORDIM      Oracle Multimedia                        19.0.0.0.0      VALID
SDO        Spatial                                  19.0.0.0.0      VALID
XOQ        Oracle OLAP API                          19.0.0.0.0      VALID
OLS        Oracle Label Security                    19.0.0.0.0      VALID
DV         Oracle Database Vault                    19.0.0.0.0      VALID

15 rows selected.

SQL>

==> For PDB.

SQL> alter session set container=DEVDBPDB; Session altered. SQL> SQL> SELECT version FROM v$timezone_file; VERSION -------- 32 SQL> select count(1) from dba_objects where status='INVALID'; COUNT(1) ---------- 0 SQL> select COMP_ID,COMP_NAME,VERSION,STATUS from dba_registry; COMP_ID COMP_NAME VERSION STATUS ---------- ---------------------------------------- ------------------------------ -------------------------------------------- CATALOG Oracle Database Catalog Views 19.0.0.0.0 VALID CATPROC Oracle Database Packages and Types 19.0.0.0.0 VALID JAVAVM JServer JAVA Virtual Machine 19.0.0.0.0 VALID XML Oracle XDK 19.0.0.0.0 VALID CATJAVA Oracle Database Java Packages 19.0.0.0.0 VALID APS OLAP Analytic Workspace 19.0.0.0.0 VALID RAC Oracle Real Application Clusters 19.0.0.0.0 OPTION OFF XDB Oracle XML Database 19.0.0.0.0 VALID OWM Oracle Workspace Manager 19.0.0.0.0 VALID CONTEXT Oracle Text 19.0.0.0.0 VALID ORDIM Oracle Multimedia 19.0.0.0.0 VALID SDO Spatial 19.0.0.0.0 VALID XOQ Oracle OLAP API 19.0.0.0.0 VALID OLS Oracle Label Security 19.0.0.0.0 VALID DV Oracle Database Vault 19.0.0.0.0 VALID 15 rows selected.

Please note if you find any registery component invalid then run @ORACLE_HOME/rdbms/admin/utlrp.sql to compile the component.

19. Now drop the flashback restore point.

SQL> col name for a20
SQL> col GUARANTEE_FLASHBACK_DATABASE for a10
SQL> col TIME for a60
SQL> set lines 190
SQL> select NAME,GUARANTEE_FLASHBACK_DATABASE,TIME from V$restore_point;SQL> SQL> SQL> SQL>

NAME                 GUARANTEE_ TIME
-------------------- ---------- ------------------------------------------------------------
PRE_UPGRADE12C       YES        28-JUL-25 10.39.05.000000000 AM

SQL>
SQL> drop restore point PRE_UPGRADE12C;

Restore point dropped.

SQL> select NAME,GUARANTEE_FLASHBACK_DATABASE,TIME from V$restore_point;

no rows selected

SQL>
20. Now update COMPATIBLE parameter.

SQL>  show parameter COMPATIBLE

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      12.2.0
noncdb_compatible                    boolean     FALSE
SQL>
SQL>  ALTER SYSTEM SET COMPATIBLE = '19.0.0' SCOPE=SPFILE;

System altered.

SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

SQL> startup
ORACLE instance started.

Total System Global Area 1174405120 bytes
Fixed Size                  9134080 bytes
Variable Size             771751936 bytes
Database Buffers          385875968 bytes
Redo Buffers                7643136 bytes
Database mounted.
Database opened.
SQL>
SQL> show parameter COMPATIBLE

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      19.0.0
noncdb_compatible                    boolean     FALSE
SQL>
SQL> select name,open_mode,version from v$database,v$instance;

NAME                 OPEN_MODE            VERSION
-------------------- -------------------- ---------------
DEVDB                READ WRITE           19.0.0.0.0

SQL>
21. Now create a listener for 19c. Refer Create listener using NETCA

[oracle@devdb ~]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 28-JUL-2025 16:02:55

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=devdb.oraeasy.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                28-JUL-2025 16:02:08
Uptime                    0 days 0 hr. 0 min. 48 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19c/db_home/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/devdb/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=devdb.oraeasy.com)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "396c6dec59d53653e0650deef82416fe" has 1 instance(s).
  Instance "devdb", status READY, has 1 handler(s) for this service...
Service "4700a987085a3dfae05387e5e50a8c7b" has 1 instance(s).
  Instance "devdb", status READY, has 1 handler(s) for this service...
Service "devdb" has 1 instance(s).
  Instance "devdb", status READY, has 1 handler(s) for this service...
Service "devdbXDB" has 1 instance(s).
  Instance "devdb", status READY, has 1 handler(s) for this service...
Service "devdbpdb" has 1 instance(s).
  Instance "devdb", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@devdb ~]$
22. Now verify the table data.

[oracle@devdb ~]$ sqlplus test@DEVDBPDB

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 28 16:05:25 2025

Version 19.3.0.0.0
Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Enter password:
Last Successful login time: Mon Jul 28 2025 10:20:09 +05:30

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

SQL> show user
USER is "TEST"
SQL>
SQL> def
DEFINE _DATE           = "28-JUL-25" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "DEVDBPDB" (CHAR)
DEFINE _USER           = "TEST" (CHAR)
DEFINE _PRIVILEGE      = "" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1202000100" (CHAR)
DEFINE _EDITOR         = "vi" (CHAR)
DEFINE _O_VERSION      = "Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production" (CHAR)
DEFINE _O_RELEASE      = "1900000000" (CHAR)
SQL>
SQL> select count(*) from COMPANY;

  COUNT(*)
----------
         3

SQL>


Now 12c to 19c upgrade activity has been successfully completed.

Thank you for reading!

I hope this content has been helpful to you. Your feedback and suggestions are always welcome — feel free to leave a comment or reach out with any queries.

Abhishek Shrivastava

📧 Email: oraeasyy@gmail.com
🌐 Website: www.oraeasy.com

Tuesday, July 22, 2025

Failover to Standby

  • Introduction: Failover occurs when the primary database is completely lost or becomes inaccessible. In such events, the standby database is promoted to serve as the new primary to ensure service continuity. However, the original primary does not automatically transition to a standby role, particularly if it is damaged or unrecoverable. If Flashback Database is not enabled on the original primary, it becomes necessary to re-create the primary database from scratch using methods such as RMAN Duplicate.

  • Prerequisites:
    • Oracle Data Guard should be configured.
    • We consider here that Primary is completely lost.
  • Environment:
  • Server Primary Standby
    Hostname Source Target
    IP 192.168.80.51 192.168.80.111
    OS OEL 9 OEL 9
    SID ORCLDC ORCLDR
    Service Name ORCLDC ORCLDR

  • Now proceed to Failover activity step by step:

Please note that Failover (Activate Standby) is destructive and only used when Primary is completly lost. Kindly use below steps as per your environment and not used on Production for testing purpose.

1. Check Standby database status.

SQL> select NAME, DB_UNIQUE_NAME, DATABASE_ROLE, OPEN_MODE, LOG_MODE from v$database;

NAME      DB_UNIQUE_NAME                 DATABASE_ROLE    OPEN_MODE       LOG_MODE
--------- ------------------------------ ---------------- --------------- ------------
ORCL      ORCLDR                         PHYSICAL STANDBY MOUNTED         ARCHIVELOG

SQL>
SQL> select process,status,thread#,sequence#,block# from v$managed_standby where process like '%MRP%';

PROCESS   STATUS          THREAD#  SEQUENCE#     BLOCK#
--------- ------------ ---------- ---------- ----------
MRP0      APPLYING_LOG          1        284        868

SQL>
SQL> set lines 200 pages 300
SQL> alter session set nls_date_format= 'DD-MON-YYYY HH24:MI:SS';
Session altered.
SQL> select d.db_unique_name,d.database_role, a.thread#, b.last_seq, a.applied_seq, b.last_seq - a.applied_seq ARC_DIFF, a.last_app_timestamp,
SQL> round((sysdate - a.last_app_timestamp)*24*60,2) Gap_in_Mins, round((sysdate - a.last_app_timestamp)*24*60*60,2) Gap_in_Seconds
FROM
(select thread#, MAX(sequence#) applied_seq, MAX(next_time) last_app_timestamp from gv$archived_log where REGISTRAR='RFS' and applied='YES' group by thread#) a,
(select thread#, MAX(sequence#) last_seq from gv$archived_log group by thread#) b,
(select db_unique_name,database_role from v$database) d where a.thread#=b.thread#;


SQL>  

DB_UNIQUE_NAME                 DATABASE_ROLE       THREAD#   LAST_SEQ APPLIED_SEQ   ARC_DIFF LAST_APP_TIMESTAMP   GAP_IN_MINS GAP_IN_SECONDS
------------------------------ ---------------- ---------- ---------- ----------- ---------- -------------------- ----------- --------------
ORCLDR                         PHYSICAL STANDBY          1        283         283          0 04-MAY-2025 21:29:47     2335.62         140137

2. Now cancel & finish MRP on Standby.

 SQL> alter database recover managed standby database cancel;

Database altered.

SQL> alter database recover managed standby database finish;

Database altered.

SQL>
3. Now activate the standby.

 SQL> select NAME, DB_UNIQUE_NAME, DATABASE_ROLE, OPEN_MODE, LOG_MODE from v$database;

NAME      DB_UNIQUE_NAME                 DATABASE_ROLE    OPEN_MODE       LOG_MODE
--------- ------------------------------ ---------------- --------------- ------------
ORCL      ORCLDR                         PHYSICAL STANDBY MOUNTED         ARCHIVELOG

SQL>  alter database activate standby database;

Database altered.

SQL> select NAME, DB_UNIQUE_NAME, DATABASE_ROLE, OPEN_MODE, LOG_MODE from v$database;

NAME      DB_UNIQUE_NAME                 DATABASE_ROLE    OPEN_MODE       LOG_MODE
--------- ------------------------------ ---------------- --------------- ------------
ORCL      ORCLDR                         PRIMARY          MOUNTED         ARCHIVELOG

SQL>         
4. Now take a fresh bounce of the database.

SQL> select NAME, DB_UNIQUE_NAME, DATABASE_ROLE, OPEN_MODE, LOG_MODE from v$database;

NAME      DB_UNIQUE_NAME                 DATABASE_ROLE    OPEN_MODE       LOG_MODE
--------- ------------------------------ ---------------- --------------- ------------
ORCL      ORCLDR                         PRIMARY          MOUNTED         ARCHIVELOG

SQL>
SQL> shut immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup
ORACLE instance started.

Total System Global Area 1459616616 bytes
Fixed Size                  9177960 bytes
Variable Size            1224736768 bytes
Database Buffers          218103808 bytes
Redo Buffers                7598080 bytes
Database mounted.
Database opened.
SQL>
SQL> select NAME, DB_UNIQUE_NAME, DATABASE_ROLE, OPEN_MODE, LOG_MODE from v$database;

NAME      DB_UNIQUE_NAME                 DATABASE_ROLE    OPEN_MODE       LOG_MODE
--------- ------------------------------ ---------------- --------------- ------------
ORCL      ORCLDR                         PRIMARY          READ WRITE      ARCHIVELOG

SQL>
6. Now take full database backup using below RMAN script.

run
{
allocate channel ch1 device type disk;
backup as compressed backupset database format '/u01/app/oracle/rmanbkp/Fullback_%T_%U';
backup as compressed backupset archivelog all format '/u01/app/oracle/rmanbkp/Archive_%T_%U';
backup current controlfile format '/u01/app/oracle/rmanbkp/Controlback_%T_%U';
release channel ch1;
}



Thank you for reading!

I hope this content has been helpful to you. Your feedback and suggestions are always welcome — feel free to leave a comment or reach out with any queries.

Abhishek Shrivastava

📧 Email: oraeasyy@gmail.com
🌐 Website: www.oraeasy.com