Skip to main content

Oracle Database upgrade from 12c to 19c using RMAN


  • 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
    4. Using RMAN Along With catctl.pl Database Dictionary Upgrade

    We have already covered the upgrade using DBUA, Manual method and autoupgrade. Please visit:
    1. Upgrade Using DBUA
    2. Upgrade Using Manual Method
    3. Upgrade Using autoupgrade.jar

    In this article we will use RMAN & Database Dictionary Upgrade along With catctl.pl method for upgrade.

  • Approach: We will first do full RMAN restoration from 12c to 19c. Then we will run database upgrade using catctl.pl and catupgrd.sql.

  • 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
    Hostname devdb19c.oraeasy.com
    Database Name DEVDB
    Database Version 19c (19.3.0.0.0)
    Oracle Home /u01/app/oracle/product/19c/db_home
    Datafile Location /u01/app/oracle/oradata19c/devdb

  • 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           = "15-NOV-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> INSERT INTO COMPANY VALUES (101,'Yash','WIPRO');

1 row created.

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> 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> 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>
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";  

TABLESPACE                      Totalspace(MB) Used Space(MB) Freespace(MB)      %Used     % Free
------------------------------ --------------- -------------- ------------- ---------- ----------
SYSTEM                                     800            796             4       99.5         .5
SYSAUX                                     470            445            25      94.68       5.32
UNDOTBS1                                    70             62             8      88.57      11.43
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> 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>
==> For PDB. 
SQL> alter session set container=DEVDBPDB; Session altered. 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"; TABLESPACE Totalspace(MB) Used Space(MB) Freespace(MB) %Used % Free ------------------------------ --------------- -------------- ------------- ---------- ---------- SYSTEM 250 246 4 98.4 1.6 SYSAUX 360 338 22 93.89 6.11 UNDOTBS1 100 47 53 47 53 USERS 5 1 4 20 80 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 create pfile.

SQL> create pfile='/u01/app/oracle/rman/devdb.ora' from spfile;

File created.
3. Now take full database backup using RMAN.

[oracle@devdb ~]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Sat Nov 15 14:57:22 2025

Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DEVDB (DBID=1110684393)

RMAN> report schema;

using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name DEVDB

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    800      SYSTEM               YES     /u01/app/oracle/oradata/devdb/system01.dbf
3    470      SYSAUX               NO      /u01/app/oracle/oradata/devdb/sysaux01.dbf
4    70       UNDOTBS1             YES     /u01/app/oracle/oradata/devdb/undotbs01.dbf
5    250      PDB$SEED:SYSTEM      NO      /u01/app/oracle/oradata/devdb/pdbseed/system01.dbf
6    330      PDB$SEED:SYSAUX      NO      /u01/app/oracle/oradata/devdb/pdbseed/sysaux01.dbf
7    5        USERS                NO      /u01/app/oracle/oradata/devdb/users01.dbf
8    100      PDB$SEED:UNDOTBS1    NO      /u01/app/oracle/oradata/devdb/pdbseed/undotbs01.dbf
9    250      DEVDBPDB:SYSTEM      YES     /u01/app/oracle/oradata/devdb/devdbpdb/system01.dbf
10   360      DEVDBPDB:SYSAUX      NO      /u01/app/oracle/oradata/devdb/devdbpdb/sysaux01.dbf
11   100      DEVDBPDB:UNDOTBS1    YES     /u01/app/oracle/oradata/devdb/devdbpdb/undotbs01.dbf
12   5        DEVDBPDB:USERS       NO      /u01/app/oracle/oradata/devdb/devdbpdb/users01.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    33       TEMP                 32767       /u01/app/oracle/oradata/devdb/temp01.dbf
2    64       PDB$SEED:TEMP        32767       /u01/app/oracle/oradata/devdb/pdbseed/temp012025-07-08_19-21-44-241-PM.dbf
3    64       DEVDBPDB:TEMP        32767       /u01/app/oracle/oradata/devdb/devdbpdb/temp01.dbf


RMAN>

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

allocated channel: ch1
channel ch1: SID=263 device type=DISK

allocated channel: ch2
channel ch2: SID=268 device type=DISK

