Thursday, July 1, 2021

19c Database Upgrade From 12c Database using dbupgrade Tool:

19c Database Upgrade From 12c Database using dbupgrade Tool:


1. Source Database Verification:

[oracle@oraclesb ~]$ ps -ef|grep smon
oracle    4464     1  0 Jun05 ?        00:00:38 ora_smon_DB12C
oracle    6193 21834  0 01:57 pts/1    00:00:00 grep --color=auto smon
oracle   23447     1  0 Jun25 ?        00:00:08 ora_smon_ORCLSB
[oracle@oraclesb ~]$ 

[oracle@oraclesb ~]$ . oraenv
ORACLE_SID = [DB12C] ? DB12C
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oraclesb ~]$

[oracle@oraclesb ~]$ env |grep ORA
ORACLE_SID=DB12C
ORACLE_BASE=/u01/app/oracle
ORAENV_ASK=YES
ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/dbhome_1
[oracle@oraclesb ~]$

sqlplus / as sysdba

SQL> select name, open_mode from v$database;
NAME      OPEN_MODE
--------- --------------------
DB12C     READ WRITE
SQL>

2. Perform the Upgrade Prechecks:

One of the best recommendation to create GRP before proceeding with DB upgrade:

Run preupgrade.jar
Download the latest "preupgrade.jar" file from MOS 884522.1. If you don't have MOS access you can miss out the next step.

Master Note For Oracle Database Upgrades and Migrations (Doc ID 1152016.1)

export ORACLE_HOME=$ORACLE_BASE/product/19.0.0.0/dbhome_1
cd $ORACLE_HOME/rdbms/admin
unzip -o /u01/patches/preupgrade_19_cbuild_??_lf.zip
export ORACLE_SID=DB12C
export ORAENV_ASK=NO
. oraenv
export ORAENV_ASK=YES

export ORACLE_HOME=$ORACLE_BASE/product/12.2.0.1/dbhome_1
$ORACLE_BASE/product/19.0.0.0/dbhome_1/jdk/bin/java -jar $ORACLE_BASE/product/19.0.0.0/dbhome_1/rdbms/admin/preupgrade.jar TERMINAL TEXT

[oracle@oraclesb jdk]$ $ORACLE_BASE/product/19.0.0.0/dbhome_1/jdk/bin/java -jar $ORACLE_BASE/product/19.0.0.0/dbhome_1/rdbms/admin/preupgrade.jar TERMINAL TEXT
Report generated by Oracle Database Pre-Upgrade Information Tool Version
19.0.0.0.0 Build: 1 on 2021-06-30T16:48:27
Upgrade-To version: 19.0.0.0.0
=======================================
Status of the database prior to upgrade
=======================================
      Database Name:  DB12C
     Container Name:  DB12C
       Container ID:  0
            Version:  12.2.0.1.0
     DB Patch Level:  No Patch Bundle applied
         Compatible:  12.2.0
          Blocksize:  8192
           Platform:  Linux x86 64-bit
      Timezone File:  26
  Database log mode:  ARCHIVELOG
           Readonly:  FALSE
            Edition:  EE
  Oracle Component                       Upgrade Action    Current Status
  ----------------                       --------------    --------------
  Oracle Server                          [to be upgraded]  VALID
  JServer JAVA Virtual Machine           [to be upgraded]  VALID
  Oracle XDK for Java                    [to be upgraded]  VALID
  Real Application Clusters              [to be upgraded]  OPTION OFF
  Oracle Workspace Manager               [to be upgraded]  VALID
  OLAP Analytic Workspace                [to be upgraded]  VALID
  Oracle Label Security                  [to be upgraded]  VALID
  Oracle Database Vault                  [to be upgraded]  VALID
  Oracle Text                            [to be upgraded]  VALID
  Oracle XML Database                    [to be upgraded]  VALID
  Oracle Java Packages                   [to be upgraded]  VALID
  Oracle Multimedia                      [to be upgraded]  VALID
  Oracle Spatial                         [to be upgraded]  VALID
  Oracle OLAP API                        [to be upgraded]  VALID
