Skip to main content

Oracle Database upgrade from 19c to 26ai


  • Introduction: Oracle AI Database 26ai, released in October 2025, is a long-term support release that embeds AI capabilities directly into data management, succeeding and replacing 23ai. In this article, we will see how to upgrade the database from 19c to 26ai step by step. We will use autoupgrade.jar method for upgrade.

  • Prerequisites:
    • 19c binary installed with database.
    • 26ai binary installed without database.
    • Java version should be 8 or later.
    • Download latest autoupgrade.jar file. Click here
    • Sufficient disk space for tablespace & archive growth.
    • Minimum 6 hrs downtime for Production database.

  • Environment:
  • Source Database
    Hostname orcl.oraeasy.com
    Database Name CDBORCL
    Database Version 19c(19.28)
    Oracle Home /u01/app/oracle/product/19c/dbhome_1
    Datafile Location /u01/app/oracle/oradata/ORCL

    Target Database
    Database Version 26ai (23.26.1)
    Oracle Home /u01/app2/oracle/product/26ai/dbhome_1

  • Now proceed for upgradation activity step by step:

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

SQL> def
DEFINE _DATE           = "29-APR-26" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "cdborcl" (CHAR)
DEFINE _USER           = "SYS" (CHAR)
DEFINE _PRIVILEGE      = "AS SYSDBA" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1928000000" (CHAR)
DEFINE _EDITOR         = "vi" (CHAR)
DEFINE _O_VERSION      = "Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.28.0.0.0" (CHAR)
DEFINE _O_RELEASE      = "1928000000" (CHAR)
SQL>
SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDBORCL                        READ WRITE NO
SQL> alter session set container=PDBORCL;

Session altered.

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

Now take Precheck like Tablespace, Invalid object count & Registery Components:

SQL> select name,open_mode,log_mode from v$database;

NAME      OPEN_MODE            LOG_MODE
--------- -------------------- ------------
CDBORCL   READ WRITE           ARCHIVELOG

SQL> select banner_full from v$version;

BANNER_FULL
--------------------------------------------------------------------------------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.28.0.0.0

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDBORCL                        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"; 

TABLESPACE                      Totalspace(MB) Used Space(MB) Freespace(MB)      %Used     % Free
------------------------------ --------------- -------------- ------------- ---------- ----------
SYSTEM                                    1140           1138             2      99.82        .18
UNDOTBS1                                   750            746             4      99.47        .53
SYSAUX                                     880            837            43      95.11       4.89
USERS                                        5              3             2         60         40

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

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

SQL> col COMP_NAME for a40
SQL> col VERSION for a15
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
RAC                            Oracle Real Application Clusters         19.0.0.0.0      OPTION OFF
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
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 version FROM v$timezone_file;

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

SQL> alter session set container=PDBORCL;

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                                   245            245             0        100          0
SYSTEM                                     490            483             7      98.57       1.43
SYSAUX                                     450            427            23      94.89       5.11
USERS                                        5              1             4         20         80

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            19.0.0.0.0      VALID
CATPROC                        Oracle Database Packages and Types       19.0.0.0.0      VALID
RAC                            Oracle Real Application Clusters         19.0.0.0.0      OPTION OFF
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
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>
SQL>  SELECT version FROM v$timezone_file;

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

2. Now we need to enable flashback log if not enabled. Also set enough FRA size.

SQL> select name,open_mode,log_mode from v$database;

NAME      OPEN_MODE            LOG_MODE
--------- -------------------- ------------
CDBORCL   READ WRITE           ARCHIVELOG

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     13
Next log sequence to archive   15
Current log sequence           15
SQL> select flashback_on from v$database;

FLASHBACK_ON
------------------
NO

SQL> alter database flashback on;

Database altered.

SQL> select flashback_on from v$database;

FLASHBACK_ON
------------------
YES

SQL> show parameter compatible

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      19.0.0
noncdb_compatible                    boolean     FALSE
SQL>
SQL> show parameter recovery

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /u01/app/oracle/fast_recovery_
                                                 area
db_recovery_file_dest_size           big integer 12732M
recovery_parallelism                 integer     0
remote_recovery_file_dest            string
SQL>
SQL> alter system set db_recovery_file_dest_size=25G;

System altered.