Starting backup at 15-NOV-25
channel ch1: starting compressed full datafile backup set
channel ch1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/devdb/system01.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/devdb/users01.dbf
channel ch1: starting piece 1 at 15-NOV-25
channel ch2: starting compressed full datafile backup set
channel ch2: specifying datafile(s) in backup set
input datafile file number=00003 name=/u01/app/oracle/oradata/devdb/sysaux01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/devdb/undotbs01.dbf
channel ch2: starting piece 1 at 15-NOV-25
channel ch2: finished piece 1 at 15-NOV-25
piece handle=/u01/app/oracle/rman/Fullback_20251115_0348rnj5_1_1 tag=TAG20251115T145741 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:56
channel ch2: starting compressed full datafile backup set
channel ch2: specifying datafile(s) in backup set
input datafile file number=00010 name=/u01/app/oracle/oradata/devdb/devdbpdb/sysaux01.dbf
input datafile file number=00012 name=/u01/app/oracle/oradata/devdb/devdbpdb/users01.dbf
channel ch2: starting piece 1 at 15-NOV-25
channel ch1: finished piece 1 at 15-NOV-25
piece handle=/u01/app/oracle/rman/Fullback_20251115_0248rnj5_1_1 tag=TAG20251115T145741 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:56
channel ch1: starting compressed full datafile backup set
channel ch1: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/app/oracle/oradata/devdb/pdbseed/system01.dbf
input datafile file number=00008 name=/u01/app/oracle/oradata/devdb/pdbseed/undotbs01.dbf
channel ch1: starting piece 1 at 15-NOV-25
channel ch1: finished piece 1 at 15-NOV-25
piece handle=/u01/app/oracle/rman/Fullback_20251115_0548rnkv_1_1 tag=TAG20251115T145741 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:25
channel ch1: starting compressed full datafile backup set
channel ch1: specifying datafile(s) in backup set
input datafile file number=00009 name=/u01/app/oracle/oradata/devdb/devdbpdb/system01.dbf
input datafile file number=00011 name=/u01/app/oracle/oradata/devdb/devdbpdb/undotbs01.dbf
channel ch1: starting piece 1 at 15-NOV-25
channel ch2: finished piece 1 at 15-NOV-25
piece handle=/u01/app/oracle/rman/Fullback_20251115_0448rnkt_1_1 tag=TAG20251115T145741 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:53
channel ch2: starting compressed full datafile backup set
channel ch2: specifying datafile(s) in backup set
input datafile file number=00006 name=/u01/app/oracle/oradata/devdb/pdbseed/sysaux01.dbf
channel ch2: starting piece 1 at 15-NOV-25
channel ch1: finished piece 1 at 15-NOV-25
piece handle=/u01/app/oracle/rman/Fullback_20251115_0648rnlp_1_1 tag=TAG20251115T145741 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:42
channel ch2: finished piece 1 at 15-NOV-25
piece handle=/u01/app/oracle/rman/Fullback_20251115_0748rnmi_1_1 tag=TAG20251115T145741 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:35
Finished backup at 15-NOV-25

Starting backup at 15-NOV-25
current log archived
channel ch1: starting compressed archived log backup set
channel ch1: specifying archived log(s) in backup set
input archived log thread=1 sequence=2 RECID=1 STAMP=1217257218
channel ch1: starting piece 1 at 15-NOV-25
channel ch1: finished piece 1 at 15-NOV-25
piece handle=/u01/app/oracle/rman/Archive_20251115_0848rno2_1_1 tag=TAG20251115T150018 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:07
Finished backup at 15-NOV-25

Starting backup at 15-NOV-25
channel ch1: starting full datafile backup set
channel ch1: specifying datafile(s) in backup set
including current control file in backup set
channel ch1: starting piece 1 at 15-NOV-25
channel ch1: finished piece 1 at 15-NOV-25
piece handle=/u01/app/oracle/rman/Controlback_20251115_0948rnod_1_1 tag=TAG20251115T150029 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:02
Finished backup at 15-NOV-25

Starting Control File and SPFILE Autobackup at 15-NOV-25
piece handle=/u01/app/oracle/fast_recovery_area/devdb/DEVDB/autobackup/2025_11_15/o1_mf_s_1217257238_nkjl1z02_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 15-NOV-25

released channel: ch1

released channel: ch2

RMAN>

4. Now shudown the 12c database & listener.