==============
BEFORE UPGRADE
==============
  REQUIRED ACTIONS
  ================
  1.  Set DB_RECOVERY_FILE_DEST_SIZE initialization parameter to at least 9326
      MB.  Check alert log during the upgrade to ensure there is remaining free
      space available in the recovery area.
      DB_RECOVERY_FILE_DEST_SIZE is set at 8016 MB.  There is currently 5926 MB
      of free space remaining, which may not be adequate for the upgrade.
      Currently:
       Fast recovery area :  /u01/app/oracle/fast_recovery_area/DB12C
       Limit              :  8016 MB
       Used               :  2090 MB
       Available          :  5926 MB
      The database has archivelog and flashback enabled, and the upgrade
      process will need free space to generate archived and flashback logs to
      the recovery area specified by initialization parameter
      DB_RECOVERY_FILE_DEST.  The logs generated must not overflow the limit
      set by DB_RECOVERY_FILE_DEST_SIZE, as that can cause the upgrade to not
      proceed.
  RECOMMENDED ACTIONS
  ===================
  2.  (AUTOFIXUP) Gather stale data dictionary statistics prior to database
      upgrade in off-peak time using:
        EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;
      Dictionary statistics do not exist or are stale (not up-to-date).
      Dictionary statistics help the Oracle optimizer find efficient SQL
      execution plans and are essential for proper upgrade timing. Oracle
      recommends gathering dictionary statistics in the last 24 hours before
      database upgrade.
      For information on managing optimizer statistics, refer to the 12.2.0.1
      Oracle Database SQL Tuning Guide.
  INFORMATION ONLY
  ================
  3.  To help you keep track of your tablespace allocations, the following
      AUTOEXTEND tablespaces are expected to successfully EXTEND during the
      upgrade process.
                                                 Min Size
      Tablespace                        Size     For Upgrade
      ----------                     ----------  -----------
      SYSTEM                             840 MB       947 MB
      TEMP                                20 MB       150 MB
      UNDOTBS1                           155 MB       439 MB
      Minimum tablespace sizes for upgrade are estimates.
  4.  Check the Oracle Backup and Recovery User's Guide for information on how
      to manage an RMAN recovery catalog schema.
      If you are using a version of the recovery catalog schema that is older
      than that required by the RMAN client version, then you must upgrade the
      catalog schema.
      It is good practice to have the catalog schema the same or higher version
      than the RMAN client version you are using.
  ORACLE GENERATED FIXUP SCRIPT
  =============================
  All of the issues in database DB12C
  which are identified above as BEFORE UPGRADE "(AUTOFIXUP)" can be resolved by
  executing the following
    SQL>@/u01/app/oracle/cfgtoollogs/DB12C/preupgrade/preupgrade_fixups.sql
=============
AFTER UPGRADE
=============
  REQUIRED ACTIONS
  ================
  None
  RECOMMENDED ACTIONS
  ===================
  5.  Upgrade the database time zone file using the DBMS_DST package.
      The database is using time zone file version 26 and the target 19 release
      ships with time zone file version 32.
      Oracle recommends upgrading to the desired (latest) version of the time
      zone file.  For more information, refer to "Upgrading the Time Zone File
      and Timestamp with Time Zone Data" in the 19 Oracle Database
      Globalization Support Guide.
  6.  (AUTOFIXUP) Gather dictionary statistics after the upgrade using the
      command:
        EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;
      Oracle recommends gathering dictionary statistics after upgrade.
      Dictionary statistics provide essential information to the Oracle
      optimizer to help it find efficient SQL execution plans. After a database
      upgrade, statistics need to be re-gathered as there can now be tables
      that have significantly changed during the upgrade or new tables that do
      not have statistics gathered yet.
  7.  Gather statistics on fixed objects after the upgrade and when there is a
      representative workload on the system using the command:
        EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;
      This recommendation is given for all preupgrade runs.
      Fixed object statistics provide essential information to the Oracle
      optimizer to help it find efficient SQL execution plans.  Those
      statistics are specific to the Oracle Database release that generates
      them, and can be stale upon database upgrade.
      For information on managing optimizer statistics, refer to the 12.2.0.1
      Oracle Database SQL Tuning Guide.
  ORACLE GENERATED FIXUP SCRIPT
  =============================
  All of the issues in database DB12C
  which are identified above as AFTER UPGRADE "(AUTOFIXUP)" can be resolved by
  executing the following
    SQL>@/u01/app/oracle/cfgtoollogs/DB12C/preupgrade/postupgrade_fixups.sql