SQL> show parameter recovery

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /u01/app/oracle/fast_recovery_
                                                 area
db_recovery_file_dest_size           big integer 25G
recovery_parallelism                 integer     0
remote_recovery_file_dest            string
SQL>
3. Now check the java version and update the latest autoupgrade.jar.

[oracle@orcl ~]$ java -version
openjdk version "11.0.16.1" 2022-08-12 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.16.1.1-3.0.1.el9) (build 11.0.16.1+1-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.16.1.1-3.0.1.el9) (build 11.0.16.1+1-LTS, mixed mode, sharing)
[oracle@orcl ~]$
[oracle@orcl ~]$ /u01/app2/oracle/product/26ai/dbhome_1/jdk/bin/java -jar /u01/app2/oracle/product/26ai/dbhome_1/rdbms/admin/autoupgrade.jar -version
build.version 26.5.260117
build.date 2026/01/17 07:17:22 +0000
build.hash d302fcb75
build.hash_date 2025/10/01 19:13:25 +0000
build.supported_target_versions 12.2,18,19,21,23
build.type production
build.label (HEAD, tag: v25.5, origin/stable_devel, stable_devel)
build.MOS_NOTE 2485457.1
build.MOS_LINK https://support.oracle.com/epmos/faces/DocumentDisplay?id=2485457.1

[oracle@orcl ~]$ cd /u01/app2/oracle/product/26ai/dbhome_1/rdbms/admin
[oracle@orcl admin]$
[oracle@orcl admin]$ ls -lrth autoupgrade.jar
-rw-r-----. 1 oracle oinstall 6.5M Jan 17 12:47 autoupgrade.jar
[oracle@orcl admin]$ mv autoupgrade.jar autoupgrade.jar_bkp
[oracle@orcl admin]$ ls -lrth autoupgrade.jar*
-rw-r-----. 1 oracle oinstall 6.5M Jan 17 12:47 autoupgrade.jar_bkp
[oracle@orcl admin]$
[oracle@orcl admin]$ cd
[oracle@orcl ~]$ ls -lrth autoupgrade.jar
-rw-r--r--. 1 oracle oinstall 6.7M Apr 15 19:24 autoupgrade.jar
[oracle@orcl ~]$
[oracle@orcl ~]$ mv autoupgrade.jar /u01/app2/oracle/product/26ai/dbhome_1/rdbms/admin/
[oracle@orcl ~]$ cd /u01/app2/oracle/product/26ai/dbhome_1/rdbms/admin
[oracle@orcl admin]$ ls -lrth autoupgrade.jar*
-rw-r-----. 1 oracle oinstall 6.5M Jan 17 12:47 autoupgrade.jar_bkp
-rw-r--r--. 1 oracle oinstall 6.7M Apr 15 19:24 autoupgrade.jar
[oracle@orcl admin]$

[oracle@orcl trace]$ /u01/app2/oracle/product/26ai/dbhome_1/jdk/bin/java -jar /u01/app2/oracle/product/26ai/dbhome_1/rdbms/admin/autoupgrade.jar -version
build.version 26.3.260401
build.date 2026/04/01 20:09:34 +0000
build.hash b5bb11008
build.hash_date 2026/03/27 14:05:56 +0000
build.supported_target_versions 12.2,18,19,21,23,26
build.type production
build.label (HEAD, tag: v26.3, origin/stable_devel, stable_devel)
build.MOS_NOTE KB123450
build.MOS_LINK https://support.oracle.com/support/?anchorId=&kmContentId=2485457&page=sptemplate&sptemplate=km-article

4. Now create the sample config file and edit that file according to our environment.