[oracle@devdb ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Sat Nov 15 16:07:22 2025

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 DEVDBPDB                       READ WRITE NO
         
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
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 15-NOV-2025 16:10:40

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
The command completed successfully
[oracle@devdb ~]$
5. Transfer the backup on target.

[oracle@devdb19c rman]$ ls -lrth
total 683M
-rw-r-----. 1 oracle oinstall 108M Nov 15 14:58 Fullback_20251115_0348rnj5_1_1
-rw-r-----. 1 oracle oinstall 204M Nov 15 14:58 Fullback_20251115_0248rnj5_1_1
-rw-r-----. 1 oracle oinstall  59M Nov 15 14:58 Fullback_20251115_0548rnkv_1_1
-rw-r-----. 1 oracle oinstall 105M Nov 15 14:59 Fullback_20251115_0448rnkt_1_1
-rw-r-----. 1 oracle oinstall  52M Nov 15 14:59 Fullback_20251115_0648rnlp_1_1
-rw-r-----. 1 oracle oinstall 105M Nov 15 15:00 Fullback_20251115_0748rnmi_1_1
-rw-r-----. 1 oracle oinstall  34M Nov 15 15:00 Archive_20251115_0848rno2_1_1
-rw-r-----. 1 oracle oinstall  18M Nov 15 15:00 Controlback_20251115_0948rnod_1_1
-rw-r--r--. 1 oracle oinstall 1.2K Nov 15 16:23 devdb.ora
[oracle@devdb19c rman]$ pwd
/u01/app/oracle/rman
[oracle@devdb19c rman]$
6. Now modify the pfile and create required directories accordingly.

[oracle@devdb19c rman]$ cat devdb.ora
devdb.__data_transfer_cache_size=0
devdb.__db_cache_size=754974720
devdb.__inmemory_ext_roarea=0
devdb.__inmemory_ext_rwarea=0
devdb.__java_pool_size=16777216
devdb.__large_pool_size=33554432
devdb.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
devdb.__pga_aggregate_target=402653184
devdb.__sga_target=1174405120
devdb.__shared_io_pool_size=67108864
devdb.__shared_pool_size=285212672
devdb.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin19c/devdb/adump'
*.audit_trail='db'
*.compatible='19.3.0.0.0'        ==> Update compatible parameter to 19.3.0.0.0 
*.control_files='/u01/app/oracle/oradata19c/devdb/control01.ctl','/u01/app/oracle/FRA19c/devdb/control02.ctl'
*.db_block_size=8192
*.db_name='devdb'
*.db_recovery_file_dest='/u01/app/oracle/FRA19c/devdb'
*.db_recovery_file_dest_size=5120m
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=devdbXDB)'
*.enable_pluggable_database=true
*.log_archive_format='%t_%s_%r.dbf'
*.nls_language='AMERICAN'
*.nls_territory='AMERICA'
*.open_cursors=300
*.pga_aggregate_target=369m
*.processes=300
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=1107m
*.undo_tablespace='UNDOTBS1'
[oracle@devdb19c rman]$

[oracle@devdb19c ~]$ mkdir -p /u01/app/oracle/oradata19c/devdb/devdbpdb
[oracle@devdb19c ~]$ mkdir -p /u01/app/oracle/oradata19c/devdb/pdbseed
[oracle@devdb19c ~]$ mkdir -p /u01/app/oracle/admin19c/devdb/adump
[oracle@devdb19c ~]$ mkdir -p /u01/app/oracle/FRA19c/devdb
7. Start the database in nomount.

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

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Nov 16 11:33:14 2025
Version 19.3.0.0.0

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

Connected to an idle instance.

SQL> def
DEFINE _DATE           = "16-NOV-25" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "devdb" (CHAR)
DEFINE _USER           = "SYS" (CHAR)
DEFINE _PRIVILEGE      = "AS SYSDBA" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1903000000" (CHAR)
DEFINE _EDITOR         = "vi" (CHAR)
DEFINE _O_VERSION      = "" (CHAR)
DEFINE _O_RELEASE      = "" (CHAR)
SQL>
SQL> startup nomount pfile='/u01/app/oracle/rman/devdb.ora';
ORACLE instance started.

Total System Global Area 1174405120 bytes
Fixed Size                  9134080 bytes
Variable Size             335544320 bytes
Database Buffers          822083584 bytes
Redo Buffers                7643136 bytes
SQL>
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

8. Restore the controlfile & mount the database.

[oracle@devdb19c ~]$ $ORACLE_HOME/bin/rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Sun Nov 16 16:52:14 2025
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DEVDB (not mounted)

RMAN>

RMAN> restore controlfile from '/u01/app/oracle/rman/Controlback_20251115_0948rnod_1_1';

Starting restore at 16-NOV-25
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=20 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/oradata19c/devdb/control01.ctl
output file name=/u01/app/oracle/FRA19c/devdb/control02.ctl
Finished restore at 16-NOV-25

RMAN>

RMAN> alter database mount;

released channel: ORA_DISK_1
Statement processed

RMAN> report schema;

Starting implicit crosscheck backup at 16-NOV-25
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=20 device type=DISK
Crosschecked 8 objects
Finished implicit crosscheck backup at 16-NOV-25

Starting implicit crosscheck copy at 16-NOV-25
using channel ORA_DISK_1
Finished implicit crosscheck copy at 16-NOV-25

searching for all files in the recovery area
cataloging files...
no files cataloged

RMAN-06139: warning: control file is not current for REPORT SCHEMA
Report of database schema for database with db_unique_name DEVDB

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    0      SYSTEM               ***     /u01/app/oracle/oradata/devdb/system01.dbf
3    0      SYSAUX               ***     /u01/app/oracle/oradata/devdb/sysaux01.dbf
4    0      UNDOTBS1             ***     /u01/app/oracle/oradata/devdb/undotbs01.dbf
5    0      PDB$SEED:SYSTEM      ***     /u01/app/oracle/oradata/devdb/pdbseed/system01.dbf
6    0      PDB$SEED:SYSAUX      ***     /u01/app/oracle/oradata/devdb/pdbseed/sysaux01.dbf
7    0      USERS                ***     /u01/app/oracle/oradata/devdb/users01.dbf
8    0      PDB$SEED:UNDOTBS1    ***     /u01/app/oracle/oradata/devdb/pdbseed/undotbs01.dbf
9    0      DEVDBPDB:SYSTEM      ***     /u01/app/oracle/oradata/devdb/devdbpdb/system01.dbf
10   0      DEVDBPDB:SYSAUX      ***     /u01/app/oracle/oradata/devdb/devdbpdb/sysaux01.dbf
11   0      DEVDBPDB:UNDOTBS1    ***     /u01/app/oracle/oradata/devdb/devdbpdb/undotbs01.dbf
12   0      DEVDBPDB:USERS       ***     /u01/app/oracle/oradata/devdb/devdbpdb/users01.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    0       TEMP                 32767       /u01/app/oracle/oradata/devdb/temp01.dbf
2    0       PDB$SEED:TEMP        32767       /u01/app/oracle/oradata/devdb/pdbseed/temp012025-07-08_19-21-44-241-PM.dbf
3    0       DEVDBPDB:TEMP        32767       /u01/app/oracle/oradata/devdb/devdbpdb/temp01.dbf