==================
PREUPGRADE SUMMARY
==================
  /u01/app/oracle/cfgtoollogs/DB12C/preupgrade/preupgrade.log
  /u01/app/oracle/cfgtoollogs/DB12C/preupgrade/preupgrade_fixups.sql
  /u01/app/oracle/cfgtoollogs/DB12C/preupgrade/postupgrade_fixups.sql
Execute fixup scripts as indicated below:
Before upgrade:
Log into the database and execute the preupgrade fixups
@/u01/app/oracle/cfgtoollogs/DB12C/preupgrade/preupgrade_fixups.sql
After the upgrade:
Log into the database and execute the postupgrade fixups
@/u01/app/oracle/cfgtoollogs/DB12C/preupgrade/postupgrade_fixups.sql
Preupgrade complete: 2021-06-30T16:48:27
[oracle@oraclesb jdk]$

3. Perform Pre-Upgrade Fixups/Actions:

As per the Step#2 recommendation 

4. Upgrade the Database:

sqlplus / as sysdba
shutdown immediate;
exit;

[oracle@oraclesb admin]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Thu Jul 1 02:25:33 2021
Copyright (c) 1982, 2016, Oracle.  All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit

Start using 19c Oracle Home:
sqlplus / as sysdba
startup upgrade;
exit;

[oracle@oraclesb dbs]$ cp spfileDB12C.ora /u01/app/oracle/product/19.0.0.0/dbhome_1/dbs
[oracle@oraclesb dbs]$ ll ora*
-rw-r-----. 1 oracle oinstall 3584 Mar 14 14:02 orapwDB12C
-rw-r-----. 1 oracle oinstall 3584 Apr  2 00:22 orapwORA12C

[oracle@oraclesb dbs]$ cp orapwDB12C /u01/app/oracle/product/19.0.0.0/dbhome_1/dbs/
[oracle@oraclesb dbs]$ cd /u01/app/oracle/product/19.0.0.0/dbhome_1/dbs/

[oracle@oraclesb dbs]$ . oraenv
ORACLE_SID = [DB12C] ?
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oraclesb dbs]$ export ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1
[oracle@oraclesb dbs]$ env |grep ORA
ORACLE_SID=DB12C
ORACLE_BASE=/u01/app/oracle
ORAENV_ASK=YES
ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1

[oracle@oraclesb dbs]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Thu Jul 1 02:28:20 2021
Copyright (c) 1982, 2016, Oracle.  All rights reserved.
Connected to an idle instance.

SQL> startup upgrade;
ORACLE instance started.
Total System Global Area 3707763112 bytes
Fixed Size                  8903080 bytes
Variable Size             721420288 bytes
Database Buffers         2969567232 bytes
Redo Buffers                7872512 bytes
Database mounted.
Database opened.
SQL> exit;

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
[oracle@oraclesb dbs]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Thu Jul 1 02:28:50 2021
Copyright (c) 1982, 2016, Oracle.  All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
SQL> show parameter spfile
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /u01/app/oracle/product/19.0.0
                                                 .0/dbhome_1/dbs/spfileDB12C.ora
SQL> exit

# Regular upgrade command.

cd $ORACLE_HOME/rdbms/admin
$ORACLE_HOME/perl/bin/perl catctl.pl catupgrd.sql

# Shorthand command.

$ORACLE_HOME/bin/dbupgrade

[oracle@oraclesb dbs]$ $ORACLE_HOME/bin/dbupgrade
Argument list for [/u01/app/oracle/product/19.0.0.0/dbhome_1/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.11.0.0.0DBRU_LINUX.X64_210412]

/u01/app/oracle/product/19.0.0.0/dbhome_1/rdbms/admin/orahome = [/u01/app/oracle/product/19.0.0.0/dbhome_1]
/u01/app/oracle/product/19.0.0.0/dbhome_1/bin/orabasehome = [/u01/app/oracle/product/19.0.0.0/dbhome_1]

catctlGetOraBaseLogDir = [/u01/app/oracle/product/19.0.0.0/dbhome_1]

Analyzing file /u01/app/oracle/product/19.0.0.0/dbhome_1/rdbms/admin/catupgrd.sql

Log file directory = [/tmp/cfgtoollogs/upgrade20210701022916]
catcon::set_log_file_base_path: ALL catcon-related output will be written to [/tmp/cfgtoollogs/upgrade20210701022916/catupgrd_catcon_9381.lst]