[oracle@orcl ~]$ mkdir -p /u01/upgrade
[oracle@orcl ~]$ cd /u01/upgrade
[oracle@orcl upgrade]$ pwd
/u01/upgrade
[oracle@orcl upgrade]$
[oracle@orcl upgrade]$ /u01/app2/oracle/product/26ai/dbhome_1/jdk/bin/java -jar /u01/app2/oracle/product/26ai/dbhome_1/rdbms/admin/autoupgrade.jar -create_sample_file config /u01/upgrade/config.txt
Created sample configuration file /u01/upgrade/config.txt
[oracle@orcl upgrade]$
[oracle@orcl upgrade]$ ls -lrth
total 8.0K
-rw-r--r--. 1 oracle oinstall 4.9K Apr 29 09:26 config.txt
[oracle@orcl upgrade]$ vi config.txt
[oracle@orcl upgrade]$ cat config.txt
################################################################
global.global_log_dir=/u01/upgrade
upg1.upgrade_node=orcl.oraeasy.com
upg1.dbname=cdborcl
upg1.start_time=NOW
upg1.source_home=/u01/app/oracle/product/19c/dbhome_1
upg1.target_home=/u01/app2/oracle/product/26ai/dbhome_1
upg1.sid=cdborcl
upg1.target_version=26
upg1.run_utlrp=yes
upg1.timezone_upg=yes
################################################################

5. Now run the autoupgrade.jar in Analyze mode to analyze the upgrade for any expected issues.

[oracle@orcl ~]$ cd /u01/upgrade/
[oracle@orcl upgrade]$ ls
config.txt
[oracle@orcl upgrade]$
[oracle@orcl upgrade]$ export ORACLE_HOME=/u01/app2/oracle/product/26ai/dbhome_1
[oracle@orcl upgrade]$ echo $ORACLE_HOME
/u01/app2/oracle/product/26ai/dbhome_1
[oracle@orcl upgrade]$
[oracle@orcl upgrade]$ $ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -config config.txt -mode analyze
AutoUpgrade 26.3.260401 launched with default internal options
Processing config file ...
Note: The following parameters specified in the configuration file have not been used:
        upg1.dbname
Be sure that each parameter is spelled correctly and applies to the utility
requested, as misspelled or unknown parameters are ignored by AutoUpgrade.
For supported parameters, see section "AutoUpgrade Utility Configuration Files
Parameters and Options" in the Oracle Database Upgrade Guide.

+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 CDB(s) plus 2 PDB(s) will be analyzed
Type 'help' to list console commands
upg> lsj
+----+-------+---------+---------+-------+----------+-------+-------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|MESSAGE|
+----+-------+---------+---------+-------+----------+-------+-------+
| 100|cdborcl|PRECHECKS|EXECUTING|RUNNING|  09:50:22| 9s ago|       |
+----+-------+---------+---------+-------+----------+-------+-------+
Total jobs 1

upg> status -job 100
Details

        Job No           100
        Oracle SID       cdborcl
        Start Time       26/04/29 09:50:22
        Elapsed (min):   0
        End time:        N/A

Logfiles

        Logs Base:    /u01/upgrade/cdborcl
        Job logs:     /u01/upgrade/cdborcl/100
        Stage logs:   /u01/upgrade/cdborcl/100/prechecks
        TimeZone:     /u01/upgrade/cdborcl/temp
        Remote Dirs:

Stages
        SETUP            <1 min
        PRECHECKS        ~0 min (RUNNING)

Stage-Progress Per Container

        +--------+---------+
        |Database|PRECHECKS|
        +--------+---------+
        |CDB$ROOT|    0  % |
        |PDB$SEED|    0  % |
        | PDBORCL|    0  % |
        +--------+---------+

upg> Job 100 completed
------------------- Final Summary --------------------
Number of databases            [ 1 ]

Jobs finished                  [1]
Jobs failed                    [0]

Please check the summary report at:
/u01/upgrade/cfgtoollogs/upgrade/auto/status/status.html
/u01/upgrade/cfgtoollogs/upgrade/auto/status/status.log
[oracle@orcl upgrade]$
[oracle@orcl upgrade]$ cat /u01/upgrade/cfgtoollogs/upgrade/auto/status/status.log
==========================================
          Autoupgrade Summary Report
==========================================
[Date]           Wed Apr 29 09:51:51 IST 2026
[Number of Jobs] 1
==========================================
[Job ID] 100
==========================================
[DB Name]                cdborcl
[Version Before Upgrade] 19.28.0.0.0
[Version After Upgrade]  23.26.1.0.0
------------------------------------------
[Stage Name]    PRECHECKS
[Status]        SUCCESS
[Start Time]    2026-04-29 09:50:22
[Duration]      0:01:28
[Log Directory] /u01/upgrade/cdborcl/100/prechecks
[Detail]        /u01/upgrade/cdborcl/100/prechecks/cdborcl_preupgrade.log
                Check passed and no manual intervention needed