RMAN>
9. Catalog the backup.

RMAN> catalog start with '/u01/app/oracle/rman';

searching for all files that match the pattern /u01/app/oracle/rman

List of Files Unknown to the Database
=====================================
File Name: /u01/app/oracle/rman/Controlback_20251115_0948rnod_1_1
File Name: /u01/app/oracle/rman/devdb.ora

Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /u01/app/oracle/rman/Controlback_20251115_0948rnod_1_1

List of Files Which Were Not Cataloged
=======================================
File Name: /u01/app/oracle/rman/devdb.ora
  RMAN-07517: Reason: The file header is corrupted

RMAN>
10. Now run the restoration script.

RMAN> run
{
allocate channel ch1 device type disk;
allocate channel ch2 device type disk;
set newname for datafile 1 to '/u01/app/oracle/oradata19c/devdb/system01.dbf';
set newname for datafile 3 to '/u01/app/oracle/oradata19c/devdb/sysaux01.dbf';
set newname for datafile 4 to '/u01/app/oracle/oradata19c/devdb/undotbs01.dbf';
set newname for datafile 5 to '/u01/app/oracle/oradata19c/devdb/pdbseed/system01.dbf';
set newname for datafile 6 to '/u01/app/oracle/oradata19c/devdb/pdbseed/sysaux01.dbf';
set newname for datafile 7 to '/u01/app/oracle/oradata19c/devdb/users01.dbf';
set newname for datafile 8 to '/u01/app/oracle/oradata19c/devdb/pdbseed/undotbs01.dbf';
set newname for datafile 9 to '/u01/app/oracle/oradata19c/devdb/devdbpdb/system01.dbf';
set newname for datafile 10 to '/u01/app/oracle/oradata19c/devdb/devdbpdb/sysaux01.dbf';
set newname for datafile 11 to '/u01/app/oracle/oradata19c/devdb/devdbpdb/undotbs01.dbf';
set newname for datafile 12 to '/u01/app/oracle/oradata19c/devdb/devdbpdb/users01.dbf';
set newname for tempfile 1 to '/u01/app/oracle/oradata19c/devdb/temp01.dbf';
set newname for tempfile 2 to '/u01/app/oracle/oradata19c/devdb/pdbseed/temp01.dbf';
set newname for tempfile 3 to '/u01/app/oracle/oradata19c/devdb/devdbpdb/temp01.dbf';
restore database;
switch datafile all;
switch tempfile all;
recover database;
release channel ch1;
release channel ch2;
}

released channel: ORA_DISK_1
allocated channel: ch1
channel ch1: SID=20 device type=DISK

allocated channel: ch2
channel ch2: SID=260 device type=DISK

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 16-NOV-25