catcon::set_log_file_base_path: catcon: See [/tmp/cfgtoollogs/upgrade20210701022916/catupgrd*.log] files for output generated by scripts catcon::set_log_file_base_path: catcon: See [/tmp/cfgtoollogs/upgrade20210701022916/catupgrd_*.lst] files for spool files, if any

Number of Cpus        = 4
Database Name         = DB12C
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/19.0.0.0/dbhome_1/cfgtoollogs/DB12C                  /upgrade20210701022916/catupgrd_catcon_9381.lst]
catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/19.0.0.0/dbhome_1/cfgtoollogs/DB12C/upgrade20210701022916/catupgrd*.                  log] files for output generated by scripts
catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/19.0.0.0/dbhome_1/cfgtoollogs/DB12C/upgrade20210701022916/catupgrd_*                  .lst] files for spool files, if any

Log file directory = [/u01/app/oracle/product/19.0.0.0/dbhome_1/cfgtoollogs/DB12C/upgrade20210701022916]
Parallel SQL Process Count            = 4
Components in [DB12C]
    Installed [APS CATALOG CATJAVA CATPROC CONTEXT DV JAVAVM OLS ORDIM OWM SDO XDB XML XOQ]
Not Installed [APEX EM MGW ODM RAC WK]
DataBase Version      = 12.2.0.1.0
------------------------------------------------------
Phases [0-107]         Start Time:[2021_07_01 02:29:17]
------------------------------------------------------
***********   Executing Change Scripts   ***********
Serial   Phase #:0    [DB12C] Files:1    Time: 16s
***************   Catalog Core SQL   ***************
Serial   Phase #:1    [DB12C] Files:5    Time: 35s
Restart  Phase #:2    [DB12C] Files:1    Time: 0s
***********   Catalog Tables and Views   ***********
Parallel Phase #:3    [DB12C] Files:19   Time: 14s
Restart  Phase #:4    [DB12C] Files:1    Time: 0s
*************   Catalog Final Scripts   ************
Serial   Phase #:5    [DB12C] Files:7    Time: 13s
*****************   Catproc Start   ****************
Serial   Phase #:6    [DB12C] Files:1    Time: 9s
*****************   Catproc Types   ****************
Serial   Phase #:7    [DB12C] Files:2    Time: 9s
Restart  Phase #:8    [DB12C] Files:1    Time: 0s
****************   Catproc Tables   ****************
Parallel Phase #:9    [DB12C] Files:69   Time: 17s
Restart  Phase #:10   [DB12C] Files:1    Time: 0s
*************   Catproc Package Specs   ************
Serial   Phase #:11   [DB12C] Files:1    Time: 56s
Restart  Phase #:12   [DB12C] Files:1    Time: 0s
**************   Catproc Procedures   **************
Parallel Phase #:13   [DB12C] Files:94   Time: 3s
Restart  Phase #:14   [DB12C] Files:1    Time: 1s
Parallel Phase #:15   [DB12C] Files:122  Time: 7s
Restart  Phase #:16   [DB12C] Files:1    Time: 0s
Serial   Phase #:17   [DB12C] Files:25   Time: 2s
Restart  Phase #:18   [DB12C] Files:1    Time: 0s
*****************   Catproc Views   ****************
Parallel Phase #:19   [DB12C] Files:32   Time: 12s
Restart  Phase #:20   [DB12C] Files:1    Time: 0s
Serial   Phase #:21   [DB12C] Files:3    Time: 9s
Restart  Phase #:22   [DB12C] Files:1    Time: 0s
Parallel Phase #:23   [DB12C] Files:25   Time: 133s
Restart  Phase #:24   [DB12C] Files:1    Time: 0s
Parallel Phase #:25   [DB12C] Files:12   Time: 93s
Restart  Phase #:26   [DB12C] Files:1    Time: 1s
Serial   Phase #:27   [DB12C] Files:1    Time: 0s
Serial   Phase #:28   [DB12C] Files:4    Time: 2s
Serial   Phase #:29   [DB12C] Files:1    Time: 0s
Restart  Phase #:30   [DB12C] Files:1    Time: 0s
***************   Catproc CDB Views   **************
Serial   Phase #:31   [DB12C] Files:1    Time: 0s
Restart  Phase #:32   [DB12C] Files:1    Time: 1s
Serial   Phase #:34   [DB12C] Files:1    Time: 0s
*****************   Catproc PLBs   *****************
Serial   Phase #:35   [DB12C] Files:295  Time: 20s
Serial   Phase #:36   [DB12C] Files:1    Time: 0s
Restart  Phase #:37   [DB12C] Files:1    Time: 0s
Serial   Phase #:38   [DB12C] Files:10   Time: 3s
Restart  Phase #:39   [DB12C] Files:1    Time: 0s
***************   Catproc DataPump   ***************
Serial   Phase #:40   [DB12C] Files:3    Time: 38s
Restart  Phase #:41   [DB12C] Files:1    Time: 0s
******************   Catproc SQL   *****************
Parallel Phase #:42   [DB12C] Files:13   Time: 85s
Restart  Phase #:43   [DB12C] Files:1    Time: 0s
Parallel Phase #:44   [DB12C] Files:11   Time: 4s
Restart  Phase #:45   [DB12C] Files:1    Time: 0s
Parallel Phase #:46   [DB12C] Files:3    Time: 1s
Restart  Phase #:47   [DB12C] Files:1    Time: 0s
*************   Final Catproc scripts   ************
Serial   Phase #:48   [DB12C] Files:1    Time: 4s
Restart  Phase #:49   [DB12C] Files:1    Time: 1s
**************   Final RDBMS scripts   *************
Serial   Phase #:50   [DB12C] Files:1    Time: 3s
************   Upgrade Component Start   ***********
Serial   Phase #:51   [DB12C] Files:1    Time: 0s
Restart  Phase #:52   [DB12C] Files:1    Time: 0s
**********   Upgrading Java and non-Java   *********
Serial   Phase #:53   [DB12C] Files:2    Time: 183s
*****************   Upgrading XDB   ****************
Restart  Phase #:54   [DB12C] Files:1    Time: 0s
Serial   Phase #:56   [DB12C] Files:3    Time: 4s
Serial   Phase #:57   [DB12C] Files:3    Time: 2s
Parallel Phase #:58   [DB12C] Files:10   Time: 1s
Parallel Phase #:59   [DB12C] Files:25   Time: 3s
Serial   Phase #:60   [DB12C] Files:4    Time: 5s
Serial   Phase #:61   [DB12C] Files:1    Time: 0s
Serial   Phase #:62   [DB12C] Files:32   Time: 2s
Serial   Phase #:63   [DB12C] Files:1    Time: 0s
Parallel Phase #:64   [DB12C] Files:6    Time: 5s
Serial   Phase #:65   [DB12C] Files:2    Time: 14s
Serial   Phase #:66   [DB12C] Files:3    Time: 22s
****************   Upgrading ORDIM   ***************
Restart  Phase #:67   [DB12C] Files:1    Time: 0s
Serial   Phase #:69   [DB12C] Files:1    Time: 0s
Parallel Phase #:70   [DB12C] Files:2    Time: 16s
Restart  Phase #:71   [DB12C] Files:1    Time: 0s
Parallel Phase #:72   [DB12C] Files:2    Time: 0s
Serial   Phase #:73   [DB12C] Files:2    Time: 1s
*****************   Upgrading SDO   ****************
Restart  Phase #:74   [DB12C] Files:1    Time: 0s
Serial   Phase #:76   [DB12C] Files:1    Time: 25s
Serial   Phase #:77   [DB12C] Files:2    Time: 2s
Restart  Phase #:78   [DB12C] Files:1    Time: 0s
Serial   Phase #:79   [DB12C] Files:1    Time: 29s
Restart  Phase #:80   [DB12C] Files:1    Time: 0s
Parallel Phase #:81   [DB12C] Files:3    Time: 27s
Restart  Phase #:82   [DB12C] Files:1    Time: 1s
Serial   Phase #:83   [DB12C] Files:1    Time: 3s
Restart  Phase #:84   [DB12C] Files:1    Time: 0s
Serial   Phase #:85   [DB12C] Files:1    Time: 6s
Restart  Phase #:86   [DB12C] Files:1    Time: 0s
Parallel Phase #:87   [DB12C] Files:4    Time: 40s
Restart  Phase #:88   [DB12C] Files:1    Time: 0s
Serial   Phase #:89   [DB12C] Files:1    Time: 0s
Restart  Phase #:90   [DB12C] Files:1    Time: 0s
Serial   Phase #:91   [DB12C] Files:2    Time: 5s
Restart  Phase #:92   [DB12C] Files:1    Time: 0s
Serial   Phase #:93   [DB12C] Files:1    Time: 0s
Restart  Phase #:94   [DB12C] Files:1    Time: 0s
*******   Upgrading ODM, WK, EXF, RUL, XOQ   *******
Serial   Phase #:95   [DB12C] Files:1    Time: 8s
Restart  Phase #:96   [DB12C] Files:1    Time: 0s
***********   Final Component scripts    ***********
Serial   Phase #:97   [DB12C] Files:1    Time: 2s
*************   Final Upgrade scripts   ************
Serial   Phase #:98   [DB12C] Files:1    Time: 368s
*******************   Migration   ******************
Serial   Phase #:99   [DB12C] Files:1    Time: 0s
***   End PDB Application Upgrade Pre-Shutdown   ***
Serial   Phase #:100  [DB12C] Files:1    Time: 1s
Serial   Phase #:101  [DB12C] Files:1    Time: 0s
Serial   Phase #:102  [DB12C] Files:1    Time: 45s
*****************   Post Upgrade   *****************
Serial   Phase #:103  [DB12C] Files:1    Time: 13s
****************   Summary report   ****************
Serial   Phase #:104  [DB12C] Files:1    Time: 0s
***   End PDB Application Upgrade Post-Shutdown   **
Serial   Phase #:105  [DB12C] Files:1    Time: 0s
Serial   Phase #:106  [DB12C] Files:1    Time: 0s
Serial   Phase #:107  [DB12C] Files:1     Time: 51s
------------------------------------------------------
Phases [0-107]         End Time:[2021_07_01 02:53:53]
------------------------------------------------------
Grand Total Time: 1477s
 LOG FILES: (/u01/app/oracle/product/19.0.0.0/dbhome_1/cfgtoollogs/DB12C/upgrade20210701022916/catupgrd*.log)