------------------------------------------
[oracle@orcl upgrade]$

6. Now run the autoupgrade.jar in Deploy mode to start the actual upgrade process.

[oracle@orcl upgrade]$ $ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -config config.txt -mode deploy
AutoUpgrade 26.3.260401 launched with default internal options
Processing config file ...
Note: The following parameters specified in the configuration file have not been used:
        upg1.dbname
Be sure that each parameter is spelled correctly and applies to the utility
requested, as misspelled or unknown parameters are ignored by AutoUpgrade.
For supported parameters, see section "AutoUpgrade Utility Configuration Files
Parameters and Options" in the Oracle Database Upgrade Guide.

+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 CDB(s) plus 2 PDB(s) will be processed
Type 'help' to list console commands
upg> lsj
+----+-------+---------+---------+-------+----------+-------+-------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|MESSAGE|
+----+-------+---------+---------+-------+----------+-------+-------+
| 101|cdborcl|PRECHECKS|EXECUTING|RUNNING|  09:53:14| 1s ago|       |
+----+-------+---------+---------+-------+----------+-------+-------+
Total jobs 1
upg>
upg>
upg> status -job 101
Details

        Job No           101
        Oracle SID       cdborcl
        Start Time       26/04/29 09:53:14
        Elapsed (min):   0
        End time:        N/A

Logfiles

        Logs Base:    /u01/upgrade/cdborcl
        Job logs:     /u01/upgrade/cdborcl/101
        Stage logs:   /u01/upgrade/cdborcl/101/prechecks
        TimeZone:     /u01/upgrade/cdborcl/temp
        Remote Dirs:

Stages
        SETUP            <1 min
        GRP              <1 min
        PREUPGRADE       <1 min
        PRECHECKS        ~0 min (RUNNING)
        PREFIXUPS
        DRAIN
        DBUPGRADE
        POSTCHECKS
        POSTFIXUPS
        POSTUPGRADE
        SYSUPDATES

Stage-Progress Per Container

        +--------+---------+
        |Database|PRECHECKS|
        +--------+---------+
        |CDB$ROOT|    0  % |
        |PDB$SEED|    0  % |
        | PDBORCL|    0  % |
        +--------+---------+

upg> /
Details

        Job No           101
        Oracle SID       cdborcl
        Start Time       26/04/29 09:53:14
        Elapsed (min):   4
        End time:        N/A

Logfiles

        Logs Base:    /u01/upgrade/cdborcl
        Job logs:     /u01/upgrade/cdborcl/101
        Stage logs:   /u01/upgrade/cdborcl/101/prefixups
        TimeZone:     /u01/upgrade/cdborcl/temp
        Remote Dirs:

Stages
        SETUP            <1 min
        GRP              <1 min
        PREUPGRADE       <1 min
        PRECHECKS        1 min
        PREFIXUPS        ~3 min (RUNNING)
        DRAIN
        DBUPGRADE
        POSTCHECKS
        POSTFIXUPS
        POSTUPGRADE
        SYSUPDATES

Stage-Progress Per Container

        +--------+---------+
        |Database|PREFIXUPS|
        +--------+---------+
        |CDB$ROOT|    17 % |
        |PDB$SEED|    0  % |
        | PDBORCL|    0  % |
        +--------+---------+
        

................
................
................
................

upg> lsj +----+-------+---------+---------+-------+----------+-------+----------------+ |Job#|DB_NAME| STAGE|OPERATION| STATUS|START_TIME|UPDATED| MESSAGE| +----+-------+---------+---------+-------+----------+-------+----------------+ | 101|cdborcl|PREFIXUPS|EXECUTING|RUNNING| 09:53:14|81s ago|Executing fixups| +----+-------+---------+---------+-------+----------+-------+----------------+ Total jobs 1
7. Once upgrade gets completed. We will get output like below.

upg> Job 101 completed
------------------- Final Summary --------------------
Number of databases            [ 1 ]

Jobs finished                  [1]
Jobs failed                    [0]
Jobs restored                  [0]
Jobs pending                   [0]

---- Drop GRP at your convenience once you consider it is no longer needed ----
Drop GRP from cdborcl: drop restore point AUTOUPGRADE_9212_CDBORCL1928000