channel ch1: starting datafile backup set restore
channel ch1: specifying datafile(s) to restore from backup set
channel ch1: restoring datafile 00003 to /u01/app/oracle/oradata19c/devdb/sysaux01.dbf
channel ch1: restoring datafile 00004 to /u01/app/oracle/oradata19c/devdb/undotbs01.dbf
channel ch1: reading from backup piece /u01/app/oracle/rman/Fullback_20251115_0348rnj5_1_1
channel ch2: starting datafile backup set restore
channel ch2: specifying datafile(s) to restore from backup set
channel ch2: restoring datafile 00001 to /u01/app/oracle/oradata19c/devdb/system01.dbf
channel ch2: restoring datafile 00007 to /u01/app/oracle/oradata19c/devdb/users01.dbf
channel ch2: reading from backup piece /u01/app/oracle/rman/Fullback_20251115_0248rnj5_1_1
channel ch1: piece handle=/u01/app/oracle/rman/Fullback_20251115_0348rnj5_1_1 tag=TAG20251115T145741
channel ch1: restored backup piece 1
channel ch1: restore complete, elapsed time: 00:00:35
channel ch1: starting datafile backup set restore
channel ch1: specifying datafile(s) to restore from backup set
channel ch1: restoring datafile 00005 to /u01/app/oracle/oradata19c/devdb/pdbseed/system01.dbf
channel ch1: restoring datafile 00008 to /u01/app/oracle/oradata19c/devdb/pdbseed/undotbs01.dbf
channel ch1: reading from backup piece /u01/app/oracle/rman/Fullback_20251115_0548rnkv_1_1
channel ch2: piece handle=/u01/app/oracle/rman/Fullback_20251115_0248rnj5_1_1 tag=TAG20251115T145741
channel ch2: restored backup piece 1
channel ch2: restore complete, elapsed time: 00:00:35
channel ch2: starting datafile backup set restore
channel ch2: specifying datafile(s) to restore from backup set
channel ch2: restoring datafile 00010 to /u01/app/oracle/oradata19c/devdb/devdbpdb/sysaux01.dbf
channel ch2: restoring datafile 00012 to /u01/app/oracle/oradata19c/devdb/devdbpdb/users01.dbf
channel ch2: reading from backup piece /u01/app/oracle/rman/Fullback_20251115_0448rnkt_1_1
channel ch1: piece handle=/u01/app/oracle/rman/Fullback_20251115_0548rnkv_1_1 tag=TAG20251115T145741
channel ch1: restored backup piece 1
channel ch1: restore complete, elapsed time: 00:00:25
channel ch1: starting datafile backup set restore
channel ch1: specifying datafile(s) to restore from backup set
channel ch1: restoring datafile 00009 to /u01/app/oracle/oradata19c/devdb/devdbpdb/system01.dbf
channel ch1: restoring datafile 00011 to /u01/app/oracle/oradata19c/devdb/devdbpdb/undotbs01.dbf
channel ch1: reading from backup piece /u01/app/oracle/rman/Fullback_20251115_0648rnlp_1_1
channel ch2: piece handle=/u01/app/oracle/rman/Fullback_20251115_0448rnkt_1_1 tag=TAG20251115T145741
channel ch2: restored backup piece 1
channel ch2: restore complete, elapsed time: 00:00:26
channel ch2: starting datafile backup set restore
channel ch2: specifying datafile(s) to restore from backup set
channel ch2: restoring datafile 00006 to /u01/app/oracle/oradata19c/devdb/pdbseed/sysaux01.dbf
channel ch2: reading from backup piece /u01/app/oracle/rman/Fullback_20251115_0748rnmi_1_1
channel ch1: piece handle=/u01/app/oracle/rman/Fullback_20251115_0648rnlp_1_1 tag=TAG20251115T145741
channel ch1: restored backup piece 1
channel ch1: restore complete, elapsed time: 00:00:17
channel ch2: piece handle=/u01/app/oracle/rman/Fullback_20251115_0748rnmi_1_1 tag=TAG20251115T145741
channel ch2: restored backup piece 1
channel ch2: restore complete, elapsed time: 00:00:26
Finished restore at 16-NOV-25

datafile 1 switched to datafile copy
input datafile copy RECID=15 STAMP=1217350515 file name=/u01/app/oracle/oradata19c/devdb/system01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=16 STAMP=1217350515 file name=/u01/app/oracle/oradata19c/devdb/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=17 STAMP=1217350515 file name=/u01/app/oracle/oradata19c/devdb/undotbs01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=18 STAMP=1217350515 file name=/u01/app/oracle/oradata19c/devdb/pdbseed/system01.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=19 STAMP=1217350515 file name=/u01/app/oracle/oradata19c/devdb/pdbseed/sysaux01.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=20 STAMP=1217350515 file name=/u01/app/oracle/oradata19c/devdb/users01.dbf
datafile 8 switched to datafile copy
input datafile copy RECID=21 STAMP=1217350515 file name=/u01/app/oracle/oradata19c/devdb/pdbseed/undotbs01.dbf
datafile 9 switched to datafile copy
input datafile copy RECID=22 STAMP=1217350515 file name=/u01/app/oracle/oradata19c/devdb/devdbpdb/system01.dbf
datafile 10 switched to datafile copy
input datafile copy RECID=23 STAMP=1217350515 file name=/u01/app/oracle/oradata19c/devdb/devdbpdb/sysaux01.dbf
datafile 11 switched to datafile copy
input datafile copy RECID=24 STAMP=1217350515 file name=/u01/app/oracle/oradata19c/devdb/devdbpdb/undotbs01.dbf
datafile 12 switched to datafile copy
input datafile copy RECID=25 STAMP=1217350515 file name=/u01/app/oracle/oradata19c/devdb/devdbpdb/users01.dbf

renamed tempfile 1 to /u01/app/oracle/oradata19c/devdb/temp01.dbf in control file
renamed tempfile 2 to /u01/app/oracle/oradata19c/devdb/pdbseed/temp01.dbf in control file
renamed tempfile 3 to /u01/app/oracle/oradata19c/devdb/devdbpdb/temp01.dbf in control file

Starting recover at 16-NOV-25

starting media recovery