Upgrade Summary Report Located in:
/u01/app/oracle/product/19.0.0.0/dbhome_1/cfgtoollogs/DB12C/upgrade20210701022916/upg_summary.log
Grand Total Upgrade Time:    [0d:0h:24m:37s]
[oracle@oraclesb dbs]$ 

5. Perform Post-Upgrade Actions/Fixup:

--- Timezones 
--- Listeners 
--- Other checks

select name from v$database;
select database_role from v$database;

column comp_name format a40
column version format a12
column status format a15
select comp_name,version,status from dba_registry;

column owner format a15
column object_name format a40
column object_type format a20
select owner, object_name, object_type from dba_objects where status='INVALID' and owner like '%SYS%' order by object_type,owner,object_name;

select * from dba_registry_history;

select PATCH_ID,status from dba_registry_sqlpatch;


[oracle@oraclesb dbs]$ ps -ef|grep smon
oracle   14019 21834  0 02:55 pts/1    00:00:00 grep --color=auto smon
oracle   23447     1  0 Jun25 ?        00:00:08 ora_smon_ORCLSB

[oracle@oraclesb dbs]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Thu Jul 1 02:55:13 2021
Copyright (c) 1982, 2016, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup;
ORACLE instance started.
Total System Global Area 3707763112 bytes
Fixed Size                  8903080 bytes
Variable Size             822083584 bytes
Database Buffers         2868903936 bytes
Redo Buffers                7872512 bytes
Database mounted.
Database opened.