Please check the summary report at:
/u01/upgrade/cfgtoollogs/upgrade/auto/status/status.html
/u01/upgrade/cfgtoollogs/upgrade/auto/status/status.log

[oracle@orcl upgrade]$ cat /u01/upgrade/cfgtoollogs/upgrade/auto/status/status.log
==========================================
          Autoupgrade Summary Report
==========================================
[Date]           Wed Apr 29 16:41:20 IST 2026
[Number of Jobs] 1
==========================================
[Job ID] 101
==========================================
[DB Name]                cdborcl
[Version Before Upgrade] 19.28.0.0.0
[Version After Upgrade]  23.26.1.0.0
------------------------------------------
[Stage Name]    GRP
[Status]        SUCCESS
[Start Time]    2026-04-29 09:53:14
[Duration]      0:00:01
[Detail]        Please drop the following GRPs after Autoupgrade completes:
                 AUTOUPGRADE_9212_CDBORCL1928000
------------------------------------------
[Stage Name]    PREUPGRADE
[Status]        SUCCESS
[Start Time]    2026-04-29 09:53:15
[Duration]      0:00:00
[Log Directory] /u01/upgrade/cdborcl/101/preupgrade
------------------------------------------
[Stage Name]    PRECHECKS
[Status]        SUCCESS
[Start Time]    2026-04-29 09:53:15
[Duration]      0:01:08
[Log Directory] /u01/upgrade/cdborcl/101/prechecks
[Detail]        /u01/upgrade/cdborcl/101/prechecks/cdborcl_preupgrade.log
                Check passed and no manual intervention needed
------------------------------------------
[Stage Name]    PREFIXUPS
[Status]        SUCCESS
[Start Time]    2026-04-29 09:54:24
[Duration]      0:05:54
[Log Directory] /u01/upgrade/cdborcl/101/prefixups
[Detail]        /u01/upgrade/cdborcl/101/prefixups/prefixups.html
------------------------------------------
[Stage Name]    DRAIN
[Status]        SUCCESS
[Start Time]    2026-04-29 10:00:18
[Duration]      0:01:21
[Log Directory] /u01/upgrade/cdborcl/101/drain
------------------------------------------
[Stage Name]    DBUPGRADE
[Status]        SUCCESS
[Start Time]    2026-04-29 10:01:40
[Duration]      5:16:57
[Log Directory] /u01/upgrade/cdborcl/101/dbupgrade
------------------------------------------
[Stage Name]    POSTCHECKS
[Status]        SUCCESS
[Start Time]    2026-04-29 15:18:44
[Duration]      0:00:26
[Log Directory] /u01/upgrade/cdborcl/101/postchecks
[Detail]        /u01/upgrade/cdborcl/101/postchecks/cdborcl_postupgrade.log
                Check passed and no manual intervention needed
------------------------------------------
[Stage Name]    POSTFIXUPS
[Status]        SUCCESS
[Start Time]    2026-04-29 15:19:24
[Duration]      1:21:12
[Log Directory] /u01/upgrade/cdborcl/101/postfixups
[Detail]        /u01/upgrade/cdborcl/101/postfixups/postfixups.html
------------------------------------------
[Stage Name]    POSTUPGRADE
[Status]        SUCCESS
[Start Time]    2026-04-29 16:40:37
[Duration]      0:00:37
[Log Directory] /u01/upgrade/cdborcl/101/postupgrade
------------------------------------------
[Stage Name]    SYSUPDATES
[Status]        SUCCESS
[Start Time]    2026-04-29 16:41:15
[Duration]      0:00:01
[Log Directory] /u01/upgrade/cdborcl/101/sysupdates
------------------------------------------
Summary:/u01/upgrade/cdborcl/101/dbupgrade/upg_summary.log
[oracle@orcl upgrade]$

8. Now take a bounce of database and run the postcheck.

[oracle@orcl ~]$ sqlplus / as sysdba
SQL*Plus: Release 23.26.1.0.0 - Production on Wed Apr 29 17:03:27 2026
Version 23.26.1.0.0

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

Connected to:
Oracle AI Database 26ai Enterprise Edition Release 23.26.1.0.0 - Production
Version 23.26.1.0.0