channel ch1: starting archived log restore to default destination
channel ch1: restoring archived log
archived log thread=1 sequence=2
channel ch1: reading from backup piece /u01/app/oracle/rman/Archive_20251115_0848rno2_1_1
channel ch1: piece handle=/u01/app/oracle/rman/Archive_20251115_0848rno2_1_1 tag=TAG20251115T150018
channel ch1: restored backup piece 1
channel ch1: restore complete, elapsed time: 00:00:07
archived log file name=/u01/app/oracle/FRA19c/devdb/DEVDB/archivelog/2025_11_16/o1_mf_1_2_nkmf4x1v_.arc thread=1 sequence=2
channel default: deleting archived log(s)
archived log file name=/u01/app/oracle/FRA19c/devdb/DEVDB/archivelog/2025_11_16/o1_mf_1_2_nkmf4x1v_.arc RECID=2 STAMP=1217350522
unable to find archived log
archived log thread=1 sequence=3
released channel: ch1
released channel: ch2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 11/16/2025 16:55:24
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 3 and starting SCN of 1457518

RMAN>

RMAN> exit

Recovery Manager complete.

11. Now create spfile & try to open the database.
 
SQL> select name,open_mode,cdb,version,status from v$database, v$instance;

NAME      OPEN_MODE            CDB VERSION           STATUS
--------- -------------------- --- ----------------- ------------
DEVDB     MOUNTED              YES 19.0.0.0.0        MOUNTED

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       MOUNTED
         3 DEVDBPDB                       MOUNTED
SQL>
SQL> create spfile from pfile='/u01/app/oracle/rman/devdb.ora';

File created.

SQL> alter database open RESETLOGS;
alter database open RESETLOGS
*
ERROR at line 1:
ORA-00603: ORACLE server session terminated by fatal error
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Process ID: 5080
Session ID: 20 Serial number: 53473


SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
Here we get "ORA-00704" error as Oracle detects a version mismatch between the SYSTEM data dictionary and the Oracle binaries during startup. So we need to start the database in Upgrade mode.

12. Now start database in Upgrade mode.

[oracle@devdb19c ~]$ $ORACLE_HOME/bin/sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Nov 16 16:56:48 2025
Version 19.3.0.0.0

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

Connected to an idle instance.

SQL> startup upgrade
ORACLE instance started.

Total System Global Area 1174405120 bytes
Fixed Size                  9134080 bytes
Variable Size             335544320 bytes
Database Buffers          822083584 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
13. Now we will run Database Dictionary upgrade utility in parallel mode.

SQL>  @$ORACLE_HOME/rdbms/admin/catupgrd.sql
DOC>######################################################################
DOC>######################################################################
DOC>                                 ERROR
DOC>
DOC>
DOC>    As of 12.2, customers must use the parallel upgrade utility, catctl.pl,
DOC>    to invoke catupgrd.sql when upgrading the database dictionary.
DOC>    Running catupgrd.sql directly from SQL*Plus is no longer supported.
DOC>
DOC>    For Example:
DOC>
DOC>          cd $ORACLE_HOME/rdbms/admin
DOC>          catctl
DOC>
DOC>          or
DOC>
DOC>          cd $ORACLE_HOME/rdbms/admin
DOC>          $ORACLE_HOME/perl/bin/perl catctl.pl catupgrd.sql
DOC>
DOC>    Refer to the Oracle Database Upgrade Guide for more information.
DOC>
DOC>
DOC>######################################################################
DOC>######################################################################
DOC>#
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

As above method is no longer supported, so we will run it in background like below.
[oracle@devdb19c admin]$  cd $ORACLE_HOME/rdbms/admin
[oracle@devdb19c admin]$ nohup $ORACLE_HOME/perl/bin/perl catctl.pl -n 2 catupgrd.sql > /home/oracle/catctl.out 2>&1 &
[1] 6121
[oracle@devdb19c admin]$
14. Now view the log with "tail" command.

[oracle@devdb19c admin]$ tail -100f /home/oracle/catctl.out