SQL> select name from v$database;
select database_role from v$database;
NAME
---------
DB12C
SQL>
DATABASE_ROLE
----------------
PRIMARY

SQL> column comp_name format a40
column version format a12
column status format a15
select comp_name,version,status from dba_registry;
SQL> SQL> SQL>
COMP_NAME                                        VERSION      STATUS
----------------------------------------            ------------ ---------------
Oracle Database Catalog Views               19.0.0.0.0   UPGRADED
Oracle Database Packages and Types      19.0.0.0.0   UPGRADED
JServer JAVA Virtual Machine                 19.0.0.0.0   UPGRADED
Oracle XDK                                              19.0.0.0.0   UPGRADED
Oracle Database Java Packages                19.0.0.0.0   UPGRADED
OLAP Analytic Workspace                       19.0.0.0.0   UPGRADED
Oracle Real Application Clusters              19.0.0.0.0   UPGRADED
Oracle XML Database                              19.0.0.0.0   UPGRADED
Oracle Workspace Manager                      19.0.0.0.0   UPGRADED
Oracle Text                                               19.0.0.0.0   UPGRADED
Oracle Multimedia                                   19.0.0.0.0   UPGRADED
COMP_NAME                                        VERSION      STATUS
----------------------------------------             ------------ ---------------
Spatial                                                      19.0.0.0.0   LOADING
Oracle OLAP API                                    19.0.0.0.0   INVALID
Oracle Label Security                              19.0.0.0.0   UPGRADED
Oracle Database Vault                              19.0.0.0.0   UPGRADED
15 rows selected.
SQL> 