SQL> show pdbs

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

Total System Global Area 2027132112 bytes
Fixed Size                  5010640 bytes
Variable Size             486539264 bytes
Database Buffers         1526726656 bytes
Redo Buffers                8855552 bytes
Database mounted.
Database opened.
SQL>
SQL> show pdbs

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

   VERSION
----------
        43

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

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

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

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

14 rows selected.

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                                    1500           1491             9       99.4         .6
SYSAUX                                     970            926            44      95.46       4.54
USERS                                        5              1             4         20         80
UNDOTBS1                                   750             87           663       11.6       88.4


SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDBORCL                        READ WRITE NO
         
SQL> alter session set container=PDBORCL;

Session altered.

SQL> SELECT version FROM v$timezone_file;

VERSION
-------
     43

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

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

14 rows selected.

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                                     650            644             6      99.08        .92
SYSAUX                                     620            599            21      96.61       3.39
UNDOTBS1                                   245             65           180      26.53      73.47
USERS                                        5              1             4         20         80

SQL> select count(*) from COMPANY;

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

SQL>

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

9. Now drop the flashback restore point. Perform this only if testing completed post upgradation.
 
SQL>
SQL> def
DEFINE _DATE           = "29-APR-26" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "cdborcl" (CHAR)
DEFINE _USER           = "SYS" (CHAR)
DEFINE _PRIVILEGE      = "AS SYSDBA" (CHAR)
DEFINE _SQLPLUS_RELEASE = "2326010000" (CHAR)
DEFINE _EDITOR         = "vi" (CHAR)
DEFINE _O_VERSION      = "Oracle AI Database 26ai Enterprise Edition Release 23.26.1.0.0 - Production
Version 23.26.1.0.0" (CHAR)
DEFINE _O_RELEASE      = "2326010000" (CHAR)
SQL>

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

NAME                                     GUA TIME
---------------------------------------- --- -----------------------------------
AUTOUPGRADE_9212_CDBORCL1928000          YES 29-APR-26 09.53.14.000000000 AM

SQL> 
SQL> drop restore point AUTOUPGRADE_9212_CDBORCL1928000;

Restore point dropped.

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

no rows selected

SQL>
10. Now update COMPATIBLE parameter.
 
SQL> show parameter COMPATIBLE

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      19.0.0
noncdb_compatible                    boolean     FALSE
SQL>
SQL> ALTER SYSTEM SET COMPATIBLE = '23.6.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 2027132112 bytes
Fixed Size                  5010640 bytes
Variable Size             486539264 bytes
Database Buffers         1526726656 bytes
Redo Buffers                8855552 bytes
Database mounted.
Database opened.

SQL> show parameter COMPATIBLE

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      23.6.0
noncdb_compatible                    boolean     FALSE

SQL> show pdbs

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

NAME                                     OPEN_MODE            VERSION
---------------------------------------- -------------------- -----------------
CDBORCL                                  READ WRITE           23.0.0.0.0

SQL>

Now 19c to 26ai upgrade activity has been successfully completed.

Note: Oracle Database 26ai requires the Container Database (CDB) architecture and does not support non-CDB databases. As a result, any non-CDB database must be converted to CDB before upgrading. Although a direct conversion and upgrade from 19c non-CDB to 26ai CDB can be performed during the upgrade process, however rollback options are limited. If an issue occurs, the only way to revert is by restoring a complete backup using Oracle Data Pump or Oracle Recovery Manager.

==> Syntax for upgrading non-CDB to CDB from 19c to 26ai. You also need to create a blank container database in 26ai. In below example 26ai blank CDB is cdb26.
 
Config file.
$ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -create_sample_file config /u01/upgrade/config.txt noncdbtopdb Generate config file.
global.global_log_dir=/u01/upgrade upg1.upgrade_node=orcl.oraeasy.com upg1.sid=orcl upg1.target_cdb=cdb26 upg1.source_home=/u01/app/oracle/product/19c/dbhome_1 upg1.target_home=/u01/app2/oracle/product/26ai/dbhome_1 upg1.target_pdb_name=orcl upg1.start_time=NOW upg1.target_version=26 upg1.run_utlrp=yes upg1.timezone_upg=yes Rest commands for Analyze & Deploy are same.


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