For CDB$ROOT.
Argument list for [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 = 2 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/upgrade20251116170144] catcon::set_log_file_base_path: ALL catcon-related output will be written to [/tmp/cfgtoollogs/upgrade20251116170144/catupgrd_catcon_6121.lst] catcon::set_log_file_base_path: catcon: See [/tmp/cfgtoollogs/upgrade20251116170144/catupgrd*.log] files for output generated by scripts catcon::set_log_file_base_path: catcon: See [/tmp/cfgtoollogs/upgrade20251116170144/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/upgrade20251116170201/catupgrdcdbroot_catcon_6121.lst] catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20251116170201/catupgrdcdbroot*.log] files for output generated by scripts catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20251116170201/catupgrdcdbroot_*.lst] files for spool files, if any Log file directory = [/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20251116170201] Parallel SQL Process Count (PDB) = 2 Parallel SQL Process Count (CDB$ROOT) = 2 Concurrent PDB Upgrades = 1 Generated PDB Inclusion:[PDB$SEED DEVDBPDB] Components in [CDB$ROOT] Installed [APS CATALOG CATJAVA CATPROC CONTEXT DV JAVAVM OLS ORDIM OWM SDO XDB XML XOQ] Not Installed [APEX EM MGW ODM RAC WK] ------------------------------------------------------ Phases [0-107] Start Time:[2025_11_16 17:02:21] Container Lists Inclusion:[CDB$ROOT] Exclusion:[NONE] ------------------------------------------------------ *********** Executing Change Scripts *********** Serial Phase #:0 [CDB$ROOT] Files:1 Time: 52s *************** Catalog Core SQL *************** Serial Phase #:1 [CDB$ROOT] Files:5 Time: 82s Restart Phase #:2 [CDB$ROOT] Files:1 Time: 2s *********** Catalog Tables and Views *********** Parallel Phase #:3 [CDB$ROOT] Files:19 Time: 48s .... .... ------------------------------------------------------ Phases [0-107] End Time:[2025_11_16 17:58:55] Container Lists Inclusion:[CDB$ROOT] Exclusion:[NONE] ------------------------------------------------------ For PDB$SEED.
Start processing of PDBs (PDB$SEED) [/u01/app/oracle/product/19c/db_home/perl/bin/perl catctl.pl -n 2 -I -i pdb_seed -c 'PDB$SEED' -l /u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20251116170201 catupgrd.sql] Argument list for [catctl.pl] For Oracle internal use only A = 0 Run in c = PDB$SEED Do not run in C = 0 Input Directory d = 0 Echo OFF e = 1 Simulate E = 0 Forced cleanup F = 0 Log Id i = pdb_seed Child Process I = 1 Log Dir l = /u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20251116170201 Priority List Name L = 0 Upgrade Mode active M = 0 SQL Process Count n = 2 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 = [/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20251116170201] catcon::set_log_file_base_path: ALL catcon-related output will be written to [/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20251116170201/catupgrdpdb_seed_catcon_20317.lst] catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20251116170201/catupgrdpdb_seed*.log] files for output generated by scripts catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20251116170201/catupgrdpdb_seed_*.lst] files for spool files, if any Number of Cpus = 2 Database Name = devdb DataBase Version = 19.0.0.0.0 PDB$SEED Open Mode = [MIGRATE] Generated PDB Inclusion:[PDB$SEED] CDB$ROOT Open Mode = [OPEN] Components in [PDB$SEED] Installed [APS CATALOG CATJAVA CATPROC CONTEXT DV JAVAVM OLS ORDIM OWM SDO XDB XML XOQ] Not Installed [APEX EM MGW ODM RAC WK] ------------------------------------------------------ Phases [0-107] Start Time:[2025_11_16 17:59:45] Container Lists Inclusion:[PDB$SEED] Exclusion:[NONE] ------------------------------------------------------ *********** Executing Change Scripts *********** Serial Phase #:0 [PDB$SEED] Files:1 Time: 71s *************** Catalog Core SQL *************** Serial Phase #:1 [PDB$SEED] Files:5 Time: 95s Restart Phase #:2 [PDB$SEED] Files:1 Time: 3s *********** Catalog Tables and Views *********** .... .... ------------------------------------------------------ Phases [0-107] End Time:[2025_11_16 19:45:06] Container Lists Inclusion:[PDB$SEED] Exclusion:[NONE] ------------------------------------------------------ Grand Total Time: 6330s [PDB$SEED] For DEVDBPDB.
Start processing of PDBs (DEVDBPDB) [/u01/app/oracle/product/19c/db_home/perl/bin/perl catctl.pl -n 2 -I -i devdbpdb -c 'DEVDBPDB' -l /u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20251116170201 catupgrd.sql] Argument list for [catctl.pl] For Oracle internal use only A = 0 Run in c = DEVDBPDB Do not run in C = 0 Input Directory d = 0 Echo OFF e = 1 Simulate E = 0 Forced cleanup F = 0 Log Id i = devdbpdb Child Process I = 1 Log Dir l = /u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20251116170201 Priority List Name L = 0 Upgrade Mode active M = 0 SQL Process Count n = 2 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 = [/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20251116170201] catcon::set_log_file_base_path: ALL catcon-related output will be written to [/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20251116170201/catupgrddevdbpdb_catcon_9795.lst] catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20251116170201/catupgrddevdbpdb*.log] files for output generated by scripts catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20251116170201/catupgrddevdbpdb_*.lst] files for spool files, if any Number of Cpus = 2 Database Name = devdb DataBase Version = 19.0.0.0.0 DEVDBPDB Open Mode = [MIGRATE] Generated PDB Inclusion:[DEVDBPDB] CDB$ROOT Open Mode = [OPEN] Components in [DEVDBPDB] Installed [APS CATALOG CATJAVA CATPROC CONTEXT DV JAVAVM OLS ORDIM OWM SDO XDB XML XOQ] Not Installed [APEX EM MGW ODM RAC WK] ------------------------------------------------------ Phases [0-107] Start Time:[2025_11_16 19:46:26] Container Lists Inclusion:[DEVDBPDB] Exclusion:[NONE] ------------------------------------------------------ *********** Executing Change Scripts *********** Serial Phase #:0 [DEVDBPDB] Files:1 Time: 94s *************** Catalog Core SQL *************** Serial Phase #:1 [DEVDBPDB] Files:5 Time: 133s Restart Phase #:2 [DEVDBPDB] Files:1 Time: 2s .... .... ------------------------------------------------------ Phases [0-107] End Time:[2025_11_16 20:36:55] Container Lists Inclusion:[DEVDBPDB] Exclusion:[NONE] ------------------------------------------------------ Grand Total Time: 3025s [DEVDBPDB] LOG FILES: (/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20251116170201/catupgrddevdbpdb*.log) Upgrade Summary Report Located in: /u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20251116170201/upg_summary.log Time: 3391s For CDB$ROOT Time: 9486s For PDB(s) Grand Total Time: 12877s LOG FILES: (/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20251116170201/catupgrdcdbroot*.log) Upgrade Summary Report Located in: /u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20251116170201/upg_summary.log Grand Total Upgrade Time: [0d:3h:34m:37s]
15. Now check registery components.


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       UPGRADED
CATPROC    Oracle Database Packages and Types       19.0.0.0.0       UPGRADED
JAVAVM     JServer JAVA Virtual Machine             19.0.0.0.0       UPGRADED
XML        Oracle XDK                               19.0.0.0.0       UPGRADED
CATJAVA    Oracle Database Java Packages            19.0.0.0.0       UPGRADED
APS        OLAP Analytic Workspace                  19.0.0.0.0       UPGRADED
RAC        Oracle Real Application Clusters         19.0.0.0.0       UPGRADED
XDB        Oracle XML Database                      19.0.0.0.0       UPGRADED
OWM        Oracle Workspace Manager                 19.0.0.0.0       UPGRADED
CONTEXT    Oracle Text                              19.0.0.0.0       UPGRADED
ORDIM      Oracle Multimedia                        19.0.0.0.0       UPGRADED
SDO        Spatial                                  19.0.0.0.0       UPGRADED
XOQ        Oracle OLAP API                          19.0.0.0.0       UPGRADED
OLS        Oracle Label Security                    19.0.0.0.0       UPGRADED
DV         Oracle Database Vault                    19.0.0.0.0       UPGRADED