SQL> select PATCH_ID,status from dba_registry_sqlpatch;
  PATCH_ID STATUS
---------- ---------------
  32545013 SUCCESS
SQL>

Upgrade Summery:

[oracle@oraclesb upgrade20210701022916]$ more /u01/app/oracle/product/19.0.0.0/dbhome_1/cfgtoollogs/DB12C/upgrade20210701022916/upg_summary.log
Oracle Database Release 19 Post-Upgrade Status Tool    07-01-2021 02:53:0
Database Name: DB12C
Component                                           Current         Full     Elapsed Time
Name                                                    Status          Version  HH:MM:SS
Oracle Server                                        UPGRADED     19.11.0.0.0  00:09:51
JServer JAVA Virtual Machine             UPGRADED     19.11.0.0.0  00:00:44
Oracle XDK                                          UPGRADED     19.11.0.0.0  00:00:39
Oracle Database Java Packages            UPGRADED     19.11.0.0.0  00:00:07
OLAP Analytic Workspace                   UPGRADED     19.11.0.0.0  00:00:10
Oracle Label Security                           UPGRADED     19.11.0.0.0  00:00:05
Oracle Database Vault                           UPGRADED     19.11.0.0.0  00:00:21
Oracle Text                                            UPGRADED     19.11.0.0.0  00:00:27
Oracle Workspace Manager                  UPGRADED     19.11.0.0.0  00:00:26
Oracle Real Application Clusters          UPGRADED     19.11.0.0.0  00:00:00
Oracle XML Database                           UPGRADED     19.11.0.0.0  00:00:56
Oracle Multimedia                                 UPGRADED     19.11.0.0.0  00:00:16
Spatial                                                     LOADING     19.11.0.0.0  00:02:17
Oracle OLAP API                                   INVALID     19.11.0.0.0  00:00:07
Datapatch                                                 00:06:05
Final Actions                                            00:06:08
Post Upgrade                                            00:00:11
Total Upgrade Time: 00:22:57
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.
Grand Total Upgrade Time:    [0d:0h:24m:37s]
[oracle@oraclesb upgrade20210701022916]$

Upgrade Logs:

[oracle@oraclesb upgrade20210701022916]$ pwd
/u01/app/oracle/product/19.0.0.0/dbhome_1/cfgtoollogs/DB12C/upgrade20210701022916
[oracle@oraclesb upgrade20210701022916]$ ls -ltrh
total 71M
-rw-------. 1 oracle oinstall  566 Jul  1 02:29 catupgrd_catcon_9381.lst
-rw-r--r--. 1 oracle oinstall    0 Jul  1 02:45 catupgrd_datapatch_upgrade.err
-rw-r--r--. 1 oracle oinstall 1.3K Jul  1 02:52 catupgrd_datapatch_upgrade.log
-rw-------. 1 oracle oinstall 8.6M Jul  1 02:53 catupgrd1.log
-rw-------. 1 oracle oinstall 6.9M Jul  1 02:53 catupgrd2.log
-rw-------. 1 oracle oinstall 6.9M Jul  1 02:53 catupgrd3.log
-rw-r--r--. 1 oracle oinstall  39K Jul  1 02:53 catupgrd_stderr.log
-rw-r--r--. 1 oracle oinstall 1.7K Jul  1 02:53 upg_summary.log
-rw-------. 1 oracle oinstall  49M Jul  1 02:53 catupgrd0.log
[oracle@oraclesb upgrade20210701022916]$

Regards,
Mallik

No comments:

Post a Comment

Automation Script | Archivelog Generation Hourly Monitoring

1. List out all the running databases and pic one database where we want to monitore the archive log generation from last 1 month. [oracle@o...