Tuesday, August 19, 2025

OEM 13.5 Installation on Linux

  • Introduction: Oracle Enterprise Manager (OEM) is Oracle’s unified management platform for overseeing the full Oracle technology stack. OEM enables administrators to monitor, configure, and optimize Oracle Databases, Oracle Middleware, Oracle Applications, and Oracle Engineered Systems. It streamlines critical operations such as patching, configuration management, performance diagnostics, and lifecycle automation, ensuring that Oracle workloads remain secure, reliable, and high-performing. In this article, we will see how to configure the OEM on Linux environment step by step.

  • Prerequisites: Below are the minimum requirements for Linux environment.
    • CPU - 2core
    • RAM - 10GB
    • Disk space - 45GB (/u01) & 50GB (/oem)
    • OEM Binary. Download here.
    • Must have root user or sudo access.
    • Disable the firewall.
  • Environment:
Hostname oem.oraeasy.com/192.168.1.33
OS OL 7.3
OEM Version 13c Release 5 (13.5)
OMS Home /oem/app/oracle/middleware
Agent Base /oem/app/oracle/agent
Repository Database Name OEMDB
Database Version 19.27.0
Oracle Home /u01/app/oracle/product/19c/db_home
  • Now let's proceed to configure the OEM step by step:

  • 1. First we need to verify that the database must have sufficient redo log groups to avoid log file sync wait during installation, if not then add accordingly.
    
    SQL> select name,open_mode,log_mode from v$database;
    
    NAME      OPEN_MODE            LOG_MODE
    --------- -------------------- ------------
    OEMDB     READ WRITE           ARCHIVELOG
    
    SQL> SELECT group#, status,bytes/1024/1024 AS size_mb FROM v$log ORDER BY group#; 
    
        GROUP# STATUS	size_mb
    ---------- ---------	------
             1 INACTIVE	200
             2 CURRENT	200
             3 INACTIVE	200
    
    SQL> ALTER DATABASE ADD LOGFILE GROUP 4 '/u01/app/oracle/oradata/OEMDB/redo04.log' SIZE 1G;
    
    Database altered.
    
    SQL> ALTER DATABASE ADD LOGFILE GROUP 5 '/u01/app/oracle/oradata/OEMDB/redo05.log' SIZE 1G;
    
    Database altered.
    
    SQL> ALTER DATABASE ADD LOGFILE GROUP 6 '/u01/app/oracle/oradata/OEMDB/redo06.log' SIZE 1G;
    
    Database altered.
    
    SQL> SELECT group#, status FROM v$log ORDER BY group#; 
    
        GROUP# STATUS
    ---------- ----------------
             1 INACTIVE
             2 CURRENT
             3 INACTIVE
             4 UNUSED
             5 UNUSED
             6 UNUSED
    
    6 rows selected.
    
    SQL> ALTER DATABASE DROP LOGFILE GROUP 1;
    
    Database altered.
    
    SQL> alter system switch logfile;
    
    System altered.
    
    SQL> SELECT group#, status FROM v$log ORDER BY group#;
    
        GROUP# STATUS
    ---------- ----------------
             2 ACTIVE
             3 INACTIVE
             4 ACTIVE
             5 ACTIVE
             6 CURRENT
    
    SQL> ALTER DATABASE DROP LOGFILE GROUP 3;
    
    Database altered.
    
    SQL> alter system checkpoint;
    
    System altered.
    
    SQL> SELECT group#, status FROM v$log ORDER BY group#;
    
        GROUP# STATUS
    ---------- ----------------
             2 INACTIVE
             4 INACTIVE
             5 CURRENT
             6 INACTIVE
    
    SQL> ALTER DATABASE DROP LOGFILE GROUP 2;
    
    Database altered.
    
    SQL> ALTER DATABASE ADD LOGFILE GROUP 7 '/u01/app/oracle/oradata/OEMDB/redo07.log' SIZE 1G;
    
    Database altered.
    
    SQL> SELECT group#, status FROM v$log ORDER BY group#;
    
        GROUP# STATUS
    ---------- ----------------
             4 INACTIVE
             5 CURRENT
             6 INACTIVE
             7 UNUSED
    
    
    2. Now verify TNS servivce and sys user password.
    
    [oracle@oem ~]$ tnsping oemdb
    
    TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 16-AUG-2025 12:25:05
    
    Copyright (c) 1997, 2025, Oracle.  All rights reserved.
    
    Used parameter files:
    
    
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = oem.oraeasy.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = oemdb)))
    OK (10 msec)
    [oracle@oem ~]$
    [oracle@oem ~]$ sqlplus sys@oemdb as sysdba
    
    SQL*Plus: Release 19.0.0.0.0 - Production on Sat Aug 16 12:25:09 2025
    Version 19.27.0.0.0
    
    Copyright (c) 1982, 2024, Oracle.  All rights reserved.
    
    Enter password:
    
    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.27.0.0.0
    
    SQL> def
    DEFINE _DATE           = "16-AUG-25" (CHAR)
    DEFINE _CONNECT_IDENTIFIER = "oemdb" (CHAR)
    DEFINE _USER           = "SYS" (CHAR)
    DEFINE _PRIVILEGE      = "AS SYSDBA" (CHAR)
    DEFINE _SQLPLUS_RELEASE = "1927000000" (CHAR)
    DEFINE _EDITOR         = "vi" (CHAR)
    DEFINE _O_VERSION      = "Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.27.0.0.0" (CHAR)
    DEFINE _O_RELEASE      = "1927000000" (CHAR)
    SQL>
    SQL> select name,open_mode from v$database;
    
    NAME      OPEN_MODE
    --------- --------------------
    OEMDB     READ WRITE
    
    3. Now we need to change some parameter in Repository database for OEM. Create a pfile for backup.
    
    SQL> select name,open_mode,log_mode from v$database;
    
    NAME      OPEN_MODE            LOG_MODE
    --------- -------------------- ------------
    OEMDB     READ WRITE           ARCHIVELOG
    
    SQL> create pfile='/home/oracle/oemdb.ora' from spfile;
    
    File created.
    
    SQL> show parameter _allow_insert_with_update_check
    SQL> show parameter session_cached_cursors
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    session_cached_cursors               integer     50
    
    SQL> show parameter shared_pool_size
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    shared_pool_size                     big integer 0
    
    SQL> show parameter processes
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    aq_tm_processes                      integer     1
    db_writer_processes                  integer     1
    gcs_server_processes                 integer     0
    global_txn_processes                 integer     1
    job_queue_processes                  integer     40
    log_archive_max_processes            integer     4
    processes                            integer     300
    SQL>
    SQL> show parameter "_allow_insert_with_update_check"
    
    SQL> alter system set "_allow_insert_with_update_check"=true scope=both;
    
    System altered.
    
    SQL> alter system set session_cached_cursors=200 scope=spfile;
    
    System altered.
    
    SQL> alter system set shared_pool_size=600M scope=spfile;
    
    System altered.
    
    SQL> show parameter pga
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    pga_aggregate_limit                  big integer 2G
    pga_aggregate_target                 big integer 0
    SQL>
    SQL> alter system set processes=600 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 1979711112 bytes
    Fixed Size                  8941192 bytes
    Variable Size            1358954496 bytes
    Database Buffers          603979776 bytes
    Redo Buffers                7835648 bytes
    Database mounted.
    Database opened.
    SQL>
    SQL> show parameter _allow_insert_with_update_check
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    _allow_insert_with_update_check      boolean     TRUE
    
    SQL>  show parameter session_cached_cursors
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    session_cached_cursors               integer     200
    
    SQL>  show parameter shared_pool_size
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    shared_pool_size                     big integer 608M
    SQL>
    SQL> show parameter processes
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    aq_tm_processes                      integer     1
    db_writer_processes                  integer     1
    gcs_server_processes                 integer     0
    global_txn_processes                 integer     1
    job_queue_processes                  integer     40
    log_archive_max_processes            integer     4
    processes                            integer     600
    
    4. Now create required directory for OMS & Agent and also place the OEM binary in /oem/software/.
    
    [oracle@oem ~]$ mkdir -p /oem/app/oracle/middleware
    [oracle@oem ~]$ mkdir -p /oem/app/oracle/agent
    [oracle@oem ~]$
    [oracle@oem ~]$ ll /oem/app/oracle/
    total 0
    drwxr-xr-x. 2 oracle oinstall 6 Aug 16 12:18 agent
    drwxr-xr-x. 2 oracle oinstall 6 Aug 16 12:18 middleware
    [oracle@oem ~]$
    [oracle@oem ~]$ cd /oem/software/
    [oracle@oem software]$
    [oracle@oem software]$ ls -lrth
    total 8.0G
    -rwxrwxr-x. 1 oracle oinstall 1.5G Aug 16 12:19 em13500_linux64.bin
    -rwxrwxr-x. 1 oracle oinstall 1.8G Aug 16 12:19 em13500_linux64-2.zip
    -rwxrwxr-x. 1 oracle oinstall 2.0G Aug 16 12:19 em13500_linux64-3.zip
    -rwxrwxr-x. 1 oracle oinstall 1.4G Aug 16 12:19 em13500_linux64-4.zip
    -rwxrwxr-x. 1 oracle oinstall 1.4G Aug 16 12:19 em13500_linux64-5.zip
    [oracle@oem software]$
    
    5. Now we need to start the installation. Make sure that /tmp has 12GB free space. If not then provide a temporary location where 12GB free space is there.
    
    [oracle@oem software]$ pwd
    /oem/software
    [oracle@oem software]$
    [oracle@oem software]$ ./em13500_linux64.bin
    ERROR: Temporary directory /tmp does not have enough free space. At least 12289 MB of free space are required.
    Please input another directory or [Exit]: /u01/software/temp
    Launcher log file is /u01/software/temp/OraInstall2025-08-16_12-28-40PM/launcher2025-08-16_12-28-40PM.log.
    Extracting the installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  . . . . . . .
    . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . Done Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed Checking swap space: must be greater than 512 MB. Actual 4095 MB Passed Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required) Preparing to launch the Oracle Universal Installer from /u01/software/temp/OraInstall2025-08-16_12-28-40PM ScratchPathValue :/u01/software/temp/OraInstall2025-08-16_12-28-40PM Aug 16, 2025 12:34:18 PM org.apache.sshd.common.io.DefaultIoServiceFactoryFactory getIoServiceProvider INFO: No detected/configured IoServiceFactoryFactory using Nio2ServiceFactoryFactory .......................................................................................

    6. Now OEM GUI installer window will open. Follow the below steps.

    Select Advanced Install & click Next.

    Select Skip & click Next.

    Click on Ignore to ignore the warnings.

    Click Next.

    Provide OMS Home, Agent Base directory and OEM server hostname. Then click Next.

    Click Next.

    Provide the password & click Next.

    Provide the Repository Database details & click Next.

    Click on Auto Fix.

    Click Next.

    Click Ok.

    Provide the SYSMAN & Agent Registration password. Then click Next.

    Click Next.

    Click Next.

    Review the details & click Install.

    Note: The entire installation process may take 5-6 hrs. Keep monitoring the database alert log to avoid any faliure.

    Keep Monitoting the progress & related logs.

    If you encountered that the installation gets hung like below. Then check the objects stats of SYSMAN schema and gather its stats. Steps given below:

    
    

    ==> Check if stats are locked or not.

    SQL> SELECT stattype_locked FROM dba_tab_statistics WHERE owner = 'SYSMAN'; STATT ----- ALL ALL ALL ALL ALL ALL ALL ALL ALL ALL ALL .... .... .... 5930 rows selected.

    ==> Unlock the stats & do stat gather.

    SQL> EXEC DBMS_STATS.unlock_schema_stats('SYSMAN'); PL/SQL procedure successfully completed. SQL> SELECT stattype_locked FROM dba_tab_statistics WHERE owner = 'SYSMAN'; STATT ----- .... .... .... 5930 rows selected. SQL> EXEC DBMS_STATS.gather_schema_stats('SYSMAN'); PL/SQL procedure successfully completed.

    Wait for sometime & installation will move further.

    Execute the script from root user. Then click Ok.

    
    [root@oem ~]# /oem/app/oracle/middleware/allroot.sh
    
    Starting to execute allroot.sh .........
    
    Starting to execute /oem/app/oracle/middleware/root.sh ......
    Check /oem/app/oracle/middleware/install/root_oem.oraeasy.com_2025-08-16_18-19-43.log for the output of root script
    
    Finished product-specific root actions.
    /etc exist
    Finished execution of  /oem/app/oracle/middleware/root.sh ......
    
    Starting to execute /oem/app/oracle/agent/agent_13.5.0.0.0/root.sh ......
    
    Finished product-specific root actions.
    /etc exist
    Finished execution of  /oem/app/oracle/agent/agent_13.5.0.0.0/root.sh ......
    [root@oem ~]#
    

    Now installation got completed. Review the details & click Close.
    7. Now check the OMS & Agent status.
    
    [oracle@oem ~]$ cd /oem/app/oracle/middleware/bin
    [oracle@oem bin]$ ./emctl status oms
    Oracle Enterprise Manager Cloud Control 13c Release 5
    Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.
    WebTier is Up
    Oracle Management Server is Up
    JVMD Engine is Up
    [oracle@oem bin]$
    [oracle@oem bin]$ ./emctl status oms -details
    Oracle Enterprise Manager Cloud Control 13c Release 5
    Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.
    Enter Enterprise Manager Root (SYSMAN) Password :
    Console Server Host        : oem.oraeasy.com
    HTTP Console Port          : 7788
    HTTPS Console Port         : 7803
    HTTP Upload Port           : 4889
    HTTPS Upload Port          : 4903
    EM Instance Home           : /oem/app/oracle/gc_inst/em/EMGC_OMS1
    OMS Log Directory Location : /oem/app/oracle/gc_inst/em/EMGC_OMS1/sysman/log
    OMS is not configured with SLB or virtual hostname
    Agent Upload is locked.
    OMS Console is locked.
    Active CA ID: 1
    Console URL: https://oem.oraeasy.com:7803/em
    Upload URL: https://oem.oraeasy.com:4903/empbs/upload
    
    WLS Domain Information
    Domain Name            : GCDomain
    Admin Server Host      : oem.oraeasy.com
    Admin Server HTTPS Port: 7102
    Admin Server is RUNNING
    
    Oracle Management Server Information
    Managed Server Instance Name: EMGC_OMS1
    Oracle Management Server Instance Host: oem.oraeasy.com
    WebTier is Up
    Oracle Management Server is Up
    JVMD Engine is Up
    [oracle@oem bin]$
    
    [oracle@oem bin]$ cd /oem/app/oracle/agent/agent_13.5.0.0.0/bin
    [oracle@oem bin]$ ./emctl status agent
    Oracle Enterprise Manager Cloud Control 13c Release 5
    Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.
    ---------------------------------------------------------------
    Agent Version          : 13.5.0.0.0
    OMS Version            : 13.5.0.0.0
    Protocol Version       : 12.1.0.1.0
    Agent Home             : /oem/app/oracle/agent/agent_inst
    Agent Log Directory    : /oem/app/oracle/agent/agent_inst/sysman/log
    Agent Binaries         : /oem/app/oracle/agent/agent_13.5.0.0.0
    Core JAR Location      : /oem/app/oracle/agent/agent_13.5.0.0.0/jlib
    Agent Process ID       : 3038
    Parent Process ID      : 2742
    Agent URL              : https://oem.oraeasy.com:3872/emd/main/
    Local Agent URL in NAT : https://oem.oraeasy.com:3872/emd/main/
    Repository URL         : https://oem.oraeasy.com:4903/empbs/upload
    Started at             : 2025-08-16 19:21:59
    Started by user        : oracle
    Operating System       : Linux version 4.1.12-61.1.18.el7uek.x86_64 (amd64)
    Number of Targets      : 35
    Last Reload            : (none)
    Last successful upload                       : 2025-08-16 20:04:16
    Last attempted upload                        : 2025-08-16 20:04:16
    Total Megabytes of XML files uploaded so far : 0.14
    Number of XML files pending upload           : 0
    Size of XML files pending upload(MB)         : 0
    Available disk space on upload filesystem    : 60.96%
    Collection Status                            : Collections enabled
    Heartbeat Status                             : Ok
    Last attempted heartbeat to OMS              : 2025-08-16 20:06:20
    Last successful heartbeat to OMS             : 2025-08-16 20:06:20
    Next scheduled heartbeat to OMS              : 2025-08-16 20:07:20
    
    ---------------------------------------------------------------
    Agent is Running and Ready
    [oracle@oem bin]$
    

    8. Now open the below URL & do login with SYSMAN credential.
    https://192.168.1.33:7803/em

    Provide credential & click Login.

    Accept License Agreement.

    Welcome Page.

    Click on Enterprise --> Summary.


    9. Below are the command to start & stop the OEM services. Make sure that Database & Listener services are running.
    
    

    Set environment.

    [oracle@oem ~]$ export OMS_HOME=/oem/app/oracle/middleware [oracle@oem ~]$ export AGENT_HOME=/oem/app/oracle/agent/agent_13.5.0.0.0

    To Start.

    [oracle@oem ~]$ $OMS_HOME/bin/./emctl start oms [oracle@oem ~]$ $OMS_HOME/bin/./emctl start agent

    To Stop.

    [oracle@oem ~]$ $OMS_HOME/bin/./emctl stop oms [oracle@oem ~]$ $OMS_HOME/bin/./emctl stop agent
    Issue Faced: During installation, we faced issue in starting the OMS services due to library issue. You can refer the below troubleshooting & solution steps if you face the same. Do not close the installer GUI window.
    1. In OEM installer log.
    
    INFO: oracle.sysman.top.oms:Copyright (c) 1996, 2021 Oracle Corporation. All rights reserved. 
    INFO: oracle.sysman.top.oms:Starting Oracle Management Server... 
    INFO: oracle.sysman.top.oms:WebTier Could Not Be Started. 
    INFO: oracle.sysman.top.oms:Error Occurred: WebTier Could Not Be Started. 
    INFO: oracle.sysman.top.oms:Please check /oem/app/oracle/gc_inst/em/EMGC_OMS1/sysman/log/emctl.log for error details SEVERE: 
    	oracle.sysman.top.oms:Starting of OMS failed. 
    
    2. In OHS log.
    
    [oracle@oem bin]$ tail -50 /oem/app/oracle/gc_inst/user_projects/domains/GCDomain/system_components/OHS/ohs_nm.log
    2025-08-16 16:16:06  INFO   OHS-0   Domain initialized for /oem/app/oracle/gc_inst/user_projects/domains/GCDomain  
    2025-08-16 16:16:07  INFO   OHS-4112   Creating instance ohs1  
    2025-08-16 16:16:10  INFO   OHS-4114   Updating instance ohs1  
    2025-08-16 17:13:18  INFO   OHS-4018   Starting server ohs1  
    2025-08-16 17:13:18  INFO   OHS-0   Running /oem/app/oracle/middleware/ohs/bin/launch httpd -DOHS_MPM_WORKER -d  /oem/app/oracle/gc_inst/user_projects/domains/GCDomain/config/fmwconfig/components/OHS/instances/ohs1 -k start -f  /oem/app/oracle/gc_inst/user_projects/domains/GCDomain/config/fmwconfig/components/OHS/instances/ohs1/httpd.conf  
    2025-08-16 17:13:19  INFO   OHS-0   /oem/app/oracle/middleware/ohs/bin/httpd: error while loading shared libraries: libclntshcore.so.12.1: 
    cannot open shared object file: No such file or directory
    

    That’s the root cause: OHS (Oracle HTTP Server) cannot find the Oracle client library libclntshcore.so.12.1.

    3. Set LD_LIBRARY_PATH in setDomainEnv.sh file.
    
    [oracle@oem bin]$ cat /oem/app/oracle/gc_inst/user_projects/domains/GCDomain/bin/setDomainEnv.sh|grep LD_LIBRARY_PATH
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
    
    4. Link the libclntshcore library file.
    
    [oracle@oem lib]$ ln -s /u01/app/oracle/product/19c/db_home/lib/libclntshcore.so.19.1 libclntshcore.so.12.1
    [oracle@oem lib]$ ls -l /oem/app/oracle/middleware/ohs/lib/libclntshcore.so.*
    lrwxrwxrwx. 1 oracle oinstall 61 Aug 16 17:56 /oem/app/oracle/middleware/ohs/lib/libclntshcore.so.12.1 -> /u01/app/oracle/product/19c/db_home/lib/libclntshcore.so.19.1
    
    5. Stop & Start the OMS manually.
    
    [oracle@oem lib]$ cd /oem/app/oracle/middleware/bin
    [oracle@oem bin]$ ./emctl stop oms -all
    Oracle Enterprise Manager Cloud Control 13c Release 5
    Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.
    Stopping Oracle Management Server...
    WebTier Could Not Be Stopped
    Oracle Management Server Successfully Stopped
    AdminServer Failed to be Stopped
    Check Admin Server log file for details: /oem/app/oracle/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/logs/EMGC_ADMINSERVER.out
    Oracle Management Server is Down
    JVMD Engine is Down
    [oracle@oem bin]$
    [oracle@oem bin]$ ./emctl start oms
    Oracle Enterprise Manager Cloud Control 13c Release 5
    Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.
    Starting Oracle Management Server...
    WebTier Successfully Started
    Oracle Management Server Successfully Started
    Oracle Management Server is Up
    JVMD Engine is Up
    [oracle@oem bin]$
    
    6. Last click Retry on installer GUI window.


    Thank you for reading!

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

    Abhishek Shrivastava

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

    Tuesday, August 12, 2025

    Oracle Database Auto Start and Stop Script

    • Introduction: In Oracle Database, it is important to automatically start and stop the database services during server reboots or shutdowns to avoid manual work and ensure smooth operations. Oracle provides built-in scripts dbstart and dbshut for this purpose. By using these scripts with Linux services like systemd or init.d, we can make sure the database and listener start automatically when the server starts and shutdown properly during server shutdown. In this article, we will see how to implement this script step by step.

    • Prerequisites:
      • Must have root user or sudo access.
    • Environment:
    Hostname orcl.oraeasy.com
    OS OL9
    Database Name ORCLDC
    Database Version 19.27.0
    Oracle Home /u01/app/oracle/product/19.0.0/dbhome_1

    • Approach: We will use Oracle provided script for auto startup (dbstart) and shutdown (dbshut) and those are located in $ORACLE_HOME/bin.

    • Now let's proceed to configure the script step by step:

    • 1. First we need to upadte the /etc/oratab file and make the Auto Start Option as Y, so that oracle provided script can be executed.
      
      
      [oracle@orcl ~]$ cat /etc/oratab
      #
      
      # This file is used by ORACLE utilities.  It is created by root.sh
      # and updated by either Database Configuration Assistant while creating
      # a database or ASM Configuration Assistant while creating ASM instance.
      
      # A colon, ':', is used as the field terminator.  A new line terminates
      # the entry.  Lines beginning with a pound sign, '#', are comments.
      #
      # Entries are of the form:
      #   $ORACLE_SID:$ORACLE_HOME::
      #
      # The first and second fields are the system identifier and home
      # directory of the database respectively.  The third field indicates
      # to the dbstart utility that the database should , "Y", or should not,
      # "N", be brought up at system boot time.
      #
      # Multiple entries with the same $ORACLE_SID are not allowed.
      #
      #
      orcldc:/u01/app/oracle/product/19.0.0/dbhome_1:Y
      [oracle@orcl ~]$
      
      
      2. Now create a script with name dbservice in /etc/rc.d/init.d from root user.
      
      
      [root@orcl ~]# cat /etc/rc.d/init.d/dbservice
       
      #!/bin/bash
      # chkconfig: 35 99 10
      # description: Starts and Stops Oracle database and Listener processes
      ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
      ORA_OWNER=oracle
      PATH=${PATH}:$ORACLE_HOME/bin
      HOST=`hostname`
      PLATFORM=`uname`
      export ORACLE_HOME PATH
      case "$1" in
        'start')
              echo -n $"Starting the Oracle Database: "
          su - $ORA_OWNER -c "$ORACLE_HOME/bin/lsnrctl start" &
          su - $ORA_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME" &
         ;;
        'stop')
              echo -n $"Shutting down the Oracle Database: "
          su - $ORA_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop" &
          su - $ORA_OWNER -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" &
      ;;
      'restart')
              echo -n $"Shutting down the Oracle Database: "
                su - $ORA_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop" &
                su - $ORA_OWNER -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" &
              sleep 5
              echo -n $"Starting the Oracle Database: "
              su - $ORA_OWNER -c "$ORACLE_HOME/bin/lsnrctl start" &
              su - $ORA_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME" &
        ;;
      *)
              echo "usage: $0 {start|stop|restart}"
              exit
      
         ;;
      esac
      
      # End of script dbservice
      [root@orcl ~]#
      
      
      3. Now change the permission for the file dbservice so that Oracle user can access that file.
      
      
      [root@orcl ~]# id oracle
      uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba)
      [root@orcl ~]#
      [root@orcl ~]# chgrp oinstall /etc/init.d/dbservice
      [root@orcl ~]#
      [root@orcl ~]# chmod 750 /etc/init.d/dbservice
      
      
      4. Now register the dbservice to the Linux service management system and generates the required symbolic links within the /etc/rc.d directory.
      
      
      [root@orcl ~]# chkconfig --add dbservice
      [root@orcl ~]#
      [root@orcl ~]# cd /etc/rc.d
      [root@orcl rc.d]#
      [root@orcl rc.d]# ls
      init.d  rc0.d  rc1.d  rc2.d  rc3.d  rc4.d  rc5.d  rc6.d  rc.local
      [root@orcl rc.d]#
      [root@orcl rc.d]# cd rc3.d/
      [root@orcl rc3.d]#
      [root@orcl rc3.d]# ls -lrth
      total 0
      lrwxrwxrwx. 1 root root 19 Jul 15 22:21 S99dbservice -> ../init.d/dbservice
      [root@orcl rc3.d]#
      [root@orcl rc3.d]#  chkconfig --list | grep dbservice
      
      Note: This output shows SysV services only and does not include native
            systemd services. SysV configuration data might be overridden by native
            systemd configuration.
      
            If you want to list systemd services use 'systemctl list-unit-files'.
            To see services enabled on particular target use
            'systemctl list-dependencies [target]'.
      
      dbservice       0:off   1:off   2:off   3:on    4:off   5:on    6:off
      [root@orcl rc3.d]#
      
      
      5. Now enable the service.
      
      [root@orcl rc3.d]# systemctl status dbservice
      Unit dbservice.service could not be found.
      [root@orcl rc3.d]#
      [root@orcl rc3.d]# systemctl enable dbservice
      dbservice.service is not a native service, redirecting to systemd-sysv-install.
      Executing: /usr/lib/systemd/systemd-sysv-install enable dbservice
      
      [root@orcl rc3.d]#
      [root@orcl rc3.d]# systemctl status dbservice
      ○ dbservice.service - SYSV: Starts and Stops Oracle database and Listener processes
           Loaded: loaded (/etc/rc.d/init.d/dbservice; generated)
           Active: inactive (dead)
             Docs: man:systemd-sysv-generator(8)
      [root@orcl rc3.d]#
      
      
      6. Now ensure that SELINUX is set to permissive in /etc/selinux/config.
      
      [root@orcl ~]# cat /etc/selinux/config
      
      # This file controls the state of SELinux on the system.
      # SELINUX= can take one of these three values:
      #     enforcing - SELinux security policy is enforced.
      #     permissive - SELinux prints warnings instead of enforcing.
      #     disabled - No SELinux policy is loaded.
      # See also:
      # https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/using_selinux/changing-selinux-states-and-modes_using-selinux#changing-selinux-modes-at-boot-time_changing-selinux-states-and-modes
      #
      # NOTE: Up to RHEL 8 release included, SELINUX=disabled would also
      # fully disable SELinux during boot. If you need a system with SELinux
      # fully disabled instead of SELinux running with no policy loaded, you
      # need to pass selinux=0 to the kernel command line. You can use grubby
      # to persistently set the bootloader to boot with selinux=0:
      #
      #    grubby --update-kernel ALL --args selinux=0
      #
      # To revert back to SELinux enabled:
      #
      #    grubby --update-kernel ALL --remove-args selinux
      #
      SELINUX=permissive
      # SELINUXTYPE= can take one of these three values:
      #     targeted - Targeted processes are protected,
      #     minimum - Modification of targeted policy. Only selected processes are protected.
      #     mls - Multi Level Security protection.
      SELINUXTYPE=targeted
      
      
      [root@orcl ~]#
      
      
      7. Now restart the server and check the database services.
      
      [root@orcl ~]# init 6
      [root@orcl ~]#
      Remote side unexpectedly closed network connection
      
      ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
      
      Session stopped
          - Press  to exit tab
          - Press R to restart session
          - Press S to save terminal output to file
          ┌──────────────────────────────────────────────────────────────────────┐
          │                 • MobaXterm Personal Edition v23.2 •                 │
          │               (SSH client, X server and network tools)               │
          │                                                                      │
          │ ⮞ SSH session to oracle@192.168.101.13                               │
          │   • Direct SSH      :  ✓                                             │
          │   • SSH compression :  ✓                                             │
          │   • SSH-browser     :  ✓                                             │
          │   • X11-forwarding  :  ✓  (remote display is forwarded through SSH)  │
          │                                                                      │
          │ ⮞ For more info, ctrl+click on help or visit our website.            │
          └──────────────────────────────────────────────────────────────────────┘
      
      Last login: Tue Jul 15 22:34:57 2025
      [oracle@orcl ~]$ ps -ef|grep pmon
      oracle      4420       1  0 22:35 ?        00:00:00 ora_pmon_orcldc
      oracle      5097    5029  0 22:40 pts/0    00:00:00 grep --color=auto pmon
      [oracle@orcl ~]$
      [oracle@orcl ~]$ ps -ef|grep pmon
      oracle      4420       1  0 22:35 ?        00:00:00 ora_pmon_orcldc
      oracle      5129    5029  0 22:50 pts/0    00:00:00 grep --color=auto pmon
      [oracle@orcl ~]$ ps -ef|grep tns
      root           6       2  0 22:34 ?        00:00:00 [netns]
      oracle      2492       1  0 22:35 ?        00:00:00 /u01/app/oracle/product/19.0.0/dbhome_1/bin/tnslsnr LISTENER -inherit
      oracle      5131    5029  0 22:50 pts/0    00:00:00 grep --color=auto tns
      [oracle@orcl ~]$
      [oracle@orcl ~]$ sqlplus / as sysdba
      
      SQL*Plus: Release 19.0.0.0.0 - Production on Tue Jul 15 22:50:43 2025
      Version 19.27.0.0.0
      
      Copyright (c) 1982, 2024, Oracle.  All rights reserved.
      
      
      Connected to:
      Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
      Version 19.27.0.0.0
      
      SQL> show pdbs
      
          CON_ID CON_NAME                       OPEN MODE  RESTRICTED
      ---------- ------------------------------ ---------- ----------
               2 PDB$SEED                       READ ONLY  NO
               3 ORCLPDB                        READ WRITE NO
      SQL>
      SQL> exit
      Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
      Version 19.27.0.0.0
      [oracle@orcl ~]$
      [oracle@orcl ~]$
      [oracle@orcl ~]$ lsnrctl status
      
      LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 15-JUL-2025 22:50:53
      
      Copyright (c) 1991, 2025, Oracle.  All rights reserved.
      
      Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orcl.oraeasy.com)(PORT=1521)))
      STATUS of the LISTENER
      ------------------------
      Alias                     LISTENER
      Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
      Start Date                15-JUL-2025 22:35:06
      Uptime                    0 days 0 hr. 15 min. 48 sec
      Trace Level               off
      Security                  ON: Local OS Authentication
      SNMP                      OFF
      Listener Parameter File   /u01/app/oracle/product/19.0.0/dbhome_1/network/admin/listener.ora
      Listener Log File         /u01/app/oracle/diag/tnslsnr/orcl/listener/alert/log.xml
      Listening Endpoints Summary...
        (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl.oraeasy.com)(PORT=1521)))
        (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
      Services Summary...
      Service "2c3d6bacf692345be0633350a8c050ed" has 1 instance(s).
        Instance "orcldc", status READY, has 1 handler(s) for this service...
      Service "ORCLDC" has 1 instance(s).
        Instance "orcldc", status READY, has 1 handler(s) for this service...
      Service "orcldcXDB" has 1 instance(s).
        Instance "orcldc", status READY, has 1 handler(s) for this service...
      Service "orclpdb" has 1 instance(s).
        Instance "orcldc", status READY, has 1 handler(s) for this service...
      The command completed successfully
      [oracle@orcl ~]$
      [oracle@orcl ~]$
      
      


      Thank you for reading!

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

      Abhishek Shrivastava

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

    Tuesday, August 5, 2025

    Oracle Database upgrade from 12c to 19c (autoupgrade.jar)

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

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

    • Prerequisites:
      • 12c binary installed with database.
      • 19c 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 devdb.oraeasy.com
    Database Name DEVDB
    Database Version 12c(12.2.0.1)
    CDB/PDB Yes, Single Instance
    Oracle Home /u01/app/oracle/product/12c/db_1
    Datafile Location /u01/app/oracle/oradata/devdb

    Target Database
    Database Version 19c (19.3.0.0.0)
    Oracle Home /u01/app/oracle/product/19c/db_home
  • Now proceed for upgradation activity step by step:

  • 1. Take precheck at source.
    First create a table with test user so that data can be validated post upgradation:
    
    SQL> show user
    USER is "TEST"
    SQL>
    SQL> def
    DEFINE _DATE           = "31-JUL-25" (CHAR)
    DEFINE _CONNECT_IDENTIFIER = "DEVDBPDB" (CHAR)
    DEFINE _USER           = "TEST" (CHAR)
    DEFINE _PRIVILEGE      = "" (CHAR)
    DEFINE _SQLPLUS_RELEASE = "1202000100" (CHAR)
    DEFINE _EDITOR         = "vi" (CHAR)
    DEFINE _O_VERSION      = "Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production" (CHAR)
    DEFINE _O_RELEASE      = "1202000100" (CHAR)
    SQL>
    SQL> CREATE TABLE COMPANY (EMP_ID INT,NAME VARCHAR(255), COMPANY VARCHAR(255));
    
    Table created.
    
    SQL>
    SQL> INSERT INTO COMPANY VALUES (101,'Yash','WIPRO');
    
    1 row created.
    
    SQL>
    SQL> INSERT INTO COMPANY VALUES (102,'Vijay','AIRTEL');
    
    1 row created.
    
    SQL> INSERT INTO COMPANY VALUES (103,'Riya','TCS');
    
    1 row created.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> select count(*) from COMPANY;
    
      COUNT(*)
    ----------
             3
    
    SQL> exit
    Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
    
    Now take Precheck like Tablespace, Invalid object count & Registery Components:
    
    SQL> show pdbs
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             2 PDB$SEED                       READ ONLY  NO
             3 DEVDBPDB                       READ WRITE NO
             
    SQL> set lines 200 pages 1000
    SQL> select t.tablespace,  t.totalspace as " Totalspace(MB)",
    round((t.totalspace-nvl(fs.freespace,0)),2) as "Used Space(MB)",
    nvl(fs.freespace,0) as "Freespace(MB)",
    round(((t.totalspace-nvl(fs.freespace,0))/t.totalspace)*100,2) as "%Used",
    round((nvl(fs.freespace,0)/t.totalspace)*100,2) as "% Free"
    from
    (select round(sum(d.bytes)/(1024*1024)) as totalspace,d.tablespace_name tablespace
    from dba_data_files d
    group by d.tablespace_name) t,
    (select round(sum(f.bytes)/(1024*1024)) as freespace,f.tablespace_name tablespace
    from dba_free_space f
    group by f.tablespace_name) fs
    where t.tablespace=fs.tablespace (+)
    order by "% Free";
    SQL>  
    
    TABLESPACE                      Totalspace(MB) Used Space(MB) Freespace(MB)      %Used     % Free
    ------------------------------ --------------- -------------- ------------- ---------- ----------
    SYSTEM                                     800            796             4       99.5         .5
    UNDOTBS1                                    70             66             4      94.29       5.71
    SYSAUX                                     470            442            28      94.04       5.96
    USERS                                        5              1             4         20         80
    
    SQL> select count(*) from dba_objects where status='INVALID';
    
      COUNT(*)
    ----------
             0
             
    SQL> col COMP_ID for a10
    SQL> col COMP_NAME for a40
    SQL> col VERSION for a15
    SQL> set lines 180
    SQL> set pages 9998
    SQL> select COMP_ID,COMP_NAME,VERSION,STATUS from dba_registry;
    
    COMP_ID    COMP_NAME                                VERSION         STATUS
    ---------- ---------------------------------------- --------------- ---------------
    CATALOG    Oracle Database Catalog Views            12.2.0.1.0      VALID
    CATPROC    Oracle Database Packages and Types       12.2.0.1.0      VALID
    JAVAVM     JServer JAVA Virtual Machine             12.2.0.1.0      VALID
    XML        Oracle XDK                               12.2.0.1.0      VALID
    CATJAVA    Oracle Database Java Packages            12.2.0.1.0      VALID
    APS        OLAP Analytic Workspace                  12.2.0.1.0      VALID
    RAC        Oracle Real Application Clusters         12.2.0.1.0      OPTION OFF
    XDB        Oracle XML Database                      12.2.0.1.0      VALID
    OWM        Oracle Workspace Manager                 12.2.0.1.0      VALID
    CONTEXT    Oracle Text                              12.2.0.1.0      VALID
    ORDIM      Oracle Multimedia                        12.2.0.1.0      VALID
    SDO        Spatial                                  12.2.0.1.0      VALID
    XOQ        Oracle OLAP API                          12.2.0.1.0      VALID
    OLS        Oracle Label Security                    12.2.0.1.0      VALID
    DV         Oracle Database Vault                    12.2.0.1.0      VALID
    
    15 rows selected.
    
    SQL>
    
    

    ==> For PDB.

    SQL> alter session set container=DEVDBPDB; Session altered. SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 3 DEVDBPDB READ WRITE NO SQL> set lines 200 pages 1000 SQL> select t.tablespace, t.totalspace as " Totalspace(MB)", round((t.totalspace-nvl(fs.freespace,0)),2) as "Used Space(MB)", nvl(fs.freespace,0) as "Freespace(MB)", round(((t.totalspace-nvl(fs.freespace,0))/t.totalspace)*100,2) as "%Used", round((nvl(fs.freespace,0)/t.totalspace)*100,2) as "% Free" from (select round(sum(d.bytes)/(1024*1024)) as totalspace,d.tablespace_name tablespace from dba_data_files d group by d.tablespace_name) t, (select round(sum(f.bytes)/(1024*1024)) as freespace,f.tablespace_name tablespace from dba_free_space f group by f.tablespace_name) fs where t.tablespace=fs.tablespace (+) order by "% Free"; SQL> SQL> select count(*) from dba_objects where status='INVALID'; COUNT(*) ---------- 0 SQL> select COMP_ID,COMP_NAME,VERSION,STATUS from dba_registry; COMP_ID COMP_NAME VERSION STATUS ---------- ---------------------------------------- --------------- ----------------- CATALOG Oracle Database Catalog Views 12.2.0.1.0 VALID CATPROC Oracle Database Packages and Types 12.2.0.1.0 VALID JAVAVM JServer JAVA Virtual Machine 12.2.0.1.0 VALID XML Oracle XDK 12.2.0.1.0 VALID CATJAVA Oracle Database Java Packages 12.2.0.1.0 VALID APS OLAP Analytic Workspace 12.2.0.1.0 VALID RAC Oracle Real Application Clusters 12.2.0.1.0 OPTION OFF XDB Oracle XML Database 12.2.0.1.0 VALID OWM Oracle Workspace Manager 12.2.0.1.0 VALID CONTEXT Oracle Text 12.2.0.1.0 VALID ORDIM Oracle Multimedia 12.2.0.1.0 VALID SDO Spatial 12.2.0.1.0 VALID XOQ Oracle OLAP API 12.2.0.1.0 VALID OLS Oracle Label Security 12.2.0.1.0 VALID DV Oracle Database Vault 12.2.0.1.0 VALID 15 rows selected.
    2. Now we need to enable flashback log if not enabled. Also set enough FRA size.
    
    
    SQL>  archive log list
    Database log mode              Archive Mode
    Automatic archival             Enabled
    Archive destination            USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence     10
    Next log sequence to archive   12
    Current log sequence           12
    SQL>
    SQL> select flashback_on from v$database;
    
    FLASHBACK_ON
    ------------------
    NO
    
    SQL> shut immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL>
    SQL> startup mount
    ORACLE instance started.
    
    Total System Global Area 1174405120 bytes
    Fixed Size                  8792056 bytes
    Variable Size             436209672 bytes
    Database Buffers          721420288 bytes
    Redo Buffers                7983104 bytes
    Database mounted.
    SQL>
    SQL> alter database flashback on;
    
    Database altered.
    
    SQL>
    SQL> alter database open;
    
    
    Database altered.
    
    SQL> select flashback_on from v$database;
    
    FLASHBACK_ON
    ------------------
    YES
    
    SQL> select name,open_mode,log_mode from v$database;
    
    NAME      OPEN_MODE            LOG_MODE
    --------- -------------------- ------------
    DEVDB     READ WRITE           ARCHIVELOG
    
    SQL> show parameter compatible
    
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    compatible                           string      12.2.0
    noncdb_compatible                    boolean     FALSE
    
    SQL> show parameter recovery
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    db_recovery_file_dest                string      /u01/app/oracle/fast_recovery_
                                                     area/devdb
    db_recovery_file_dest_size           big integer 5G
    db_unrecoverable_scn_tracking        boolean     TRUE
    recovery_parallelism                 integer     0
    remote_recovery_file_dest            string
    SQL>
    SQL>
    SQL> alter system set db_recovery_file_dest_size=15G;
    
    System altered.
    
    SQL> show parameter recovery
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    db_recovery_file_dest                string      /u01/app/oracle/fast_recovery_
                                                     area/devdb
    db_recovery_file_dest_size           big integer 15G
    db_unrecoverable_scn_tracking        boolean     TRUE
    recovery_parallelism                 integer     0
    remote_recovery_file_dest            string
    SQL>
    
    
    
    3. Now check the java version and update the latest autoupgrade.jar.
    
    [oracle@devdb ~]$ java -version
    openjdk version "1.8.0_102"
    OpenJDK Runtime Environment (build 1.8.0_102-b14)
    OpenJDK 64-Bit Server VM (build 25.102-b14, mixed mode)
    [oracle@devdb ~]$
    [oracle@devdb ~]$
    [oracle@devdb ~]$ /u01/app/oracle/product/19c/db_home/jdk/bin/java -jar /u01/app/oracle/product/19c/db_home/rdbms/admin/autoupgrade.jar -version
    build.version 20190207
    build.date 2019/02/07 12:35:56
    build.label RDBMS_PT.AUTOUPGRADE_LINUX.X64_190205.1800
    
    [oracle@devdb ~]$ cd /u01/app/oracle/product/19c/db_home/rdbms/admin
    [oracle@devdb admin]$ ls -lrth autoupgrade.jar
    -rw-r--r--. 1 oracle oinstall 3.3M Feb  9  2019 autoupgrade.jar
    [oracle@devdb admin]$
    [oracle@devdb admin]$ mv autoupgrade.jar autoupgrade_bkp.jar
    [oracle@devdb admin]$ pwd
    /u01/app/oracle/product/19c/db_home/rdbms/admin
    [oracle@devdb admin]$ ls -lrth autoupgrade*
    -rw-r--r--. 1 oracle oinstall 3.3M Feb  9  2019 autoupgrade_bkp.jar
    -rw-r--r--. 1 oracle oinstall 2.3M Jul 31 11:55 autoupgrade.jar
    [oracle@devdb admin]$ /u01/app/oracle/product/19c/db_home/jdk/bin/java -jar /u01/app/oracle/product/19c/db_home/rdbms/admin/autoupgrade.jar -version
    build.hash e84c9c2
    build.version 19.10.0
    build.date 2020/10/23 10:36:46
    build.max_target_version 19
    build.supported_target_versions 12.2,18,19
    build.type production
    
    [oracle@devdb admin]$
    
    4. Now create the sample config file and edit that file according to our environment.
    
    [oracle@devdb ~]$ mkdir upgrade19c
    [oracle@devdb ~]$ cd upgrade19c/
    [oracle@devdb upgrade19c]$ pwd
    /home/oracle/upgrade19c
    [oracle@devdb upgrade19c]$
    [oracle@devdb upgrade19c]$ /u01/app/oracle/product/19c/db_home/jdk/bin/java -jar /u01/app/oracle/product/19c/db_home/rdbms/admin/autoupgrade.jar -create_sample_file config
    Created sample configuration file /home/oracle/upgrade19c/sample_config.cfg
    [oracle@devdb upgrade19c]$
    [oracle@devdb upgrade19c]$ cp sample_config.cfg devdb_upg.cfg
    [oracle@devdb upgrade19c]$ vi devdb_upg.cfg
    [oracle@devdb upgrade19c]$ cat devdb_upg.cfg
    #
    # sample config file
    #
    # build version 19.10.0
    # build date    2020/10/23 10:36:46
    #
    #
    # Global configurations
    #
    # This directory will include the following
    #   (1) AutoUpgrade's global directory
    #   (2) Any logs, not directly tied to a job
    #   (3) Config files
    #   (4) progress.json and status.json
    global.autoupg_log_dir=/home/oracle/upgrade19c/upg_logs
    
    #
    # Database number 1
    #
    upg1.dbname=devdb
    upg1.start_time=NOW
    upg1.source_home=/u01/app/oracle/product/12c/db_1
    upg1.target_home=/u01/app/oracle/product/19c/db_home
    upg1.sid=devdb
    upg1.log_dir=/home/oracle/upgrade19c/upg_logs/devdb
    upg1.upgrade_node=devdb.oraeasy.com
    upg1.target_version=19
    upg1.run_utlrp=yes
    upg1.timezone_upg=yes
    [oracle@devdb upgrade19c]$
    
    5. Now run the autoupgrade.jar in analyze mode to anlyze the upgrade for any expected issues.
    
    [oracle@devdb upgrade19c]$ export ORACLE_HOME=/u01/app/oracle/product/19c/db_home
    [oracle@devdb upgrade19c]$ echo $ORACLE_HOME
    /u01/app/oracle/product/19c/db_home
    [oracle@devdb upgrade19c]$ ls
    devdb_upg.cfg  sample_config.cfg
    [oracle@devdb upgrade19c]$ $ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -config devdb_upg.cfg -mode analyze
    AutoUpgrade tool launched with default options
    Processing config file ...
    +--------------------------------+
    | Starting AutoUpgrade execution |
    +--------------------------------+
    1 databases will be analyzed
    Type 'help' to list console commands
    upg>
    upg> lsj
    +----+-------+---------+---------+-------+--------------+--------+----------------------------+
    |Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME| UPDATED|                     MESSAGE|
    +----+-------+---------+---------+-------+--------------+--------+----------------------------+
    | 100|  devdb|PRECHECKS|PREPARING|RUNNING|25/07/31 12:10|12:10:33|Loading database information|
    +----+-------+---------+---------+-------+--------------+--------+----------------------------+
    Total jobs 1
    
    upg>
    upg> lsj
    +----+-------+---------+---------+-------+--------------+--------+----------------------------+
    |Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME| UPDATED|                     MESSAGE|
    +----+-------+---------+---------+-------+--------------+--------+----------------------------+
    | 100|  devdb|PRECHECKS|PREPARING|RUNNING|25/07/31 12:10|12:10:33|Loading database information|
    +----+-------+---------+---------+-------+--------------+--------+----------------------------+
    Total jobs 1
    
    upg>
    upg> Job 100 completed
    ------------------- Final Summary --------------------
    Number of databases            [ 1 ]
    
    Jobs finished successfully     [1]
    Jobs failed                    [0]
    Jobs pending                   [0]
    ------------- JOBS FINISHED SUCCESSFULLY -------------
    Job 100 for devdb
    
    [oracle@devdb upgrade19c]$
    
    We can view the logs at the location defined in config file.

    6. Now run the autoupgrade.jar in deploy mode to start the actual upgrade process.
    
    [oracle@devdb upgrade19c]$ export ORACLE_HOME=/u01/app/oracle/product/19c/db_home
    [oracle@devdb upgrade19c]$
    [oracle@devdb upgrade19c]$ echo $ORACLE_HOME
    /u01/app/oracle/product/19c/db_home
    [oracle@devdb upgrade19c]$
    [oracle@devdb upgrade19c]$ $ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -config devdb_upg.cfg -mode DEPLOY
    AutoUpgrade tool launched with default options
    Processing config file ...
    +--------------------------------+
    | Starting AutoUpgrade execution |
    +--------------------------------+
    1 databases will be processed
    Type 'help' to list console commands
    upg>
    upg> lsj
    +----+-------+---------+---------+-------+--------------+--------+----------------------------+
    |Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME| UPDATED|                     MESSAGE|
    +----+-------+---------+---------+-------+--------------+--------+----------------------------+
    | 101|  devdb|PRECHECKS|PREPARING|RUNNING|25/07/31 12:28|12:28:27|Loading database information|
    +----+-------+---------+---------+-------+--------------+--------+----------------------------+
    Total jobs 1
    
    upg>
    upg> lsj
    +----+-------+---------+---------+-------+--------------+--------+-------------+
    |Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME| UPDATED|      MESSAGE|
    +----+-------+---------+---------+-------+--------------+--------+-------------+
    | 101|  devdb|PREFIXUPS|EXECUTING|RUNNING|25/07/31 12:28|12:29:22|Remaining 6/6|
    +----+-------+---------+---------+-------+--------------+--------+-------------+
    Total jobs 1
    
    
    7. Now you can view the job status like below and check logs.
    
    upg>
    
    upg> status -job 101
    Progress
    -----------------------------------
    Start time:      25/07/31 12:28
    Elapsed (min):   19
    End time:        N/A
    Last update:     2025-07-31T12:47:28.458
    Stage:           DBUPGRADE
    Operation:       EXECUTING
    Status:          RUNNING
    Pending stages:  4
    Stage summary:
        SETUP             <1 min
        GRP               <1 min
        PREUPGRADE        <1 min
        PRECHECKS         <1 min
        PREFIXUPS         4 min
        DRAIN             <1 min
        DBUPGRADE         13 min (IN PROGRESS)
    
    Job Logs Locations
    -----------------------------------
    Logs Base:    /home/oracle/upgrade19c/upg_logs/devdb/devdb
    Job logs:     /home/oracle/upgrade19c/upg_logs/devdb/devdb/101
    Stage logs:   /home/oracle/upgrade19c/upg_logs/devdb/devdb/101/dbupgrade
    TimeZone:     /home/oracle/upgrade19c/upg_logs/devdb/devdb/temp
    
    Additional information
    -----------------------------------
    Details:
    [Upgrading] is [14%] completed for [devdb-cdb$root]
                     +---------+---------------+
                     |CONTAINER|     PERCENTAGE|
                     +---------+---------------+
                     | CDB$ROOT|  UPGRADE [14%]|
                     | PDB$SEED|UPGRADE PENDING|
                     | DEVDBPDB|UPGRADE PENDING|
                     +---------+---------------+
    
    Error Details:
    None
    
    upg>  /
    Progress
    -----------------------------------
    Start time:      25/07/31 12:28
    Elapsed (min):   92
    End time:        N/A
    Last update:     2025-07-31T14:00:17.118
    Stage:           DBUPGRADE
    Operation:       EXECUTING
    Status:          RUNNING
    Pending stages:  4
    Stage summary:
        SETUP             <1 min
        GRP               <1 min
        PREUPGRADE        <1 min
        PRECHECKS         <1 min
        PREFIXUPS         4 min
        DRAIN             <1 min
        DBUPGRADE         85 min (IN PROGRESS)
    
    Job Logs Locations
    -----------------------------------
    Logs Base:    /home/oracle/upgrade19c/upg_logs/devdb/devdb
    Job logs:     /home/oracle/upgrade19c/upg_logs/devdb/devdb/101
    Stage logs:   /home/oracle/upgrade19c/upg_logs/devdb/devdb/101/dbupgrade
    TimeZone:     /home/oracle/upgrade19c/upg_logs/devdb/devdb/temp
    
    Additional information
    -----------------------------------
    Details:
    [Compiling] is [88%] completed for [devdb-cdb$root] objects remaining is [347]
                     +---------+---------------+
                     |CONTAINER|     PERCENTAGE|
                     +---------+---------------+
                     | CDB$ROOT|  COMPILE [88%]|
                     | PDB$SEED|UPGRADE PENDING|
                     | DEVDBPDB|UPGRADE PENDING|
                     +---------+---------------+
    
    Error Details:
    None
    
    upg>
    
    upg> /
    Progress
    -----------------------------------
    Start time:      25/07/31 12:28
    Elapsed (min):   117
    End time:        N/A
    Last update:     2025-07-31T14:22:24.887
    Stage:           DBUPGRADE
    Operation:       EXECUTING
    Status:          RUNNING
    Pending stages:  4
    Stage summary:
        SETUP             <1 min
        GRP               <1 min
        PREUPGRADE        <1 min
        PRECHECKS         <1 min
        PREFIXUPS         4 min
        DRAIN             <1 min
        DBUPGRADE         110 min (IN PROGRESS)
    
    Job Logs Locations
    -----------------------------------
    Logs Base:    /home/oracle/upgrade19c/upg_logs/devdb/devdb
    Job logs:     /home/oracle/upgrade19c/upg_logs/devdb/devdb/101
    Stage logs:   /home/oracle/upgrade19c/upg_logs/devdb/devdb/101/dbupgrade
    TimeZone:     /home/oracle/upgrade19c/upg_logs/devdb/devdb/temp
    
    Additional information
    -----------------------------------
    Details:
    [Upgrading] is [10%] completed for [devdb-devdbpdb]
                     +---------+--------------------------------------+
                     |CONTAINER|                            PERCENTAGE|
                     +---------+--------------------------------------+
                     | CDB$ROOT|SUCCESSFULLY UPGRADED [devdb-cdb$root]|
                     | PDB$SEED|                         UPGRADE [10%]|
                     | DEVDBPDB|                         UPGRADE [10%]|
                     +---------+--------------------------------------+
    
    Error Details:
    None
    
    upg>
    
    8. Once upgrade gets completed. We will get output like below.
    
    upg> Job 101 completed
    ------------------- Final Summary --------------------
    Number of databases            [ 1 ]
    
    Jobs finished successfully     [1]
    Jobs failed                    [0]
    Jobs pending                   [0]
    ------------- JOBS FINISHED SUCCESSFULLY -------------
    Job 101 for devdb
    
    ---- Drop GRP at your convenience once you consider it is no longer needed ----
    Drop GRP from devdb: drop restore point AUTOUPGRADE_9212_DEVDB122010
    
    
    9. Now take a bounce of database and run the postcheck.
    
    [oracle@devdb ~]$ sqlplus / as sysdba
    
    SQL*Plus: Release 19.0.0.0.0 - Production on Thu Jul 31 16:20:48 2025
    Version 19.3.0.0.0
    
    Copyright (c) 1982, 2019, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.3.0.0.0
    
    SQL> shut immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL>
    SQL> startup
    ORACLE instance started.
    
    Total System Global Area 1174405120 bytes
    Fixed Size                  9134080 bytes
    Variable Size             654311424 bytes
    Database Buffers          503316480 bytes
    Redo Buffers                7643136 bytes
    Database mounted.
    Database opened.
    SQL>
    
    SQL> show pdbs
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             2 PDB$SEED                       READ ONLY  NO
             3 DEVDBPDB                       READ WRITE NO
    SQL>
    SQL> SELECT version FROM v$timezone_file;
    
       VERSION
    ----------
            32
    
    SQL> select count(1) from dba_objects where status='INVALID';
    
      COUNT(1)
    ----------
             0
    
    SQL>
    SQL> col COMP_ID for a10
    SQL> col COMP_NAME for a40
    SQL> col VERSION for a15
    SQL> set lines 180
    SQL> set pages 999
    SQL> select COMP_ID,COMP_NAME,VERSION,STATUS from dba_registry;
    
    COMP_ID    COMP_NAME                                VERSION         STATUS
    ---------- ---------------------------------------- --------------- --------------------------------------------
    CATALOG    Oracle Database Catalog Views            19.0.0.0.0      VALID
    CATPROC    Oracle Database Packages and Types       19.0.0.0.0      VALID
    JAVAVM     JServer JAVA Virtual Machine             19.0.0.0.0      VALID
    XML        Oracle XDK                               19.0.0.0.0      VALID
    CATJAVA    Oracle Database Java Packages            19.0.0.0.0      VALID
    APS        OLAP Analytic Workspace                  19.0.0.0.0      VALID
    RAC        Oracle Real Application Clusters         19.0.0.0.0      OPTION OFF
    XDB        Oracle XML Database                      19.0.0.0.0      VALID
    OWM        Oracle Workspace Manager                 19.0.0.0.0      VALID
    CONTEXT    Oracle Text                              19.0.0.0.0      VALID
    ORDIM      Oracle Multimedia                        19.0.0.0.0      VALID
    SDO        Spatial                                  19.0.0.0.0      VALID
    XOQ        Oracle OLAP API                          19.0.0.0.0      VALID
    OLS        Oracle Label Security                    19.0.0.0.0      VALID
    DV         Oracle Database Vault                    19.0.0.0.0      VALID
    
    15 rows selected.
    
    SQL>
    
    

    ==> For PDB.

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

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

    10. Now verify the table data.
    
    [oracle@devdb ~]$ sqlplus test@DEVDBPDB
    
    SQL*Plus: Release 19.0.0.0.0 - Production on Thu Jul 31 16:25:48 2025
    Version 19.3.0.0.0
    
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
    
    Enter password:
    Last Successful login time: Mon Jul 31 2025 10:20:09 +05:30
    
    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    
    SQL> show user
    USER is "TEST"
    SQL>
    SQL> def
    DEFINE _DATE           = "31-JUL-25" (CHAR)
    DEFINE _CONNECT_IDENTIFIER = "DEVDBPDB" (CHAR)
    DEFINE _USER           = "TEST" (CHAR)
    DEFINE _PRIVILEGE      = "" (CHAR)
    DEFINE _SQLPLUS_RELEASE = "1202000100" (CHAR)
    DEFINE _EDITOR         = "vi" (CHAR)
    DEFINE _O_VERSION      = "Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production" (CHAR)
    DEFINE _O_RELEASE      = "1900000000" (CHAR)
    SQL>
    SQL> select count(*) from COMPANY;
    
      COUNT(*)
    ----------
             3
    
    SQL>
    
    
    11. Now drop the flashback restore point.
    
    SQL> col name for a20
    SQL> col GUARANTEE_FLASHBACK_DATABASE for a10
    SQL> col TIME for a60
    SQL> set lines 190
    SQL> select NAME,GUARANTEE_FLASHBACK_DATABASE,TIME from V$restore_point;
    
    NAME                                     GUA TIME
    ---------------------------------------- --- ----------------------------------------
    AUTOUPGRADE_9212_DEVDB122010             YES 31-JUL-25 12.28.27.000000000 PM
    
    SQL>
    SQL> drop restore point AUTOUPGRADE_9212_DEVDB122010;
    
    Restore point dropped.
    
    SQL> select NAME,GUARANTEE_FLASHBACK_DATABASE,TIME from V$restore_point;
    
    no rows selected
    
    SQL>
    
    12. Now update COMPATIBLE parameter.
    
    SQL>  show parameter COMPATIBLE
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    compatible                           string      12.2.0
    noncdb_compatible                    boolean     FALSE
    SQL>
    SQL>  ALTER SYSTEM SET COMPATIBLE = '19.0.0' SCOPE=SPFILE;
    
    System altered.
    
    SQL> shut immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL>
    
    SQL> startup
    ORACLE instance started.
    
    Total System Global Area 1174405120 bytes
    Fixed Size                  9134080 bytes
    Variable Size             771751936 bytes
    Database Buffers          385875968 bytes
    Redo Buffers                7643136 bytes
    Database mounted.
    Database opened.
    SQL>
    SQL> show parameter COMPATIBLE
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    compatible                           string      19.0.0
    noncdb_compatible                    boolean     FALSE
    SQL>
    SQL> select name,open_mode,version from v$database,v$instance;
    
    NAME                 OPEN_MODE            VERSION
    -------------------- -------------------- ---------------
    DEVDB                READ WRITE           19.0.0.0.0
    
    SQL>
    

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


    Thank you for reading!

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

    Abhishek Shrivastava

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

    Tuesday, July 29, 2025

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

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

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

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

    Target Database
    Database Version 19c (19.3.0.0.0)
    Oracle Home /u01/app/oracle/product/19c/db_home
  • Now proceed for upgradation activity step by step:

  • 1. Take precheck at source.
    First create a table with test user so that data can be validated post upgradation:
    
    SQL> show user
    USER is "TEST"
    SQL>
    SQL> def
    DEFINE _DATE           = "28-JUL-25" (CHAR)
    DEFINE _CONNECT_IDENTIFIER = "DEVDBPDB" (CHAR)
    DEFINE _USER           = "TEST" (CHAR)
    DEFINE _PRIVILEGE      = "" (CHAR)
    DEFINE _SQLPLUS_RELEASE = "1202000100" (CHAR)
    DEFINE _EDITOR         = "vi" (CHAR)
    DEFINE _O_VERSION      = "Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production" (CHAR)
    DEFINE _O_RELEASE      = "1202000100" (CHAR)
    SQL>
    SQL> CREATE TABLE COMPANY (EMP_ID INT,NAME VARCHAR(255), COMPANY VARCHAR(255));
    
    Table created.
    
    SQL>
    SQL> INSERT INTO COMPANY VALUES (101,'Yash','WIPRO');
    
    1 row created.
    
    SQL>
    SQL> INSERT INTO COMPANY VALUES (102,'Vijay','AIRTEL');
    
    1 row created.
    
    SQL> INSERT INTO COMPANY VALUES (103,'Riya','TCS');
    
    1 row created.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> select count(*) from COMPANY;
    
      COUNT(*)
    ----------
             3
    
    SQL> exit
    Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
    
    Now take Precheck like Tablespace, Invalid object count & Registery Components:
    
    SQL> show pdbs
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             2 PDB$SEED                       READ ONLY  NO
             3 DEVDBPDB                       READ WRITE NO
             
    SQL> set lines 200 pages 1000
    SQL> select t.tablespace,  t.totalspace as " Totalspace(MB)",
    round((t.totalspace-nvl(fs.freespace,0)),2) as "Used Space(MB)",
    nvl(fs.freespace,0) as "Freespace(MB)",
    round(((t.totalspace-nvl(fs.freespace,0))/t.totalspace)*100,2) as "%Used",
    round((nvl(fs.freespace,0)/t.totalspace)*100,2) as "% Free"
    from
    (select round(sum(d.bytes)/(1024*1024)) as totalspace,d.tablespace_name tablespace
    from dba_data_files d
    group by d.tablespace_name) t,
    (select round(sum(f.bytes)/(1024*1024)) as freespace,f.tablespace_name tablespace
    from dba_free_space f
    group by f.tablespace_name) fs
    where t.tablespace=fs.tablespace (+)
    order by "% Free";
    SQL>  
    
    TABLESPACE                      Totalspace(MB) Used Space(MB) Freespace(MB)      %Used     % Free
    ------------------------------ --------------- -------------- ------------- ---------- ----------
    SYSTEM                                     800            796             4       99.5         .5
    UNDOTBS1                                    70             66             4      94.29       5.71
    SYSAUX                                     470            442            28      94.04       5.96
    USERS                                        5              1             4         20         80
    
    SQL> select count(*) from dba_objects where status='INVALID';
    
      COUNT(*)
    ----------
             0
             
    SQL> col COMP_ID for a10
    SQL> col COMP_NAME for a40
    SQL> col VERSION for a15
    SQL> set lines 180
    SQL> set pages 9998
    SQL> select COMP_ID,COMP_NAME,VERSION,STATUS from dba_registry;
    
    COMP_ID    COMP_NAME                                VERSION         STATUS
    ---------- ---------------------------------------- --------------- ---------------
    CATALOG    Oracle Database Catalog Views            12.2.0.1.0      VALID
    CATPROC    Oracle Database Packages and Types       12.2.0.1.0      VALID
    JAVAVM     JServer JAVA Virtual Machine             12.2.0.1.0      VALID
    XML        Oracle XDK                               12.2.0.1.0      VALID
    CATJAVA    Oracle Database Java Packages            12.2.0.1.0      VALID
    APS        OLAP Analytic Workspace                  12.2.0.1.0      VALID
    RAC        Oracle Real Application Clusters         12.2.0.1.0      OPTION OFF
    XDB        Oracle XML Database                      12.2.0.1.0      VALID
    OWM        Oracle Workspace Manager                 12.2.0.1.0      VALID
    CONTEXT    Oracle Text                              12.2.0.1.0      VALID
    ORDIM      Oracle Multimedia                        12.2.0.1.0      VALID
    SDO        Spatial                                  12.2.0.1.0      VALID
    XOQ        Oracle OLAP API                          12.2.0.1.0      VALID
    OLS        Oracle Label Security                    12.2.0.1.0      VALID
    DV         Oracle Database Vault                    12.2.0.1.0      VALID
    
    15 rows selected.
    
    SQL> alter session set container=DEVDBPDB;
    
    Session altered.
    
    SQL> show pdbs
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             3 DEVDBPDB                       READ WRITE NO
    
    SQL> set lines 200 pages 1000
    SQL> select t.tablespace,  t.totalspace as " Totalspace(MB)",
    round((t.totalspace-nvl(fs.freespace,0)),2) as "Used Space(MB)",
    nvl(fs.freespace,0) as "Freespace(MB)",
    round(((t.totalspace-nvl(fs.freespace,0))/t.totalspace)*100,2) as "%Used",
    round((nvl(fs.freespace,0)/t.totalspace)*100,2) as "% Free"
    from
    (select round(sum(d.bytes)/(1024*1024)) as totalspace,d.tablespace_name tablespace
    from dba_data_files d
    group by d.tablespace_name) t,
    (select round(sum(f.bytes)/(1024*1024)) as freespace,f.tablespace_name tablespace
    from dba_free_space f
    group by f.tablespace_name) fs
    where t.tablespace=fs.tablespace (+)
    order by "% Free";
    SQL>  
    
    SQL> select count(*) from dba_objects where status='INVALID';
    
      COUNT(*)
    ----------
             0
    
    SQL> select COMP_ID,COMP_NAME,VERSION,STATUS from dba_registry;
    
    COMP_ID    COMP_NAME                                VERSION         STATUS
    ---------- ---------------------------------------- --------------- -----------------
    CATALOG    Oracle Database Catalog Views            12.2.0.1.0      VALID
    CATPROC    Oracle Database Packages and Types       12.2.0.1.0      VALID
    JAVAVM     JServer JAVA Virtual Machine             12.2.0.1.0      VALID
    XML        Oracle XDK                               12.2.0.1.0      VALID
    CATJAVA    Oracle Database Java Packages            12.2.0.1.0      VALID
    APS        OLAP Analytic Workspace                  12.2.0.1.0      VALID
    RAC        Oracle Real Application Clusters         12.2.0.1.0      OPTION OFF
    XDB        Oracle XML Database                      12.2.0.1.0      VALID
    OWM        Oracle Workspace Manager                 12.2.0.1.0      VALID
    CONTEXT    Oracle Text                              12.2.0.1.0      VALID
    ORDIM      Oracle Multimedia                        12.2.0.1.0      VALID
    SDO        Spatial                                  12.2.0.1.0      VALID
    XOQ        Oracle OLAP API                          12.2.0.1.0      VALID
    OLS        Oracle Label Security                    12.2.0.1.0      VALID
    DV         Oracle Database Vault                    12.2.0.1.0      VALID
    
    15 rows selected.
    
    2. Now we need to perform few steps before the upgradation. Below steps should be performed on CDB & each PDBs.
    
    

    ==> Gather Dictonary stats.

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

    ==> Recycle bin purging.

    SQL> PURGE DBA_RECYCLEBIN; DBA Recyclebin purged.

    ==> Refresh Materlized views.

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

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

    SQL> archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 5 Next log sequence to archive 7 Current log sequence 7 SQL> SQL> SQL> select flashback_on from v$database; FLASHBACK_ON ------------------ NO SQL> shut immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> SQL> startup mount ORACLE instance started. Total System Global Area 1174405120 bytes Fixed Size 8792056 bytes Variable Size 436209672 bytes Database Buffers 721420288 bytes Redo Buffers 7983104 bytes Database mounted. SQL> SQL> alter database flashback on; Database altered. SQL> SQL> alter database open; Database altered. SQL> select flashback_on from v$database; FLASHBACK_ON ------------------ YES SQL> select name,open_mode,log_mode from v$database; NAME OPEN_MODE LOG_MODE --------- -------------------- ------------ DEVDB READ WRITE ARCHIVELOG SQL> show parameter compatible NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ compatible string 12.2.0 noncdb_compatible boolean FALSE SQL> show parameter recovery NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string /u01/app/oracle/fast_recovery_ area/devdb db_recovery_file_dest_size big integer 5G db_unrecoverable_scn_tracking boolean TRUE recovery_parallelism integer 0 remote_recovery_file_dest string SQL> SQL> SQL> alter system set db_recovery_file_dest_size=15G; System altered. SQL> show parameter recovery NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string /u01/app/oracle/fast_recovery_ area/devdb db_recovery_file_dest_size big integer 15G db_unrecoverable_scn_tracking boolean TRUE recovery_parallelism integer 0 remote_recovery_file_dest string SQL> SQL> select * from V$restore_point; no rows selected. SQL> create restore point pre_upgrade12c guarantee flashback database; Restore point created. SQL> SQL> col name for a20 SQL> col GUARANTEE_FLASHBACK_DATABASE for a10 SQL> col TIME for a60 SQL> set lines 190 SQL> select NAME,GUARANTEE_FLASHBACK_DATABASE,TIME from V$restore_point; NAME GUARANTEE_ TIME -------------------- ---------- ------------------------------------------------------------ PRE_UPGRADE12C YES 28-JUL-25 10.39.05.000000000 AM SQL>
    3. Now run the preupgrade script.
    
    [oracle@devdb ~]$ mkdir preupgrade
    [oracle@devdb ~]$ cd preupgrade/
    [oracle@devdb preupgrade]$ pwd
    /home/oracle/preupgrade
    
    [oracle@devdb preupgrade]$ ls /u01/app/oracle/product/19c/db_home/rdbms/admin/preupgrade.jar
    /u01/app/oracle/product/19c/db_home/rdbms/admin/preupgrade.jar
    
    [oracle@devdb preupgrade]$ /u01/app/oracle/product/12c/db_1/jdk/bin/java -jar  /u01/app/oracle/product/19c/db_home/rdbms/admin/preupgrade.jar FILE DIR /home/oracle/preupgrade
    ==================
    PREUPGRADE SUMMARY
    ==================
      /home/oracle/preupgrade/preupgrade.log
      /home/oracle/preupgrade/preupgrade_fixups.sql
      /home/oracle/preupgrade/postupgrade_fixups.sql
    
    Execute fixup scripts across the entire CDB:
    
    Before upgrade:
    
    1. Execute preupgrade fixups with the below command
    $ORACLE_HOME/perl/bin/perl -I$ORACLE_HOME/perl/lib -I$ORACLE_HOME/rdbms/admin $ORACLE_HOME/rdbms/admin/catcon.pl -l /home/oracle/preupgrade/ -b preup_devdb /home/oracle/preupgrade/preupgrade_fixups.sql
    
    2. Review logs under /home/oracle/preupgrade/
    
    After the upgrade:
    
    1. Execute postupgrade fixups with the below command
    $ORACLE_HOME/perl/bin/perl -I$ORACLE_HOME/perl/lib -I$ORACLE_HOME/rdbms/admin $ORACLE_HOME/rdbms/admin/catcon.pl -l /home/oracle/preupgrade/ -b postup_devdb /home/oracle/preupgrade/postupgrade_fixups.sql
    
    2. Review logs under /home/oracle/preupgrade/
    
    Preupgrade complete: 2025-07-28T10:43:32
    [oracle@devdb preupgrade]$
    
    4. Now run the preupgrade_fixups.sql for CDB & each PDBs.
    
    SQL> show pdbs
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             2 PDB$SEED                       READ ONLY  NO
             3 DEVDBPDB                       READ WRITE NO
    SQL>
    SQL>
    SQL> @/home/oracle/preupgrade/preupgrade_fixups.sql
    Executing Oracle PRE-Upgrade Fixup Script
    
    Auto-Generated by:       Oracle Preupgrade Script
                             Version: 19.0.0.0.0 Build: 1
    Generated on:            2025-07-28 10:42:11
    
    For Source Database:     DEVDB
    Source Database Version: 12.2.0.1.0
    For Upgrade to Version:  19.0.0.0.0
    
    Executing in container:  CDB$ROOT
    
    Preup                             Preupgrade
    Action                            Issue Is
    Number  Preupgrade Check Name     Remedied    Further DBA Action
    ------  ------------------------  ----------  --------------------------------
        1.  pre_fixed_objects         YES         None.
        2.  tablespaces_info          NO          Informational only.
                                                  Further action is optional.
        3.  cycle_number              NO          Informational only.
                                                  Further action is optional.
        4.  rman_recovery_version     NO          Informational only.
                                                  Further action is optional.
    
    The fixup scripts have been run and resolved what they can. However,
    there are still issues originally identified by the preupgrade that
    have not been remedied and are still present in the database.
    Depending on the severity of the specific issue, and the nature of
    the issue itself, that could mean that your database is not ready
    for upgrade.  To resolve the outstanding issues, start by reviewing
    the preupgrade_fixups.sql and searching it for the name of
    the failed CHECK NAME or Preupgrade Action Number listed above.
    There you will find the original corresponding diagnostic message
    from the preupgrade which explains in more detail what still needs
    to be done.
    
    PL/SQL procedure successfully completed.
    
    
    Session altered.
    
    SQL>
    
    

    ==> For PDB.

    SQL> alter session set container=DEVDBPDB; Session altered. SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 3 DEVDBPDB READ WRITE NO SQL> @/home/oracle/preupgrade/preupgrade_fixups.sql Executing Oracle PRE-Upgrade Fixup Script Auto-Generated by: Oracle Preupgrade Script Version: 19.0.0.0.0 Build: 1 Generated on: 2025-07-28 10:42:11 For Source Database: DEVDB Source Database Version: 12.2.0.1.0 For Upgrade to Version: 19.0.0.0.0 Executing in container: DEVDBPDB Preup Preupgrade Action Issue Is Number Preupgrade Check Name Remedied Further DBA Action ------ ------------------------ ---------- -------------------------------- 1. pre_fixed_objects YES None. 2. tablespaces_info NO Informational only. Further action is optional. The fixup scripts have been run and resolved what they can. However, there are still issues originally identified by the preupgrade that have not been remedied and are still present in the database. Depending on the severity of the specific issue, and the nature of the issue itself, that could mean that your database is not ready for upgrade. To resolve the outstanding issues, start by reviewing the preupgrade_fixups.sql and searching it for the name of the failed CHECK NAME or Preupgrade Action Number listed above. There you will find the original corresponding diagnostic message from the preupgrade which explains in more detail what still needs to be done. PL/SQL procedure successfully completed. Session altered. SQL>
    5. Now shutdown the 12c database and listener.
    
    SQL> show pdbs
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             2 PDB$SEED                       READ ONLY  NO
             3 DEVDBPDB                       READ WRITE NO
    SQL>
    SQL>  select name,open_mode,cdb,version,status from v$database, v$instance;
    
    NAME      OPEN_MODE            CDB VERSION           STATUS
    --------- -------------------- --- ----------------- ------------
    DEVDB     READ WRITE           YES 12.2.0.1.0        OPEN
    
    SQL>
    SQL> shut immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL>
    SQL> exit
    Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
    [oracle@devdb ~]$
    [oracle@devdb ~]$ lsnrctl stop
    
    LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 28-JUL-2025 10:54:36
    
    Copyright (c) 1991, 2016, Oracle.  All rights reserved.
    
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    The command completed successfully
    
    6. Now copy spfile & password file from 12c ORACLE HOME to 19c ORACLE HOME.
    
    [oracle@devdb ~]$ cd $ORACLE_HOME/dbs
    [oracle@devdb dbs]$
    [oracle@devdb dbs]$ ls -lrth
    total 18M
    -rw-r--r--. 1 oracle oinstall 3.1K May 15  2015 init.ora
    -rw-r-----. 1 oracle oinstall   24 Jul  8 19:16 lkDEVDB
    -rw-r-----. 1 oracle oinstall 3.5K Jul  8 19:26 orapwdevdb
    -rw-r-----. 1 oracle oinstall  18M Jul 28 10:35 snapcf_devdb.f
    -rw-r-----. 1 oracle oinstall 3.5K Jul 28 10:51 spfiledevdb.ora
    -rw-rw----. 1 oracle oinstall 1.6K Jul 28 10:55 hc_devdb.dat
    [oracle@devdb dbs]$
    [oracle@devdb dbs]$ cp orapwdevdb spfiledevdb.ora /u01/app/oracle/product/19c/db_home/dbs/
    [oracle@devdb dbs]$
    [oracle@devdb dbs]$
    [oracle@devdb dbs]$ ls -lrth /u01/app/oracle/product/19c/db_home/dbs/
    total 12K
    -rw-r--r--. 1 oracle oinstall 3.1K May 14  2015 init.ora
    -rw-r-----. 1 oracle oinstall 3.5K Jul 28 10:57 spfiledevdb.ora
    -rw-r-----. 1 oracle oinstall 3.5K Jul 28 10:57 orapwdevdb
    [oracle@devdb dbs]$
    
    
    7. Now set the environment for 19c and start database in UPGRADE mode.
    
    [oracle@devdb ~]$ export ORACLE_HOME=/u01/app/oracle/product/19c/db_home
    [oracle@devdb ~]$ export ORACLE_SID=devdb
    [oracle@devdb ~]$ cd /u01/app/oracle/product/19c/db_home/bin/
    [oracle@devdb bin]$ ./sqlplus / as sysdba
    
    SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 28 11:00:32 2025
    Version 19.3.0.0.0
    
    Copyright (c) 1982, 2019, Oracle.  All rights reserved.
    
    Connected to an idle instance.
    
    SQL>
    SQL> startup upgrade
    ORACLE instance started.
    
    Total System Global Area 1174405120 bytes
    Fixed Size                  9134080 bytes
    Variable Size             419430400 bytes
    Database Buffers          738197504 bytes
    Redo Buffers                7643136 bytes
    Database mounted.
    Database opened.
    SQL>
    SQL> select name,open_mode,cdb,version,status from v$database, v$instance;
    
    NAME      OPEN_MODE            CDB VERSION           STATUS
    --------- -------------------- --- ----------------- ------------
    DEVDB     READ WRITE           YES 19.0.0.0.0        OPEN MIGRATE
    
    SQL> show pdbs
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             2 PDB$SEED                       MIGRATE    YES
             3 DEVDBPDB                       MOUNTED
    SQL>
    SQL> show parameter spfile
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    spfile                               string      /u01/app/oracle/product/19c/db
                                                     _home/dbs/spfiledevdb.ora
    SQL>
    
    
    8. Now run the dbupgrade from 19c ORACLE HOME.
    
    [oracle@devdb bin]$ pwd
    /u01/app/oracle/product/19c/db_home/bin
    [oracle@devdb bin]$
    [oracle@devdb bin]$ ls -lrth dbupgrade
    -rwxr-x---. 1 oracle oinstall 3.1K Apr 17  2019 dbupgrade
    [oracle@devdb bin]$
    [oracle@devdb bin]$ nohup ./dbupgrade &
    [1] 14989
    [oracle@devdb bin]$ nohup: ignoring input and appending output to ‘nohup.out’
    
    [oracle@devdb bin]$
    [oracle@devdb bin]$ jobs -l
    [1]+ 14989 Running                 nohup ./dbupgrade &
    [oracle@devdb bin]$
    [oracle@devdb bin]$ ps -ef | grep -i catctl.pl
    oracle   14994 14989  2 11:05 pts/1    00:00:00 /u01/app/oracle/product/19c/db_home/perl/bin/perl -I/u01/app/oracle/product/19c/db_home/perl/lib /u01/app/oracle/product/19c/db_home/rdbms/admin/catctl.pl /u01/app/oracle/product/19c/db_home/rdbms/admin/catupgrd.sql
    oracle   15138  3828  0 11:05 pts/1    00:00:00 grep --color=auto -i catctl.pl
    [oracle@devdb bin]$
    
    9. We can monitor the upgrade logs like below.
    
    [oracle@devdb bin]$ more nohup.out
    
    Argument list for [/u01/app/oracle/product/19c/db_home/rdbms/admin/catctl.pl]
    For Oracle internal use only A = 0
    Run in                       c = 0
    Do not run in                C = 0
    Input Directory              d = 0
    Echo OFF                     e = 1
    Simulate                     E = 0
    Forced cleanup               F = 0
    Log Id                       i = 0
    Child Process                I = 0
    Log Dir                      l = 0
    Priority List Name           L = 0
    Upgrade Mode active          M = 0
    SQL Process Count            n = 0
    SQL PDB Process Count        N = 0
    Open Mode Normal             o = 0
    Start Phase                  p = 0
    End Phase                    P = 0
    Reverse Order                r = 0
    AutoUpgrade Resume           R = 0
    Script                       s = 0
    Serial Run                   S = 0
    RO User Tablespaces          T = 0
    Display Phases               y = 0
    Debug catcon.pm              z = 0
    Debug catctl.pl              Z = 0
    
    catctl.pl VERSION: [19.0.0.0.0]
               STATUS: [Production]
                BUILD: [RDBMS_19.3.0.0.0DBRU_LINUX.X64_190417]
    
    
    /u01/app/oracle/product/19c/db_home/rdbms/admin/orahome = [/u01/app/oracle/product/19c/db_home]
    /u01/app/oracle/product/19c/db_home/bin/orabasehome = [/u01/app/oracle/product/19c/db_home]
    catctlGetOraBaseLogDir = [/u01/app/oracle/product/19c/db_home]
    
    Analyzing file /u01/app/oracle/product/19c/db_home/rdbms/admin/catupgrd.sql
    
    Log file directory = [/tmp/cfgtoollogs/upgrade20250728110541]
    
    catcon::set_log_file_base_path: ALL catcon-related output will be written to [/tmp/cfgtoollogs/upgrade20250728110541/catupgrd_catcon_14994.lst]
    
    catcon::set_log_file_base_path: catcon: See [/tmp/cfgtoollogs/upgrade20250728110541/catupgrd*.log] files for output generated by scripts
    
    catcon::set_log_file_base_path: catcon: See [/tmp/cfgtoollogs/upgrade20250728110541/catupgrd_*.lst] files for spool files, if any
    
    
    Number of Cpus        = 2
    Database Name         = devdb
    DataBase Version      = 12.2.0.1.0
    catcon::set_log_file_base_path: ALL catcon-related output will be written to [/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20250728110558/catu
    pgrdcdbroot_catcon_14994.lst]
    
    catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20250728110558/catupgrdcdbroot*.log] files for outpu
    t generated by scripts
    
    catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20250728110558/catupgrdcdbroot_*.lst] files for spoo
    l files, if any
    
    
    Log file directory = [/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20250728110558]
    
    

    ==> Navigate to log directory.

    [oracle@devdb cfgtoollogs]$ cd /u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20250728110558 [oracle@devdb upgrade20250728110558]$ ls -lrth total 4.0M -rw-------. 1 oracle oinstall 556 Jul 28 11:05 catupgrdcdbroot_catcon_14994.lst -rw-r--r--. 1 oracle oinstall 656 Jul 28 11:06 catupgrdcdbroot_catcon_kill_sess_14994_ALL.sql -rw-r--r--. 1 oracle oinstall 63 Jul 28 11:06 catupgrdcdbroot_catcon_15200.done -rw-r--r--. 1 oracle oinstall 63 Jul 28 11:06 catupgrdcdbroot_catcon_15198.done -rw-r--r--. 1 oracle oinstall 63 Jul 28 11:06 catupgrdcdbroot_catcon_15199.done -rw-r--r--. 1 oracle oinstall 4.1K Jul 28 11:06 catupgrdcdbroot_20250728110618_14994.ora -rw-------. 1 oracle oinstall 1.4K Jul 28 11:07 catupgrdcdbroot1.log -rw-------. 1 oracle oinstall 1.4K Jul 28 11:07 catupgrdcdbroot3.log -rw-------. 1 oracle oinstall 1.4K Jul 28 11:07 catupgrdcdbroot2.log -rw-------. 1 oracle oinstall 2.7M Jul 28 11:09 catupgrdcdbroot0.log [oracle@devdb upgrade20250728110558]$ [oracle@devdb upgrade20250728110558]$ tail -100f catupgrdcdbroot0.log 11:09:29 10 OVERLOAD, OBJECT_TYPE, 11:09:29 11 AGGREGATE, PIPELINED, 11:09:29 12 IMPLTYPEOWNER, IMPLTYPENAME, PARALLEL, 11:09:29 13 INTERFACE, DETERMINISTIC, AUTHID, RESULT_CACHE, ORIGIN_CON_ID, 11:09:29 14 POLYMORPHIC 11:09:29 15 from NO_ROOT_SW_FOR_LOCAL(INT$DBA_PROCEDURES) 11:09:29 16 where OWNER = SYS_CONTEXT('USERENV', 'CURRENT_USER') 11:09:29 17 / View created. Elapsed: 00:00:00.07 11:09:30 SQL> 11:09:30 SQL> comment on table USER_PROCEDURES is 11:09:30 2 'Description of the user functions/procedures/packages/types/triggers' 11:09:30 3 / Comment created. Elapsed: 00:00:00.01 11:09:30 SQL> comment on column USER_PROCEDURES.OBJECT_NAME is 11:09:30 2 'Name of the object: top level function/procedure/package/type/trigger name' 11:09:30 3 / Comment created. Elapsed: 00:00:00.02 11:09:30 SQL> comment on column USER_PROCEDURES.PROCEDURE_NAME is 11:09:30 2 'Name of the package or type subprogram' 11:09:30 3 /
    10. Post completion, we will get output like below.
    
    ------------------------------------------------------
    Phases [0-107]         End Time:[2025_07_28 14:12:16]
    Container Lists Inclusion:[PDB$SEED] Exclusion:[NONE]
    ------------------------------------------------------
    
    Grand Total Time: 6455s [PDB$SEED]
    
     LOG FILES: (/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20250728110558/catupgrdpdb_seed*.log)
    
    Upgrade Summary Report Located in:
    /u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20250728110558/upg_summary.log
    
         Time: 4661s For CDB$ROOT
         Time: 6517s For PDB(s)
    
    Grand Total Time: 11178s
    
     LOG FILES: (/u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20250728110558/catupgrdcdbroot*.log)
    
    Upgrade Summary Report Located in:
    /u01/app/oracle/product/19c/db_home/cfgtoollogs/devdb/upgrade20250728110558/upg_summary.log
    
    Grand Total Upgrade Time:    [0d:3h:6m:18s]
    ^C
    [1]+  Done                    nohup ./dbupgrade
    [oracle@devdb bin]$
    
    

    ==> Verify summary.

    [oracle@devdb upgrade20250728110558]$ ls -lrth total 209M -rw-------. 1 oracle oinstall 556 Jul 28 11:05 catupgrdcdbroot_catcon_14994.lst -rw-r--r--. 1 oracle oinstall 0 Jul 28 12:08 catupgrdcdbroot_datapatch_upgrade.err -rw-r--r--. 1 oracle oinstall 1.6K Jul 28 12:16 catupgrdcdbroot_datapatch_upgrade.log -rw-------. 1 oracle oinstall 7.8M Jul 28 12:24 catupgrdcdbroot1.log -rw-------. 1 oracle oinstall 5.6M Jul 28 12:24 catupgrdcdbroot2.log -rw-------. 1 oracle oinstall 8.9M Jul 28 12:24 catupgrdcdbroot3.log -rw-------. 1 oracle oinstall 558 Jul 28 12:24 catupgrdpdb_seed_catcon_530.lst -rw-------. 1 oracle oinstall 558 Jul 28 12:24 catupgrddevdbpdb_catcon_533.lst -rw-r--r--. 1 oracle oinstall 0 Jul 28 13:50 catupgrddevdbpdb_datapatch_upgrade.err -rw-r--r--. 1 oracle oinstall 0 Jul 28 13:50 catupgrdpdb_seed_datapatch_upgrade.err -rw-r--r--. 1 oracle oinstall 1.6K Jul 28 13:55 catupgrdpdb_seed_datapatch_upgrade.log -rw-r--r--. 1 oracle oinstall 1.6K Jul 28 13:55 catupgrddevdbpdb_datapatch_upgrade.log -rw-r--r--. 1 oracle oinstall 11K Jul 28 14:00 catupgrddevdbpdb_stderr.log -rw-------. 1 oracle oinstall 57M Jul 28 14:00 catupgrddevdbpdb0.log -rw-------. 1 oracle oinstall 13M Jul 28 14:00 catupgrddevdbpdb1.log -rw-r--r--. 1 oracle oinstall 11K Jul 28 14:12 catupgrdpdb_seed_stderr.log -rw-------. 1 oracle oinstall 57M Jul 28 14:12 catupgrdpdb_seed0.log -rw-------. 1 oracle oinstall 13M Jul 28 14:12 catupgrdpdb_seed1.log -rw-r--r--. 1 oracle oinstall 39K Jul 28 14:12 catupgrdcdbroot_stderr.log -rw-r--r--. 1 oracle oinstall 5.5K Jul 28 14:12 upg_summary.log -rw-------. 1 oracle oinstall 48M Jul 28 14:12 catupgrdcdbroot0.log [oracle@devdb upgrade20250728110558]$ [oracle@devdb upgrade20250728110558]$ [oracle@devdb upgrade20250728110558]$ tail -200 upg_summary.log Oracle Database Release 19 Post-Upgrade Status Tool 07-28-2025 12:22:2 Container Database: DEVDB [CON_ID: 1 => CDB$ROOT] Component Current Full Elapsed Time Name Status Version HH:MM:SS Oracle Server UPGRADED 19.3.0.0.0 00:32:49 JServer JAVA Virtual Machine UPGRADED 19.3.0.0.0 00:03:36 Oracle XDK UPGRADED 19.3.0.0.0 00:02:06 Oracle Database Java Packages UPGRADED 19.3.0.0.0 00:00:28 OLAP Analytic Workspace UPGRADED 19.3.0.0.0 00:00:47 Oracle Label Security UPGRADED 19.3.0.0.0 00:00:21 Oracle Database Vault UPGRADED 19.3.0.0.0 00:00:48 Oracle Text UPGRADED 19.3.0.0.0 00:01:37 Oracle Workspace Manager UPGRADED 19.3.0.0.0 00:01:13 Oracle Real Application Clusters UPGRADED 19.3.0.0.0 00:00:00 Oracle XML Database UPGRADED 19.3.0.0.0 00:04:19 Oracle Multimedia UPGRADED 19.3.0.0.0 00:01:30 Spatial UPGRADED 19.3.0.0.0 00:10:13 Oracle OLAP API UPGRADED 19.3.0.0.0 00:00:32 Datapatch 00:07:46 Final Actions 00:08:25 Post Upgrade 00:00:49 Total Upgrade Time: 01:11:24 [CON_ID: 1 => CDB$ROOT] Database time zone version is 26. It is older than current release time zone version 32. Time zone upgrade is needed using the DBMS_DST package. Oracle Database Release 19 Post-Upgrade Status Tool 07-28-2025 13:59:2 Container Database: DEVDB [CON_ID: 3 => DEVDBPDB] Component Current Full Elapsed Time Name Status Version HH:MM:SS Oracle Server UPGRADED 19.3.0.0.0 00:52:17 JServer JAVA Virtual Machine UPGRADED 19.3.0.0.0 00:02:45 Oracle XDK UPGRADED 19.3.0.0.0 00:01:32 Oracle Database Java Packages UPGRADED 19.3.0.0.0 00:00:17 OLAP Analytic Workspace UPGRADED 19.3.0.0.0 00:00:51 Oracle Label Security UPGRADED 19.3.0.0.0 00:00:10 Oracle Database Vault UPGRADED 19.3.0.0.0 00:03:41 Oracle Text UPGRADED 19.3.0.0.0 00:00:44 Oracle Workspace Manager UPGRADED 19.3.0.0.0 00:01:01 Oracle Real Application Clusters UPGRADED 19.3.0.0.0 00:00:01 Oracle XML Database UPGRADED 19.3.0.0.0 00:04:46 Oracle Multimedia UPGRADED 19.3.0.0.0 00:01:00 Spatial UPGRADED 19.3.0.0.0 00:13:38 Oracle OLAP API UPGRADED 19.3.0.0.0 00:00:35 Datapatch 00:05:55 Final Actions 00:06:23 Post Upgrade 00:01:08 Total Upgrade Time: 01:32:17 [CON_ID: 3 => DEVDBPDB] Database time zone version is 26. It is older than current release time zone version 32. Time zone upgrade is needed using the DBMS_DST package. Oracle Database Release 19 Post-Upgrade Status Tool 07-28-2025 14:11:5 Container Database: DEVDB [CON_ID: 2 => PDB$SEED] Component Current Full Elapsed Time Name Status Version HH:MM:SS Oracle Server VALID 19.3.0.0.0 00:52:18 JServer JAVA Virtual Machine VALID 19.3.0.0.0 00:02:45 Oracle XDK VALID 19.3.0.0.0 00:01:32 Oracle Database Java Packages VALID 19.3.0.0.0 00:00:17 OLAP Analytic Workspace VALID 19.3.0.0.0 00:00:49 Oracle Label Security VALID 19.3.0.0.0 00:00:13 Oracle Database Vault VALID 19.3.0.0.0 00:03:41 Oracle Text VALID 19.3.0.0.0 00:00:44 Oracle Workspace Manager VALID 19.3.0.0.0 00:01:02 Oracle Real Application Clusters OPTION OFF 19.3.0.0.0 00:00:02 Oracle XML Database VALID 19.3.0.0.0 00:04:47 Oracle Multimedia VALID 19.3.0.0.0 00:01:00 Spatial VALID 19.3.0.0.0 00:13:38 Oracle OLAP API VALID 19.3.0.0.0 00:00:35 Datapatch 00:05:52 Final Actions 00:06:23 Post Upgrade 00:01:04 Post Compile 00:12:11 Total Upgrade Time: 01:44:24 [CON_ID: 2 => PDB$SEED * ] Asterisks denotes compilation time has been included during the upgrade process. Database time zone version is 26. It is older than current release time zone version 32. Time zone upgrade is needed using the DBMS_DST package. Upgrade Times Sorted In Descending Order Total Upgrade Time: 01:44:24 [CON_ID: 2 => PDB$SEED * ] Total Upgrade Time: 01:32:17 [CON_ID: 3 => DEVDBPDB] Total Upgrade Time: 01:11:24 [CON_ID: 1 => CDB$ROOT] Grand Total Upgrade Time: [0d:3h:6m:18s] [oracle@devdb upgrade20250728110558]$
    11. Now edit /etc/oratab and enviornment variable for 19c. Then take bounce of the database.
    
    [oracle@devdb bin]$ cat /etc/oratab
    #
    
    # This file is used by ORACLE utilities.  It is created by root.sh
    # and updated by either Database Configuration Assistant while creating
    # a database or ASM Configuration Assistant while creating ASM instance.
    
    # A colon, ':', is used as the field terminator.  A new line terminates
    # the entry.  Lines beginning with a pound sign, '#', are comments.
    #
    # Entries are of the form:
    #   $ORACLE_SID:$ORACLE_HOME::
    #
    # The first and second fields are the system identifier and home
    # directory of the database respectively.  The third field indicates
    # to the dbstart utility that the database should , "Y", or should not,
    # "N", be brought up at system boot time.
    #
    # Multiple entries with the same $ORACLE_SID are not allowed.
    #
    #
    devdb:/u01/app/oracle/product/19c/db_home:N
    [oracle@devdb bin]$
    
    
    [oracle@devdb ~]$ cat .bash_profile
    # .bash_profile
    
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
            . ~/.bashrc
    fi
    
    # User specific environment and startup programs
    ORACLE_HOME=/u01/app/oracle/product/19c/db_home
    export ORACLE_HOME
    ORACLE_BASE=/u01/app/oracle
    export ORACLE_BASE
    ORACLE_SID=devdb
    export ORACLE_SID
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:.
    export LD_LIBRARY_PATH
    LIBPATH=$ORACLE_HOME/lib32:$ORACLE_HOME/lib:/usr/lib:/lib
    export LIBPATH
    TNS_ADMIN=${ORACLE_HOME}/network/admin
    export TNS_ADMIN
    PATH=$ORACLE_HOME/bin:$PATH:.
    export PATH
    [oracle@devdb ~]$
    
    [oracle@devdb ~]$ sqlplus / as sysdba
    
    SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 28 14:46:01 2025
    Version 19.3.0.0.0
    
    Copyright (c) 1982, 2019, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.3.0.0.0
    
    SQL>
    SQL> show pdbs
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             2 PDB$SEED                       READ ONLY  NO
             3 DEVDBPDB                       MOUNTED
    SQL>
    SQL> shut immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL>
    SQL> startup
    ORACLE instance started.
    
    Total System Global Area 1174405120 bytes
    Fixed Size                  9134080 bytes
    Variable Size             520093696 bytes
    Database Buffers          637534208 bytes
    Redo Buffers                7643136 bytes
    Database mounted.
    Database opened.
    SQL>
    SQL> show pdbs
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             2 PDB$SEED                       READ ONLY  NO
             3 DEVDBPDB                       READ WRITE NO
    SQL>
    SQL> select name,open_mode,cdb,version,status from v$database, v$instance;
    
    NAME      OPEN_MODE            CDB VERSION           STATUS
    --------- -------------------- --- ----------------- ------------
    DEVDB     READ WRITE           YES 19.0.0.0.0        OPEN
    
    SQL>
    
    12. Now run the postfix script for CDB & PDB.
    
    SQL> show pdbs
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             2 PDB$SEED                       READ ONLY  NO
             3 DEVDBPDB                       READ WRITE NO
    SQL>
    SQL> @/home/oracle/preupgrade/postupgrade_fixups.sql
    
    Session altered.
    
    
    PL/SQL procedure successfully completed.
    
    
    Commit complete.
    
    
    Session altered.
    
    
    PL/SQL procedure successfully completed.
    
    
    PL/SQL procedure successfully completed.
    
    
    Package created.
    
    No errors.
    
    Package body created.
    
    
    PL/SQL procedure successfully completed.
    
    No errors.
    
    
    
    Package created.
    
    No errors.
    
    Package body created.
    
    No errors.
    Executing Oracle POST-Upgrade Fixup Script
    
    Auto-Generated by:       Oracle Preupgrade Script
                             Version: 19.0.0.0.0 Build: 1
    Generated on:            2025-07-28 10:42:15
    
    For Source Database:     DEVDB
    Source Database Version: 12.2.0.1.0
    For Upgrade to Version:  19.0.0.0.0
    
    Executing in container:  CDB$ROOT
    
    Preup                             Preupgrade
    Action                            Issue Is
    Number  Preupgrade Check Name     Remedied    Further DBA Action
    ------  ------------------------  ----------  --------------------------------
        5.  old_time_zones_exist      NO          Manual fixup recommended.
        6.  dir_symlinks              YES         None.
        7.  post_dictionary           YES         None.
        8.  post_fixed_objects        NO          Informational only.
                                                  Further action is optional.
    
    The fixup scripts have been run and resolved what they can. However,
    there are still issues originally identified by the preupgrade that
    have not been remedied and are still present in the database.
    Depending on the severity of the specific issue, and the nature of
    the issue itself, that could mean that your database upgrade is not
    fully complete.  To resolve the outstanding issues, start by reviewing
    the postupgrade_fixups.sql and searching it for the name of
    the failed CHECK NAME or Preupgrade Action Number listed above.
    There you will find the original corresponding diagnostic message
    from the preupgrade which explains in more detail what still needs
    to be done.
    
    PL/SQL procedure successfully completed.
    
    
    Session altered.
    
    SQL>
    
    

    ==> For PDB.

    SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 DEVDBPDB READ WRITE NO SQL> SQL> SQL> alter session set container=DEVDBPDB; Session altered. SQL> SQL> SQL> @/home/oracle/preupgrade/postupgrade_fixups.sql Session altered. PL/SQL procedure successfully completed. Commit complete. Session altered. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. Package created. No errors. Package body created. PL/SQL procedure successfully completed. No errors. Package created. No errors. Package body created. No errors. Executing Oracle POST-Upgrade Fixup Script Auto-Generated by: Oracle Preupgrade Script Version: 19.0.0.0.0 Build: 1 Generated on: 2025-07-28 10:42:15 For Source Database: DEVDB Source Database Version: 12.2.0.1.0 For Upgrade to Version: 19.0.0.0.0 Executing in container: DEVDBPDB Preup Preupgrade Action Issue Is Number Preupgrade Check Name Remedied Further DBA Action ------ ------------------------ ---------- -------------------------------- 3. old_time_zones_exist NO Manual fixup recommended. 4. dir_symlinks YES None. 5. post_dictionary YES None. 6. post_fixed_objects NO Informational only. Further action is optional. The fixup scripts have been run and resolved what they can. However, there are still issues originally identified by the preupgrade that have not been remedied and are still present in the database. Depending on the severity of the specific issue, and the nature of the issue itself, that could mean that your database upgrade is not fully complete. To resolve the outstanding issues, start by reviewing the postupgrade_fixups.sql and searching it for the name of the failed CHECK NAME or Preupgrade Action Number listed above. There you will find the original corresponding diagnostic message from the preupgrade which explains in more detail what still needs to be done. PL/SQL procedure successfully completed. Session altered. SQL>
    13. As per above output, we need to update timezone for CDB & PDB. So let's proceed for that.
    
    SQL> show pdbs
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             2 PDB$SEED                       READ ONLY  NO
             3 DEVDBPDB                       READ WRITE NO
    SQL>
    SQL>
    SQL> SELECT version FROM v$timezone_file;
    
       VERSION
    ----------
            26
    
    SQL>
    SQL> @/u01/app/oracle/product/19c/db_home/rdbms/admin/utltz_upg_check.sql
    
    Session altered.
    
    INFO: Starting with RDBMS DST update preparation.
    INFO: NO actual RDBMS DST update will be done by this script.
    INFO: If an ERROR occurs the script will EXIT sqlplus.
    INFO: Doing checks for known issues ...
    INFO: Database version is 19.0.0.0 .
    INFO: This database is a Multitenant database.
    INFO: Current container is CDB$ROOT .
    INFO: Updating the RDBMS DST version of the CDB / CDB$ROOT database
    INFO: will NOT update the RDBMS DST version of PDB databases in this CDB.
    WARNING: There are 1 open PDBs .
    WARNING: They will be closed when running utltz_upg_apply.sql .
    INFO: Database RDBMS DST version is DSTv26 .
    INFO: No known issues detected.
    INFO: Now detecting new RDBMS DST version.
    A prepare window has been successfully started.
    INFO: Newest RDBMS DST version detected is DSTv32 .
    INFO: Next step is checking all TSTZ data.
    INFO: It might take a while before any further output is seen ...
    A prepare window has been successfully ended.
    INFO: A newer RDBMS DST version than the one currently used is found.
    INFO: Note that NO DST update was yet done.
    INFO: Now run utltz_upg_apply.sql to do the actual RDBMS DST update.
    INFO: Note that the utltz_upg_apply.sql script will
    INFO: restart the database 2 times WITHOUT any confirmation or prompt.
    
    Session altered.
    
    SQL>
    SQL> @/u01/app/oracle/product/19c/db_home/rdbms/admin/utltz_upg_apply.sql
    
    Session altered.
    
    INFO: If an ERROR occurs, the script will EXIT SQL*Plus.
    INFO: The database RDBMS DST version will be updated to DSTv32 .
    INFO: This database is a Multitenant database.
    INFO: Current container is CDB$ROOT .
    INFO: Updating the RDBMS DST version of the CDB / CDB$ROOT database
    INFO: will NOT update the RDBMS DST version of PDB databases in this CDB.
    WARNING: There are 1 open PDBs .
    WARNING: They will be closed when CDB$ROOT is restarted
    WARNING: This script will restart the database 2 times
    WARNING: WITHOUT asking ANY confirmation.
    WARNING: Hit control-c NOW if this is not intended.
    INFO: Restarting the database in UPGRADE mode to start the DST upgrade.
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    ORACLE instance started.
    
    Total System Global Area 1174405120 bytes
    Fixed Size                  9134080 bytes
    Variable Size             520093696 bytes
    Database Buffers          637534208 bytes
    Redo Buffers                7643136 bytes
    Database mounted.
    Database opened.
    INFO: Starting the RDBMS DST upgrade.
    INFO: Upgrading all SYS owned TSTZ data.
    INFO: It might take time before any further output is seen ...
    An upgrade window has been successfully started.
    INFO: Restarting the database in NORMAL mode to upgrade non-SYS TSTZ data.
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    ORACLE instance started.
    
    Total System Global Area 1174405120 bytes
    Fixed Size                  9134080 bytes
    Variable Size             520093696 bytes
    Database Buffers          637534208 bytes
    Redo Buffers                7643136 bytes
    Database mounted.
    Database opened.
    INFO: Upgrading all non-SYS TSTZ data.
    INFO: It might take time before any further output is seen ...
    INFO: Do NOT start any application yet that uses TSTZ data!
    INFO: Next is a list of all upgraded tables:
    Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_S"
    Number of failures: 0
    Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_L"
    Number of failures: 0
    Table list: "MDSYS"."SDO_DIAG_MESSAGES_TABLE"
    Number of failures: 0
    Table list: "DVSYS"."SIMULATION_LOG$"
    Number of failures: 0
    Table list: "DVSYS"."AUDIT_TRAIL$"
    Number of failures: 0
    INFO: Total failures during update of TSTZ data: 0 .
    An upgrade window has been successfully ended.
    INFO: Your new Server RDBMS DST version is DSTv32 .
    INFO: The RDBMS DST update is successfully finished.
    INFO: Make sure to exit this SQL*Plus session.
    INFO: Do not use it for timezone related selects.
    
    Session altered.
    
    SQL>
    SQL>
    SQL> exit
    Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.3.0.0.0
    [oracle@devdb ~]$ sqlplus / as sysdba
    
    SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 28 15:01:04 2025
    Version 19.3.0.0.0
    
    Copyright (c) 1982, 2019, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.3.0.0.0
    
    SQL> SELECT version FROM v$timezone_file;
    
       VERSION
    ----------
            32
    
    SQL>
    
    

    ==> For PDB.

    SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 DEVDBPDB READ WRITE NO SQL> SQL> alter session set container=DEVDBPDB; Session altered. SQL> SELECT version FROM v$timezone_file; VERSION ---------- 26 SQL> SQL> @/u01/app/oracle/product/19c/db_home/rdbms/admin/utltz_upg_check.sql Session altered. INFO: Starting with RDBMS DST update preparation. INFO: NO actual RDBMS DST update will be done by this script. INFO: If an ERROR occurs the script will EXIT sqlplus. INFO: Doing checks for known issues ... INFO: Database version is 19.0.0.0 . INFO: This database is a Multitenant database. INFO: This database is a PDB. INFO: Current PDB is DEVDBPDB . INFO: Database RDBMS DST version is DSTv26 . INFO: No known issues detected. INFO: Now detecting new RDBMS DST version. A prepare window has been successfully started. INFO: Newest RDBMS DST version detected is DSTv32 . INFO: Next step is checking all TSTZ data. INFO: It might take a while before any further output is seen ... A prepare window has been successfully ended. INFO: A newer RDBMS DST version than the one currently used is found. INFO: Note that NO DST update was yet done. INFO: Now run utltz_upg_apply.sql to do the actual RDBMS DST update. INFO: Note that the utltz_upg_apply.sql script will INFO: restart the database 2 times WITHOUT any confirmation or prompt. Session altered. SQL> SQL> SQL> @/u01/app/oracle/product/19c/db_home/rdbms/admin/utltz_upg_apply.sql Session altered. INFO: If an ERROR occurs, the script will EXIT SQL*Plus. INFO: The database RDBMS DST version will be updated to DSTv32 . INFO: This database is a Multitenant database. INFO: This database is a PDB. INFO: Current PDB is DEVDBPDB . WARNING: This script will restart the database 2 times WARNING: WITHOUT asking ANY confirmation. WARNING: Hit control-c NOW if this is not intended. INFO: Restarting the database in UPGRADE mode to start the DST upgrade. Pluggable Database closed. Pluggable Database opened. INFO: Starting the RDBMS DST upgrade. INFO: Upgrading all SYS owned TSTZ data. INFO: It might take time before any further output is seen ... An upgrade window has been successfully started. INFO: Restarting the database in NORMAL mode to upgrade non-SYS TSTZ data. Pluggable Database closed. Pluggable Database opened. INFO: Upgrading all non-SYS TSTZ data. INFO: It might take time before any further output is seen ... INFO: Do NOT start any application yet that uses TSTZ data! INFO: Next is a list of all upgraded tables: Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_S" Number of failures: 0 Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_L" Number of failures: 0 Table list: "MDSYS"."SDO_DIAG_MESSAGES_TABLE" Number of failures: 0 Table list: "DVSYS"."SIMULATION_LOG$" Number of failures: 0 Table list: "DVSYS"."AUDIT_TRAIL$" Number of failures: 0 INFO: Total failures during update of TSTZ data: 0 . An upgrade window has been successfully ended. INFO: Your new Server RDBMS DST version is DSTv32 . INFO: The RDBMS DST update is successfully finished. INFO: Make sure to exit this SQL*Plus session. INFO: Do not use it for timezone related selects. Session altered. SQL> SQL> SQL> exit Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0 [oracle@devdb ~]$ [oracle@devdb ~]$ sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 28 15:03:36 2025 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0 SQL> alter session set container=DEVDBPDB; Session altered. SQL> SELECT version FROM v$timezone_file; VERSION ---------- 32 SQL>
    14. Now run the utlusts.sql script to verify timezone status.
    
    SQL> show pdbs
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             2 PDB$SEED                       READ ONLY  NO
             3 DEVDBPDB                       READ WRITE NO
    SQL>
    SQL> @/u01/app/oracle/product/19c/db_home/rdbms/admin/utlusts.sql TEXT
    
    Oracle Database Release 19 Post-Upgrade Status Tool    07-28-2025 15:14:0
    Container Database: DEVDB
    [CON_ID: 1 => CDB$ROOT]
    
    Component                               Current         Full     Elapsed Time
    Name                                    Status          Version  HH:MM:SS
    
    Oracle Server                          UPGRADED      19.3.0.0.0  00:32:49
    JServer JAVA Virtual Machine           UPGRADED      19.3.0.0.0  00:03:36
    Oracle XDK                             UPGRADED      19.3.0.0.0  00:02:06
    Oracle Database Java Packages          UPGRADED      19.3.0.0.0  00:00:28
    OLAP Analytic Workspace                UPGRADED      19.3.0.0.0  00:00:47
    Oracle Label Security                  UPGRADED      19.3.0.0.0  00:00:21
    Oracle Database Vault                  UPGRADED      19.3.0.0.0  00:00:48
    Oracle Text                            UPGRADED      19.3.0.0.0  00:01:37
    Oracle Workspace Manager               UPGRADED      19.3.0.0.0  00:01:13
    Oracle Real Application Clusters       UPGRADED      19.3.0.0.0  00:00:00
    Oracle XML Database                    UPGRADED      19.3.0.0.0  00:04:19
    Oracle Multimedia                      UPGRADED      19.3.0.0.0  00:01:30
    Spatial                                UPGRADED      19.3.0.0.0  00:10:13
    Oracle OLAP API                        UPGRADED      19.3.0.0.0  00:00:32
    Datapatch                                                        00:07:46
    Final Actions                                                    00:08:25
    Post Upgrade                                                     00:00:49
    
    Total Upgrade Time: 01:11:24 [CON_ID: 1 => CDB$ROOT]
    
    Database time zone version is 32. It meets current release needs.
    
    SQL>
    

    ==> For PDB.

    SQL> alter session set container=DEVDBPDB; SQL> SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 3 DEVDBPDB READ WRITE NO SQL> SQL> @/u01/app/oracle/product/19c/db_home/rdbms/admin/utlusts.sql TEXT Oracle Database Release 19 Post-Upgrade Status Tool 07-28-2025 15:14:3 Container Database: DEVDB [CON_ID: 3 => DEVDBPDB] Component Current Full Elapsed Time Name Status Version HH:MM:SS Oracle Server UPGRADED 19.3.0.0.0 00:52:17 JServer JAVA Virtual Machine UPGRADED 19.3.0.0.0 00:02:45 Oracle XDK UPGRADED 19.3.0.0.0 00:01:32 Oracle Database Java Packages UPGRADED 19.3.0.0.0 00:00:17 OLAP Analytic Workspace UPGRADED 19.3.0.0.0 00:00:51 Oracle Label Security UPGRADED 19.3.0.0.0 00:00:10 Oracle Database Vault UPGRADED 19.3.0.0.0 00:03:41 Oracle Text UPGRADED 19.3.0.0.0 00:00:44 Oracle Workspace Manager UPGRADED 19.3.0.0.0 00:01:01 Oracle Real Application Clusters UPGRADED 19.3.0.0.0 00:00:01 Oracle XML Database UPGRADED 19.3.0.0.0 00:04:46 Oracle Multimedia UPGRADED 19.3.0.0.0 00:01:00 Spatial UPGRADED 19.3.0.0.0 00:13:38 Oracle OLAP API UPGRADED 19.3.0.0.0 00:00:35 Datapatch 00:05:55 Final Actions 00:06:23 Post Upgrade 00:01:08 Total Upgrade Time: 01:32:17 [CON_ID: 3 => DEVDBPDB] Database time zone version is 32. It meets current release needs.
    15. Now run the catuppst.sql script to ensure registry consistency.
    
    SQL> show pdbs
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             2 PDB$SEED                       READ ONLY  NO
             3 DEVDBPDB                       READ WRITE NO
    SQL>
    SQL>
    SQL> @/u01/app/oracle/product/19c/db_home/rdbms/admin/catuppst.sql
    
    Session altered.
    
    
    Session altered.
    
    
    Session altered.
    
    
    PL/SQL procedure successfully completed.
    
    
    Session altered.
    
    
    System altered.
    
    
    PL/SQL procedure successfully completed.
    
    
    Session altered.
    
    
    TIMESTAMP
    --------------------------------------------------------------------------------
    COMP_TIMESTAMP DBRESTART              2025-07-28 15:15:39
    DBUA_TIMESTAMP DBRESTART     FINISHED 2025-07-28 15:15:39  Container=CDB$ROOT Id
    =1
    DBUA_TIMESTAMP DBRESTART         NONE 2025-07-28 15:15:39
    
    
    
    TIMESTAMP
    --------------------------------------------------------------------------------
    DBUA_TIMESTAMP CATUPPST       STARTED 2025-07-28 15:15:39 Container=CDB$ROOT Id=
    1
    
    
    
    TIMESTAMP
    --------------------------------------------------------------------------------
    COMP_TIMESTAMP POSTUP_BGN             2025-07-28 15:15:39
    DBUA_TIMESTAMP POSTUP_BGN    FINISHED 2025-07-28 15:15:39  Container=CDB$ROOT Id
    =1
    DBUA_TIMESTAMP POSTUP_BGN        NONE 2025-07-28 15:15:39
    
    
    
    TIMESTAMP
    --------------------------------------------------------------------------------
    COMP_TIMESTAMP CATREQ_BGN             2025-07-28 15:15:39
    DBUA_TIMESTAMP CATREQ_BGN    FINISHED 2025-07-28 15:15:39  Container=CDB$ROOT Id
    =1
    DBUA_TIMESTAMP CATREQ_BGN        NONE 2025-07-28 15:15:39
    
    
    
    PL/SQL procedure successfully completed.
    
    catrequtlmg: b_StatEvt     = TRUE
    catrequtlmg: b_SelProps    = FALSE
    catrequtlmg: b_UpgradeMode = FALSE
    catrequtlmg: b_InUtlMig    = FALSE
    
    PL/SQL procedure successfully completed.
    
    
    PL/SQL procedure successfully completed.
    
    
    TIMESTAMP
    --------------------------------------------------------------------------------
    COMP_TIMESTAMP CATREQ_END             2025-07-28 15:15:39
    DBUA_TIMESTAMP CATREQ_END    FINISHED 2025-07-28 15:15:39  Container=CDB$ROOT Id
    =1
    DBUA_TIMESTAMP CATREQ_END        NONE 2025-07-28 15:15:39
    
    
    catuppst: Dropping library DBMS_DDL_INTERNAL_LIB
    
    PL/SQL procedure successfully completed.
    
    catuppst: Dropping view _CURRENT_EDITION_OBJ_MIG
    
    PL/SQL procedure successfully completed.
    
    catuppst: Dropping view _ACTUAL_EDITION_OBJ_MIG
    
    PL/SQL procedure successfully completed.
    
    catuppst: Dropping view DBA_PART_KEY_COLUMNS_V$_MIG
    
    PL/SQL procedure successfully completed.
    
    catuppst: Dropping view DBA_SUBPART_KEY_COLUMNS_V$_MIG
    
    PL/SQL procedure successfully completed.
    
    catuppst: Dropping table OBJ$MIG
    catuppst: Dropping table USER$MIG
    catuppst: Dropping table COL$MIG
    catuppst: Dropping table CLU$MIG
    catuppst: Dropping table CON$MIG
    catuppst: Dropping table BOOTSTRAP$MIG
    catuppst: Dropping table TAB$MIG
    catuppst: Dropping table TS$MIG
    catuppst: Dropping table IND$MIG
    catuppst: Dropping table ICOL$MIG
    catuppst: Dropping table LOB$MIG
    catuppst: Dropping table COLTYPE$MIG
    catuppst: Dropping table SUBCOLTYPE$MIG
    catuppst: Dropping table NTAB$MIG
    catuppst: Dropping table REFCON$MIG
    catuppst: Dropping table OPQTYPE$MIG
    catuppst: Dropping table ICOLDEP$MIG
    catuppst: Dropping table VIEWTRCOL$MIG
    catuppst: Dropping table ATTRCOL$MIG
    catuppst: Dropping table TYPE_MISC$MIG
    catuppst: Dropping table LIBRARY$MIG
    catuppst: Dropping table ASSEMBLY$MIG
    catuppst: Dropping table TSQ$MIG
    catuppst: Dropping table FET$MIG
    
    PL/SQL procedure successfully completed.
    
    
    PL/SQL procedure successfully completed.
    
    
    PL/SQL procedure successfully completed.
    
    
    TIMESTAMP
    --------------------------------------------------------------------------------
    COMP_TIMESTAMP POSTUP_END             2025-07-28 15:15:39
    DBUA_TIMESTAMP POSTUP_END    FINISHED 2025-07-28 15:15:39  Container=CDB$ROOT Id
    =1
    DBUA_TIMESTAMP POSTUP_END        NONE 2025-07-28 15:15:39
    
    
    
    TIMESTAMP
    --------------------------------------------------------------------------------
    COMP_TIMESTAMP CATUPPST               2025-07-28 15:15:39
    DBUA_TIMESTAMP CATUPPST      FINISHED 2025-07-28 15:15:39  Container=CDB$ROOT Id
    =1
    DBUA_TIMESTAMP CATUPPST          NONE 2025-07-28 15:15:39
    
    
    
    Session altered.
    
    SQL>
    SQL>
    
    

    ==> For PDB.

    SQL> alter session set container=DEVDBPDB; Session altered. SQL> SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 3 DEVDBPDB READ WRITE NO SQL> @/u01/app/oracle/product/19c/db_home/rdbms/admin/catuppst.sql Session altered. Session altered. Session altered. PL/SQL procedure successfully completed. Session altered. System altered. PL/SQL procedure successfully completed. Session altered. TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP DBRESTART 2025-07-28 15:16:59 DBUA_TIMESTAMP DBRESTART FINISHED 2025-07-28 15:16:59 Container=DEVDBPDB Id =3 DBUA_TIMESTAMP DBRESTART NONE 2025-07-28 15:16:59 TIMESTAMP -------------------------------------------------------------------------------- DBUA_TIMESTAMP CATUPPST STARTED 2025-07-28 15:16:59 Container=DEVDBPDB Id= 3 TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP POSTUP_BGN 2025-07-28 15:16:59 DBUA_TIMESTAMP POSTUP_BGN FINISHED 2025-07-28 15:16:59 Container=DEVDBPDB Id =3 DBUA_TIMESTAMP POSTUP_BGN NONE 2025-07-28 15:16:59 TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP CATREQ_BGN 2025-07-28 15:16:59 DBUA_TIMESTAMP CATREQ_BGN FINISHED 2025-07-28 15:16:59 Container=DEVDBPDB Id =3 DBUA_TIMESTAMP CATREQ_BGN NONE 2025-07-28 15:16:59 PL/SQL procedure successfully completed. catrequtlmg: b_StatEvt = TRUE catrequtlmg: b_SelProps = FALSE catrequtlmg: b_UpgradeMode = FALSE catrequtlmg: b_InUtlMig = FALSE PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP CATREQ_END 2025-07-28 15:17:00 DBUA_TIMESTAMP CATREQ_END FINISHED 2025-07-28 15:17:00 Container=DEVDBPDB Id =3 DBUA_TIMESTAMP CATREQ_END NONE 2025-07-28 15:17:00 catuppst: Dropping library DBMS_DDL_INTERNAL_LIB PL/SQL procedure successfully completed. catuppst: Dropping view _CURRENT_EDITION_OBJ_MIG PL/SQL procedure successfully completed. catuppst: Dropping view _ACTUAL_EDITION_OBJ_MIG PL/SQL procedure successfully completed. catuppst: Dropping view DBA_PART_KEY_COLUMNS_V$_MIG PL/SQL procedure successfully completed. catuppst: Dropping view DBA_SUBPART_KEY_COLUMNS_V$_MIG PL/SQL procedure successfully completed. catuppst: Dropping table OBJ$MIG catuppst: Dropping table USER$MIG catuppst: Dropping table COL$MIG catuppst: Dropping table CLU$MIG catuppst: Dropping table CON$MIG catuppst: Dropping table BOOTSTRAP$MIG catuppst: Dropping table TAB$MIG catuppst: Dropping table TS$MIG catuppst: Dropping table IND$MIG catuppst: Dropping table ICOL$MIG catuppst: Dropping table LOB$MIG catuppst: Dropping table COLTYPE$MIG catuppst: Dropping table SUBCOLTYPE$MIG catuppst: Dropping table NTAB$MIG catuppst: Dropping table REFCON$MIG catuppst: Dropping table OPQTYPE$MIG catuppst: Dropping table ICOLDEP$MIG catuppst: Dropping table VIEWTRCOL$MIG catuppst: Dropping table ATTRCOL$MIG catuppst: Dropping table TYPE_MISC$MIG catuppst: Dropping table LIBRARY$MIG catuppst: Dropping table ASSEMBLY$MIG catuppst: Dropping table TSQ$MIG catuppst: Dropping table FET$MIG PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP POSTUP_END 2025-07-28 15:17:00 DBUA_TIMESTAMP POSTUP_END FINISHED 2025-07-28 15:17:00 Container=DEVDBPDB Id =3 DBUA_TIMESTAMP POSTUP_END NONE 2025-07-28 15:17:00 TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP CATUPPST 2025-07-28 15:17:00 DBUA_TIMESTAMP CATUPPST FINISHED 2025-07-28 15:17:00 Container=DEVDBPDB Id =3 DBUA_TIMESTAMP CATUPPST NONE 2025-07-28 15:17:00 Session altered. SQL>
    16. Now again run the postfix.
    
    SQL> show pdbs
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             2 PDB$SEED                       READ ONLY  NO
             3 DEVDBPDB                       READ WRITE NO
    SQL>
    SQL>
    SQL> @/home/oracle/preupgrade/postupgrade_fixups.sql
    
    Session altered.
    
    
    PL/SQL procedure successfully completed.
    
    
    Commit complete.
    
    
    Session altered.
    
    
    PL/SQL procedure successfully completed.
    
    
    PL/SQL procedure successfully completed.
    
    
    Package created.
    
    No errors.
    
    Package body created.
    
    
    PL/SQL procedure successfully completed.
    
    No errors.
    
    
    Package created.
    
    No errors.
    
    Package body created.
    
    No errors.
    Executing Oracle POST-Upgrade Fixup Script
    
    Auto-Generated by:       Oracle Preupgrade Script
                             Version: 19.0.0.0.0 Build: 1
    Generated on:            2025-07-28 10:42:15
    
    For Source Database:     DEVDB
    Source Database Version: 12.2.0.1.0
    For Upgrade to Version:  19.0.0.0.0
    
    Executing in container:  CDB$ROOT
    
    Preup                             Preupgrade
    Action                            Issue Is
    Number  Preupgrade Check Name     Remedied    Further DBA Action
    ------  ------------------------  ----------  --------------------------------
        5.  old_time_zones_exist      YES         None.
        6.  dir_symlinks              YES         None.
        7.  post_dictionary           YES         None.
        8.  post_fixed_objects        NO          Informational only.
                                                  Further action is optional.
    
    The fixup scripts have been run and resolved what they can. However,
    there are still issues originally identified by the preupgrade that
    have not been remedied and are still present in the database.
    Depending on the severity of the specific issue, and the nature of
    the issue itself, that could mean that your database upgrade is not
    fully complete.  To resolve the outstanding issues, start by reviewing
    the postupgrade_fixups.sql and searching it for the name of
    the failed CHECK NAME or Preupgrade Action Number listed above.
    There you will find the original corresponding diagnostic message
    from the preupgrade which explains in more detail what still needs
    to be done.
    
    PL/SQL procedure successfully completed.
    
    
    Session altered.
    
    SQL>
    
    

    ==> For PDB.

    SQL> alter session set container=DEVDBPDB; Session altered. SQL> SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 3 DEVDBPDB READ WRITE NO SQL> SQL> @/home/oracle/preupgrade/postupgrade_fixups.sql Session altered. PL/SQL procedure successfully completed. Commit complete. Session altered. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. Package created. No errors. Package body created. PL/SQL procedure successfully completed. No errors. Package created. No errors. Package body created. No errors. Executing Oracle POST-Upgrade Fixup Script Auto-Generated by: Oracle Preupgrade Script Version: 19.0.0.0.0 Build: 1 Generated on: 2025-07-28 10:42:15 For Source Database: DEVDB Source Database Version: 12.2.0.1.0 For Upgrade to Version: 19.0.0.0.0 Executing in container: DEVDBPDB Preup Preupgrade Action Issue Is Number Preupgrade Check Name Remedied Further DBA Action ------ ------------------------ ---------- -------------------------------- 3. old_time_zones_exist YES None. 4. dir_symlinks YES None. 5. post_dictionary YES None. 6. post_fixed_objects NO Informational only. Further action is optional. The fixup scripts have been run and resolved what they can. However, there are still issues originally identified by the preupgrade that have not been remedied and are still present in the database. Depending on the severity of the specific issue, and the nature of the issue itself, that could mean that your database upgrade is not fully complete. To resolve the outstanding issues, start by reviewing the postupgrade_fixups.sql and searching it for the name of the failed CHECK NAME or Preupgrade Action Number listed above. There you will find the original corresponding diagnostic message from the preupgrade which explains in more detail what still needs to be done. PL/SQL procedure successfully completed. Session altered.
    17. Now check invalid objects count and run utlrp.sql if required.
    
    SQL> show pdbs
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             2 PDB$SEED                       READ ONLY  NO
             3 DEVDBPDB                       READ WRITE NO
    SQL>
    SQL>
    SQL>  select count(*) from dba_objects where status='INVALID';
    
      COUNT(*)
    ----------
            48
    
    SQL>
    SQL>
    SQL> @?/rdbms/admin/utlrp.sql
    
    Session altered.
    
    
    TIMESTAMP
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    COMP_TIMESTAMP UTLRP_BGN              2025-07-28 15:21:51
    
    DOC>   The following PL/SQL block invokes UTL_RECOMP to recompile invalid
    DOC>   objects in the database. Recompilation time is proportional to the
    DOC>   number of invalid objects in the database, so this command may take
    DOC>   a long time to execute on a database with a large number of invalid
    DOC>   objects.
    DOC>
    DOC>   Use the following queries to track recompilation progress:
    DOC>
    DOC>   1. Query returning the number of invalid objects remaining. This
    DOC>      number should decrease with time.
    DOC>         SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
    DOC>
    DOC>   2. Query returning the number of objects compiled so far. This number
    DOC>      should increase with time.
    DOC>         SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
    DOC>
    DOC>   This script automatically chooses serial or parallel recompilation
    DOC>   based on the number of CPUs available (parameter cpu_count) multiplied
    DOC>   by the number of threads per CPU (parameter parallel_threads_per_cpu).
    DOC>   On RAC, this number is added across all RAC nodes.
    DOC>
    DOC>   UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
    DOC>   recompilation. Jobs are created without instance affinity so that they
    DOC>   can migrate across RAC nodes. Use the following queries to verify
    DOC>   whether UTL_RECOMP jobs are being created and run correctly:
    DOC>
    DOC>   1. Query showing jobs created by UTL_RECOMP
    DOC>         SELECT job_name FROM dba_scheduler_jobs
    DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
    DOC>
    DOC>   2. Query showing UTL_RECOMP jobs that are running
    DOC>         SELECT job_name FROM dba_scheduler_running_jobs
    DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
    DOC>#
    
    PL/SQL procedure successfully completed.
    
    
    TIMESTAMP
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    COMP_TIMESTAMP UTLRP_END              2025-07-28 15:21:58
    
    DOC> The following query reports the number of invalid objects.
    DOC>
    DOC> If the number is higher than expected, please examine the error
    DOC> messages reported with each object (using SHOW ERRORS) to see if they
    DOC> point to system misconfiguration or resource constraints that must be
    DOC> fixed before attempting to recompile these objects.
    DOC>#
    
    OBJECTS WITH ERRORS
    -------------------
                      0
    
    DOC> The following query reports the number of exceptions caught during
    DOC> recompilation. If this number is non-zero, please query the error
    DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
    DOC> are due to misconfiguration or resource constraints that must be
    DOC> fixed before objects can compile successfully.
    DOC> Note: Typical compilation errors (due to coding errors) are not
    DOC>       logged into this table: they go into DBA_ERRORS instead.
    DOC>#
    
    ERRORS DURING RECOMPILATION
    ---------------------------
                              0
    
    
    Function created.
    
    
    PL/SQL procedure successfully completed.
    
    
    Function dropped.
    
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL>
    SQL> select count(*) from dba_objects where status='INVALID';
    
      COUNT(*)
    ----------
             0
    
    SQL>
    
    

    ==> For PDB.

    SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 DEVDBPDB READ WRITE NO SQL> SQL> SQL> alter session set container=DEVDBPDB; Session altered. SQL> SQL> select count(*) from dba_objects where status='INVALID'; COUNT(*) ---------- 2240 SQL> @?/rdbms/admin/utlrp.sql Session altered. TIMESTAMP -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- COMP_TIMESTAMP UTLRP_BGN 2025-07-28 15:22:46 DOC> The following PL/SQL block invokes UTL_RECOMP to recompile invalid DOC> objects in the database. Recompilation time is proportional to the DOC> number of invalid objects in the database, so this command may take DOC> a long time to execute on a database with a large number of invalid DOC> objects. DOC> DOC> Use the following queries to track recompilation progress: DOC> DOC> 1. Query returning the number of invalid objects remaining. This DOC> number should decrease with time. DOC> SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6); DOC> DOC> 2. Query returning the number of objects compiled so far. This number DOC> should increase with time. DOC> SELECT COUNT(*) FROM UTL_RECOMP_COMPILED; DOC> DOC> This script automatically chooses serial or parallel recompilation DOC> based on the number of CPUs available (parameter cpu_count) multiplied DOC> by the number of threads per CPU (parameter parallel_threads_per_cpu). DOC> On RAC, this number is added across all RAC nodes. DOC> DOC> UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel DOC> recompilation. Jobs are created without instance affinity so that they DOC> can migrate across RAC nodes. Use the following queries to verify DOC> whether UTL_RECOMP jobs are being created and run correctly: DOC> DOC> 1. Query showing jobs created by UTL_RECOMP DOC> SELECT job_name FROM dba_scheduler_jobs DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%'; DOC> DOC> 2. Query showing UTL_RECOMP jobs that are running DOC> SELECT job_name FROM dba_scheduler_running_jobs DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%'; DOC># PL/SQL procedure successfully completed. TIMESTAMP -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- COMP_TIMESTAMP UTLRP_END 2025-07-28 15:33:44 DOC> The following query reports the number of invalid objects. DOC> DOC> If the number is higher than expected, please examine the error DOC> messages reported with each object (using SHOW ERRORS) to see if they DOC> point to system misconfiguration or resource constraints that must be DOC> fixed before attempting to recompile these objects. DOC># OBJECTS WITH ERRORS ------------------- 0 DOC> The following query reports the number of exceptions caught during DOC> recompilation. If this number is non-zero, please query the error DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors DOC> are due to misconfiguration or resource constraints that must be DOC> fixed before objects can compile successfully. DOC> Note: Typical compilation errors (due to coding errors) are not DOC> logged into this table: they go into DBA_ERRORS instead. DOC># ERRORS DURING RECOMPILATION --------------------------- 0 Function created. PL/SQL procedure successfully completed. Function dropped. PL/SQL procedure successfully completed. SQL> SQL> SQL> SQL> SQL> select count(*) from dba_objects where status='INVALID'; COUNT(*) ---------- 0 SQL>
    18. Now take a bounce of database and run the postcheck.
    
    [oracle@devdb ~]$ sqlplus / as sysdba
    
    SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 28 15:41:25 2025
    Version 19.3.0.0.0
    
    Copyright (c) 1982, 2019, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.3.0.0.0
    
    SQL> shut immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL>
    SQL> startup
    ORACLE instance started.
    
    Total System Global Area 1174405120 bytes
    Fixed Size                  9134080 bytes
    Variable Size             654311424 bytes
    Database Buffers          503316480 bytes
    Redo Buffers                7643136 bytes
    Database mounted.
    Database opened.
    SQL>
    
    SQL> show pdbs
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             2 PDB$SEED                       READ ONLY  NO
             3 DEVDBPDB                       READ WRITE NO
    SQL>
    SQL> SELECT version FROM v$timezone_file;
    
       VERSION
    ----------
            32
    
    SQL> select count(1) from dba_objects where status='INVALID';
    
      COUNT(1)
    ----------
             0
    
    SQL>
    SQL> col COMP_ID for a10
    SQL> col COMP_NAME for a40
    SQL> col VERSION for a15
    SQL> set lines 180
    SQL> set pages 999
    SQL> select COMP_ID,COMP_NAME,VERSION,STATUS from dba_registry;
    
    COMP_ID    COMP_NAME                                VERSION         STATUS
    ---------- ---------------------------------------- --------------- --------------------------------------------
    CATALOG    Oracle Database Catalog Views            19.0.0.0.0      VALID
    CATPROC    Oracle Database Packages and Types       19.0.0.0.0      VALID
    JAVAVM     JServer JAVA Virtual Machine             19.0.0.0.0      VALID
    XML        Oracle XDK                               19.0.0.0.0      VALID
    CATJAVA    Oracle Database Java Packages            19.0.0.0.0      VALID
    APS        OLAP Analytic Workspace                  19.0.0.0.0      VALID
    RAC        Oracle Real Application Clusters         19.0.0.0.0      OPTION OFF
    XDB        Oracle XML Database                      19.0.0.0.0      VALID
    OWM        Oracle Workspace Manager                 19.0.0.0.0      VALID
    CONTEXT    Oracle Text                              19.0.0.0.0      VALID
    ORDIM      Oracle Multimedia                        19.0.0.0.0      VALID
    SDO        Spatial                                  19.0.0.0.0      VALID
    XOQ        Oracle OLAP API                          19.0.0.0.0      VALID
    OLS        Oracle Label Security                    19.0.0.0.0      VALID
    DV         Oracle Database Vault                    19.0.0.0.0      VALID
    
    15 rows selected.
    
    SQL>
    

    ==> For PDB.

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

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

    19. Now drop the flashback restore point.
    
    SQL> col name for a20
    SQL> col GUARANTEE_FLASHBACK_DATABASE for a10
    SQL> col TIME for a60
    SQL> set lines 190
    SQL> select NAME,GUARANTEE_FLASHBACK_DATABASE,TIME from V$restore_point;SQL> SQL> SQL> SQL>
    
    NAME                 GUARANTEE_ TIME
    -------------------- ---------- ------------------------------------------------------------
    PRE_UPGRADE12C       YES        28-JUL-25 10.39.05.000000000 AM
    
    SQL>
    SQL> drop restore point PRE_UPGRADE12C;
    
    Restore point dropped.
    
    SQL> select NAME,GUARANTEE_FLASHBACK_DATABASE,TIME from V$restore_point;
    
    no rows selected
    
    SQL>
    
    20. Now update COMPATIBLE parameter.
    
    SQL>  show parameter COMPATIBLE
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    compatible                           string      12.2.0
    noncdb_compatible                    boolean     FALSE
    SQL>
    SQL>  ALTER SYSTEM SET COMPATIBLE = '19.0.0' SCOPE=SPFILE;
    
    System altered.
    
    SQL> shut immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL>
    
    SQL> startup
    ORACLE instance started.
    
    Total System Global Area 1174405120 bytes
    Fixed Size                  9134080 bytes
    Variable Size             771751936 bytes
    Database Buffers          385875968 bytes
    Redo Buffers                7643136 bytes
    Database mounted.
    Database opened.
    SQL>
    SQL> show parameter COMPATIBLE
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    compatible                           string      19.0.0
    noncdb_compatible                    boolean     FALSE
    SQL>
    SQL> select name,open_mode,version from v$database,v$instance;
    
    NAME                 OPEN_MODE            VERSION
    -------------------- -------------------- ---------------
    DEVDB                READ WRITE           19.0.0.0.0
    
    SQL>
    
    21. Now create a listener for 19c. Refer Create listener using NETCA
    
    [oracle@devdb ~]$ lsnrctl status
    
    LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 28-JUL-2025 16:02:55
    
    Copyright (c) 1991, 2019, Oracle.  All rights reserved.
    
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=devdb.oraeasy.com)(PORT=1521)))
    STATUS of the LISTENER
    ------------------------
    Alias                     LISTENER
    Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
    Start Date                28-JUL-2025 16:02:08
    Uptime                    0 days 0 hr. 0 min. 48 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   /u01/app/oracle/product/19c/db_home/network/admin/listener.ora
    Listener Log File         /u01/app/oracle/diag/tnslsnr/devdb/listener/alert/log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=devdb.oraeasy.com)(PORT=1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
    Services Summary...
    Service "396c6dec59d53653e0650deef82416fe" has 1 instance(s).
      Instance "devdb", status READY, has 1 handler(s) for this service...
    Service "4700a987085a3dfae05387e5e50a8c7b" has 1 instance(s).
      Instance "devdb", status READY, has 1 handler(s) for this service...
    Service "devdb" has 1 instance(s).
      Instance "devdb", status READY, has 1 handler(s) for this service...
    Service "devdbXDB" has 1 instance(s).
      Instance "devdb", status READY, has 1 handler(s) for this service...
    Service "devdbpdb" has 1 instance(s).
      Instance "devdb", status READY, has 1 handler(s) for this service...
    The command completed successfully
    [oracle@devdb ~]$
    
    22. Now verify the table data.
    
    [oracle@devdb ~]$ sqlplus test@DEVDBPDB
    
    SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 28 16:05:25 2025
    
    Version 19.3.0.0.0
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
    
    Enter password:
    Last Successful login time: Mon Jul 28 2025 10:20:09 +05:30
    
    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    
    SQL> show user
    USER is "TEST"
    SQL>
    SQL> def
    DEFINE _DATE           = "28-JUL-25" (CHAR)
    DEFINE _CONNECT_IDENTIFIER = "DEVDBPDB" (CHAR)
    DEFINE _USER           = "TEST" (CHAR)
    DEFINE _PRIVILEGE      = "" (CHAR)
    DEFINE _SQLPLUS_RELEASE = "1202000100" (CHAR)
    DEFINE _EDITOR         = "vi" (CHAR)
    DEFINE _O_VERSION      = "Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production" (CHAR)
    DEFINE _O_RELEASE      = "1900000000" (CHAR)
    SQL>
    SQL> select count(*) from COMPANY;
    
      COUNT(*)
    ----------
             3
    
    SQL>
    
    

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

    Thank you for reading!

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

    Abhishek Shrivastava

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