15 rows selected.

16. Run utlrp.

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

Session altered.


TIMESTAMP
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN              2025-11-16 21:55:53

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-11-16 21:56:03

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

==> For PDB. 

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 DEVDBPDB                       MOUNTED
SQL> alter pluggable database DEVDBPDB open;

Pluggable database altered.

SQL> alter pluggable database DEVDBPDB save state;

Pluggable database altered.

SQL> alter session set container=DEVDBPDB;

Session altered.

SQL> show pdbs

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

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      UPGRADED
CATPROC    Oracle Database Packages and Types       19.0.0.0.0      UPGRADED
JAVAVM     JServer JAVA Virtual Machine             19.0.0.0.0      UPGRADED
XML        Oracle XDK                               19.0.0.0.0      UPGRADED
CATJAVA    Oracle Database Java Packages            19.0.0.0.0      UPGRADED
APS        OLAP Analytic Workspace                  19.0.0.0.0      UPGRADED
RAC        Oracle Real Application Clusters         19.0.0.0.0      UPGRADED
XDB        Oracle XML Database                      19.0.0.0.0      UPGRADED
OWM        Oracle Workspace Manager                 19.0.0.0.0      UPGRADED
CONTEXT    Oracle Text                              19.0.0.0.0      UPGRADED
ORDIM      Oracle Multimedia                        19.0.0.0.0      UPGRADED
SDO        Spatial                                  19.0.0.0.0      UPGRADED
XOQ        Oracle OLAP API                          19.0.0.0.0      UPGRADED
OLS        Oracle Label Security                    19.0.0.0.0      UPGRADED
DV         Oracle Database Vault                    19.0.0.0.0      UPGRADED

15 rows selected.

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

Session altered.


TIMESTAMP
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN              2025-11-16 21:58:02

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-11-16 22:08:23

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

17. Take the bounce of the database and do post check.

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             503316480 bytes
Database Buffers          654311424 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> set lines 200 pages 1000
SQL>
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";  

TABLESPACE                      Totalspace(MB) Used Space(MB) Freespace(MB)      %Used     % Free
------------------------------ --------------- -------------- ------------- ---------- ----------
SYSTEM                                    1020           1013             7      99.31        .69
SYSAUX                                     640            603            37      94.22       5.78
UNDOTBS1                                   640            301           339      47.03      52.97
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> 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> 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 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"; TABLESPACE Totalspace(MB) Used Space(MB) Freespace(MB) %Used % Free ------------------------------ --------------- -------------- ------------- ---------- ---------- UNDOTBS1 235 232 3 98.72 1.28 SYSTEM 290 286 4 98.62 1.38 SYSAUX 440 412 28 93.64 6.36 USERS 5 1 4 20 80 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 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> select count(*) from test.company; COUNT(*) ---------- 3

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

Follow Us

Comments