Step by Step Manual Upgrade Oracle Database from 12c to 19c
Step by Step Manual Upgrade Oracle Database from 12c to 19c
In a recent post, we demonstrated Step by Step Oracle Database Upgrade from 11g (11.2.0.4) to 12c (12.2.0.1) using DBUA, click here to read more about it. In this article, we are going to demonstrate Step by Step Manual Upgrade Oracle Database from12c to 19c on Linux. Follow the below steps to perform a manual upgrade to 19c.
List of target upgrade versions from supported source version along with the certificate, data source support.oracle.com.
Direct Upgrade List:
| Source DB Version | Target DB Version |
| 18.1 | 19c |
| 12.2.0.2 | 19c |
| 12.1.0.2 | 19c |
| 11.2.04 | 19c |
Indirect Upgrade List:
| Source DB Version | Intermediate DB Version | Target DB Version |
| 12.1.0.1 | 12.1.0.2/12.2.0.1 | 19c |
| 11.2.0.1/11.2.0.2/11.2.0.3 | 11.2.0.4 | 19c |
| 11.1.0.6/11.1.0.7 | 11.2.0.4 | 19c |
| 10.2.0.2/10.2.0.3/10.2.0.4/10.2.0.5 | 11.2.0.4/12.1.0.2 | 19c |
| 10.1.0.5 | 11.2.0.4/12.1.0.2 | 19c |
| 9.2.0.8 or earlier | 11.2.0.4 | 19c |
19c Certificate.
Below are the environmental details of this demonstration.
| COMPONENTS | SOURCE | TARGET |
| Database Name & Type | LABDB03, Standalone | LABDB03, Standalone |
| Database Version | 12.2.0.1 | 19.3.0.0 |
| Oracle Home | /u01/app/oracle/product/12201/db_1 | /u01/app/oracle/product/1930/db_1 |
| DB Server Type | Linux, OEL 7.9 | Linux, OEL 7.9 |
We will complete a manual upgrade from 12c to 19c in the below three-part followed by detailed steps.
1. Pre-Checks / Pre-Steps
2. Manual Upgrade using command Steps
3. Post upgrade Steps
1. Pre-Checks / Pre-Steps
1.1: Install 19c Binary: Install Oracle 19c binary if it’s not already available on the DB server. Click here to get 19c binary installation steps and follow the same.
1.2: Execute the pre-upgrade command: Execute the preupgrade tool from the source home (12c).
$12C_ORACLE_HOME/jdk/bin/java -jar $19C_ORACLE_HOME/rdbms/admin/preupgrade.jar FILE TEXT DIR output_dir
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | [oracle@DBsGuruN2 bkp]$ . oraenvORACLE_SID = [labdb03] ? labdb03The Oracle base remains unchanged with value /u01/app/oracle[oracle@DBsGuruN2 ~]$ /u01/app/oracle/product/12201/db_1/jdk/bin/java -jar /u01/app/oracle/product/1930/db_1/rdbms/admin/preupgrade.jar FILE DIR /home/oracle/bkp/labdb03_upgrade==================PREUPGRADE SUMMARY================== /home/oracle/bkp/labdb03_upgrade/preupgrade.log /home/oracle/bkp/labdb03_upgrade/preupgrade_fixups.sql /home/oracle/bkp/labdb03_upgrade/postupgrade_fixups.sqlExecute fixup scripts as indicated below:Before upgrade:Log into the database and execute the preupgrade fixups@/home/oracle/bkp/labdb03_upgrade/preupgrade_fixups.sqlAfter the upgrade:Log into the database and execute the postupgrade fixups@/home/oracle/bkp/labdb03_upgrade/postupgrade_fixups.sqlPreupgrade complete: 2022-02-08T18:02:01 |
Switch to the directory to review generated files and log by preupgrade tool as mentioned in preupgrade.jar.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | [oracle@DBsGuruN1 ~]$ cd /home/oracle/bkp/labdb03_upgrade[oracle@DBsGuruN2 labdb03_upgrade]$ ls -lrttotal 728drwxr-xr-x. 3 oracle oinstall 21 Feb 8 18:01 oracle-rw-r--r--. 1 oracle oinstall 15085 Feb 8 18:01 dbms_registry_extended.sql-rw-r--r--. 1 oracle oinstall 7884 Feb 8 18:01 preupgrade_driver.sql-rw-r--r--. 1 oracle oinstall 455876 Feb 8 18:01 preupgrade_package.sql-rw-r--r--. 1 oracle oinstall 100166 Feb 8 18:01 preupgrade_messages.properties-rw-r--r--. 1 oracle oinstall 14016 Feb 8 18:01 parameters.propertiesdrwxr-xr-x. 3 oracle oinstall 24 Feb 8 18:01 upgrade-rw-r--r--. 1 oracle oinstall 41134 Feb 8 18:01 components.properties-rw-r--r--. 1 oracle oinstall 2 Feb 8 18:01 checksBuffer.tmp-rw-r--r--. 1 oracle oinstall 7734 Feb 8 18:02 preupgrade_fixups.sql-rw-r--r--. 1 oracle oinstall 8618 Feb 8 18:02 postupgrade_fixups.sql-rw-r--r--. 1 oracle oinstall 7079 Feb 8 18:02 preupgrade.log-rw-r--r--. 1 oracle oinstall 1083 Feb 8 18:46 upgrade_initlabdb03.ora[oracle@DBsGuruN1 labdb03_upgrade]$ cat preupgrade.logReport generated by Oracle Database Pre-Upgrade Information Tool Version19.0.0.0.0 Build: 1 on 2022-02-08T18:02:01Upgrade-To version: 19.0.0.0.0=======================================Status of the database prior to upgrade======================================= Database Name: LABDB03 Container Name: labdb03 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 ================ None RECOMMENDED ACTIONS =================== 1. (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. 2. (AUTOFIXUP) Gather statistics on fixed objects prior the upgrade. None of the fixed object tables have had stats collected. Gathering statistics on fixed objects, if none have been gathered yet, is recommended prior to upgrading. 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 ---------- ---------- ----------- SYSAUX 450 MB 500 MB SYSTEM 800 MB 912 MB TEMP 32 MB 150 MB UNDOTBS1 70 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 LABDB03 which are identified above as BEFORE UPGRADE "(AUTOFIXUP)" can be resolved by executing the following SQL>@/home/oracle/bkp/labdb03_upgrade/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. To identify directory objects with symbolic links in the path name, run $ORACLE_HOME/rdbms/admin/utldirsymlink.sql AS SYSDBA after upgrade. Recreate any directory objects listed, using path names that contain no symbolic links. Some directory object path names may currently contain symbolic links. Starting in Release 18c, symbolic links are not allowed in directory object path names used with BFILE data types, the UTL_FILE package, or external tables. 7. (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. 8. 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 LABDB03 which are identified above as AFTER UPGRADE "(AUTOFIXUP)" can be resolved by executing the following SQL>@/home/oracle/bkp/labdb03_upgrade/postupgrade_fixups.sql[oracle@DBsGuruN1 labdb03_upgrade]$ SQL> @/home/oracle/bkp/labdb03_upgrade/preupgrade_fixups.sql |
NOTE: 1. Review log preupgrade.log and act if any action requires under “REQUIRED ACTIONS” especially for tablespaces SYSTEM, SYAUX, UNDO, TEMP, and optionally “RECOMMENDED ACTIONS“.
2. After taking action to fix issues as required, must execute again preupgrade tool and make sure no action require in preupgrade.log.
3. preupgrade_fixups.sql command will be executed before the upgrade, here we will be doing also manual execution of various SQLs and other commands which are the surety of success along with the smooth upgrade.
1.3. Refresh Materialized Views if any: Wait for the completion of materialized views if exist in the database.
1 2 3 4 5 6 7 8 9 10 11 12 | SQL> declarelist_failures integer(3) :=0;beginDBMS_MVIEW.REFRESH_ALL_MVIEWS(list_failures,'C','', TRUE, FALSE);end;/ 2 3 4 5 6PL/SQL procedure successfully completed.SQL> SELECT o.name FROM sys.obj$ o, sys.user$ u, sys.sum$ s WHERE o.type# = 42 AND bitand(s.mflags, 8) =8;no rows selected |
1.4: Manually gather statistics: Execute the below commands to gather statistics which will reduce the total time of upgrade.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | SQL> exec dbms_stats.gather_fixed_objects_stats;PL/SQL procedure successfully completed.SQL> exec dbms_stats.gather_schema_stats ('SYSTEM');PL/SQL procedure successfully completed.SQL> exec dbms_stats.gather_schema_stats ('SYS');PL/SQL procedure successfully completed.SQL> exec dbms_stats.gather_dictionary_stats;PL/SQL procedure successfully completed. |
1.5: Active Backup Validation: Validate database for active-backup or if any datafiles are in recovery mode.
1 2 3 4 5 6 | SQL> SELECT * FROM v$recover_file;no rows selectedSQL> SELECT * FROM v$backup WHERE status != 'NOT ACTIVE';no rows selected |
1.6: Default Tablespace for SYS & SYSTEM: Validate users SYS and SYSTEM have assigned default tablespace SYSTEM.
1 2 3 | SQL> SELECT * from dba_users where username in ('SYS','SYSTEM') and default_tablespace!='SYSTEM';no rows selected |
1.7: Pending 2phase pending transactions: Validate any Pending 2phase Transactions active.
1 2 3 | SQL> SELECT * FROM dba_2pc_pending;no rows selected |
In case the above command returns any selected rows with data, then run the below following commands:
1 2 3 | SQL> SELECT local_tran_id FROM dba_2pc_pending;SQL> EXECUTE dbms_transaction.purge_lost_db_entry('');SQL> COMMIT; |
1.8: Invalid Objects compile: Execute the below command to validate invalid objects and Recompile them if found any invalid objects, especially for database default users.
1 2 3 4 | SQL> select owner, count(*) from dba_objects where status <> 'VALID'group by owner;no rows selectedSQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql |
1.9: Component’s version along with status: Validate components status and make sure none of should be INVALID.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | SQL> set lines 333 pages 111SQL> col COMP_NAME form a55SQL> select comp_name, version, status from dba_registry;COMP_NAME VERSION STATUS------------------------------------------------------- ------------------------------ --------------------------------------------Oracle Database Catalog Views 12.2.0.1.0 VALIDOracle Database Packages and Types 12.2.0.1.0 VALIDJServer JAVA Virtual Machine 12.2.0.1.0 VALIDOracle XDK 12.2.0.1.0 VALIDOracle Database Java Packages 12.2.0.1.0 VALIDOLAP Analytic Workspace 12.2.0.1.0 VALIDOracle Real Application Clusters 12.2.0.1.0 OPTION OFFOracle XML Database 12.2.0.1.0 VALIDOracle Workspace Manager 12.2.0.1.0 VALIDOracle Text 12.2.0.1.0 VALIDOracle Multimedia 12.2.0.1.0 VALIDSpatial 12.2.0.1.0 VALIDOracle OLAP API 12.2.0.1.0 VALIDOracle Label Security 12.2.0.1.0 VALIDOracle Database Vault 12.2.0.1.0 VALID15 rows selected. |
1.10: Empty Database Recyclebin: Purge deleted objects from recyclebin.
1 2 3 4 5 6 7 8 9 | SQL> purge DBA_RECYCLEBIN;DBA Recyclebin purged.SQL> select count(*) from DBA_RECYCLEBIN; COUNT(*)---------- 0 |
1.11: Validate value of parameter sec_case_sensitive_logon: If the value is FALSE then change to TRUE.
1 2 3 4 5 6 7 8 9 | SQL> alter system set sec_case_sensitive_logon=TRUE scope=both;System altered.SQL> show parameter sec_case_sensitive_logonNAME TYPE VALUE------------------------------------ ----------- ------------------------------sec_case_sensitive_logon boolean TRUE |
1.12: Timezone: Validate the timezone.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | SQL> COL PROPERTY_NAME FOR A25SQL> COL PROPERTY_VALUE FOR A21SQL> Select version from v$timezone_file; VERSION---------- 261 row selected.SQL> select PROPERTY_NAME,PROPERTY_VALUE from database_properties where property_name ='DST_PRIMARY_TT_VERSION';PROPERTY_NAME PROPERTY_VALUE------------------------- ---------------------DST_PRIMARY_TT_VERSION 261 row selected. |
1.13: Upgrade component APEX: If component APEX is installed in 12c then it’s recommended to upgrade it prior to upgrading the database to 19c following doc ID 1088970.1.
1 2 3 | SQL> select COMP_ID, VERSION, STATUS from DBA_REGISTRY where COMP_ID='APEX';no rows selected |
1.14: Execute dbupgdiag.sql: This is recommended to execute dbupgdiag.sql which captured detailed information of installed COMPONENTS, INVALID OBJECTS along with much more detailed information of database and also must fix if found any action prior to upgrade to 19c. Click here to download dbupgdiag.sql.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 | SQL> @/home/oracle/bkp/labdb03_upgrade/dbupgdiag.sqlEnter location for Spooled output:Enter value for 1: /home/oracle/bkp/labdb03_upgrade09_Feb_2022_0556 .loglabdb03_ *** Start of LogFile *** Oracle Database Upgrade Diagnostic Utility 02-09-2022 17:56:06===============Hostname===============DBsGuruN2.labdomain===============Database Name===============LABDB03===============Database Uptime===============17:14 09-FEB-22=================Database Wordsize=================This is a 64-bit database================Software Version================Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production 0PL/SQL Release 12.2.0.1.0 - Production 0CORE 12.2.0.1.0 Production 0TNS for Linux: Version 12.2.0.1.0 - Production 0NLSRTL Version 12.2.0.1.0 - Production 0=============Compatibility=============Compatibility is set as 12.2.0================Archive Log Mode================Database log mode Archive ModeAutomatic archival EnabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 9Next log sequence to archive 11Current log sequence 11================Auditing Check================NAME TYPE VALUE------------------------------------ ----------- ------------------------------audit_file_dest string /u01/app/oracle/admin/labdb03/ adumpaudit_sys_operations boolean TRUEaudit_syslog_level stringaudit_trail string DBunified_audit_sga_queue_size integer 1048576================Cluster Check================NAME TYPE VALUE------------------------------------ ----------- ------------------------------cluster_database boolean FALSEcluster_database_instances integer 1DOC>################################################################DOC>DOC> If CLUSTER_DATABASE is set to TRUE, change it to FALSE beforeDOC> upgrading the databaseDOC>DOC>################################################################DOC>#===========================================Tablespace and the owner of the aud$ table ( IF Oracle Label Security and Oracle Database Vault are installed then aud$ will be in SYSTEM.AUD$)===========================================OWNER TABLESPACE_NAME------------ ------------------------------SYS SYSTEM============================================================================count of records in the sys.aud$ table where dbid is null- Standard Auditing============================================================================ 0============================================================================================count of records in the system.aud$ when dbid is null, Std Auditing with OLS or DV installed============================================================================================select count(*) from system.aud$ where dbid is null *ERROR at line 1:ORA-00942: table or view does not exist=============================================================================count of records in the sys.fga_log$ when dbid is null, Fine Grained Auditing============================================================================= 0==========================================Oracle Label Security is installed or not==========================================Oracle Label Security is installed================Number of AQ Records in Message Queue Tables================SYS - ALERT_QT - 0SYS - AQ$_MEM_MC - 0SYS - AQ_EVENT_TABLE - 0SYS - AQ_PROP_TABLE - 0SYS - KUPC$DATAPUMP_QUETAB - 0SYS - ORA$PREPLUGIN_BACKUP_QTB - 0SYS - SCHEDULER$_EVENT_QTAB - 0SYS - SCHEDULER$_REMDB_JOBQTAB - 0SYS - SCHEDULER_FILEWATCHER_QT - 0SYS - SYS$SERVICE_METRICS_TAB - 0WMSYS - WM$EVENT_QUEUE_TABLE - 0================Time Zone version================ 26================Local Listener================LISTENER_LABDB03================Default and Temporary Tablespaces By User================USERNAME TEMPORARY_TABLESPACE DEFAULT_TABLESPACE---------------------------- ---------------------- ----------------------SYS TEMP SYSTEMSYSTEM TEMP SYSTEMXS$NULL TEMP SYSTEMOJVMSYS TEMP SYSTEMLBACSYS TEMP SYSTEMOUTLN TEMP SYSTEMSYS$UMF TEMP SYSTEMDBSNMP TEMP SYSAUXAPPQOSSYS TEMP SYSAUXDBSFWUSER TEMP SYSAUXGGSYS TEMP SYSAUXANONYMOUS TEMP SYSAUXCTXSYS TEMP SYSAUXSI_INFORMTN_SCHEMA TEMP SYSAUXDVSYS TEMP SYSAUXDVF TEMP SYSAUXGSMADMIN_INTERNAL TEMP SYSAUXORDPLUGINS TEMP SYSAUXMDSYS TEMP SYSAUXOLAPSYS TEMP SYSAUXORDDATA TEMP SYSAUXXDB TEMP SYSAUXWMSYS TEMP SYSAUXORDSYS TEMP SYSAUXGSMCATUSER TEMP USERSMDDATA TEMP USERSSYSBACKUP TEMP USERSREMOTE_SCHEDULER_AGENT TEMP USERSGSMUSER TEMP USERSSYSRAC TEMP USERSAUDSYS TEMP USERSDIP TEMP USERSSYSKM TEMP USERSORACLE_OCM TEMP USERSSYSDG TEMP USERSSPATIAL_CSW_ADMIN_USR TEMP USERS================Component Status================Comp ID Component Status Version Org_Version Prv_Version------- ---------------------------------- --------- -------------- -------------- --------------APS OLAP Analytic Workspace VALID 12.2.0.1.0CATALOG Oracle Database Catalog Views VALID 12.2.0.1.0CATJAVA Oracle Database Java Packages VALID 12.2.0.1.0CATPROC Oracle Database Packages and Types VALID 12.2.0.1.0CONTEXT Oracle Text VALID 12.2.0.1.0DV Oracle Database Vault VALID 12.2.0.1.0JAVAVM JServer JAVA Virtual Machine VALID 12.2.0.1.0OLS Oracle Label Security VALID 12.2.0.1.0ORDIM Oracle Multimedia VALID 12.2.0.1.0OWM Oracle Workspace Manager VALID 12.2.0.1.0RAC Oracle Real Application Clusters OPTION OFF12.2.0.1.0SDO Spatial VALID 12.2.0.1.0XDB Oracle XML Database VALID 12.2.0.1.0XML Oracle XDK VALID 12.2.0.1.0XOQ Oracle OLAP API VALID 12.2.0.1.0======================================================List of Invalid Database Objects Owned by SYS / SYSTEM======================================================Number of Invalid Objects------------------------------------------------------------------There are no Invalid ObjectsDOC>################################################################DOC>DOC> If there are no Invalid objects below will result in zero rows.DOC>DOC>################################################################DOC>#no rows selected================================List of Invalid Database Objects================================Number of Invalid Objects------------------------------------------------------------------There are no Invalid ObjectsDOC>################################################################DOC>DOC> If there are no Invalid objects below will result in zero rows.DOC>DOC>################################################################DOC>#no rows selected======================================================Count of Invalids by Schema====================================================================================================================Identifying whether a database was created as 32-bit or 64-bit==============================================================DOC>###########################################################################DOC>DOC> Result referencing the string 'B023' ==> Database was created as 32-bitDOC> Result referencing the string 'B047' ==> Database was created as 64-bitDOC> When String results in 'B023' and when upgrading database to 10.2.0.3.0DOC> (64-bit) , For known issue refer below articlesDOC>DOC> Note 412271.1 ORA-600 [22635] and ORA-600 [KOKEIIX1] Reported WhileDOC> Upgrading Or Patching Databases To 10.2.0.3DOC> Note 579523.1 ORA-600 [22635], ORA-600 [KOKEIIX1], ORA-7445 [KOPESIZ] andDOC> OCI-21500 [KOXSIHREAD1] Reported While Upgrading To 11.1.0.6DOC>DOC>###########################################################################DOC>#Metadata Initial DB Creation Info-------- -----------------------------------B047 Database was created as 64-bit===================================================Number of Duplicate Objects Owned by SYS and SYSTEM===================================================Counting duplicate objects .... COUNT(1)---------- 0=========================================Duplicate Objects Owned by SYS and SYSTEM=========================================Querying duplicate objects ....DOC>DOC>################################################################################DOC>Below are expected and required duplicates objects and OMITTED in the report .DOC>DOC>Without replication installed:DOC>INDEX AQ$_SCHEDULES_PRIMARYDOC>TABLE AQ$_SCHEDULESDOC>DOC>If replication is installed by running catrep.sql:DOC>INDEX AQ$_SCHEDULES_PRIMARYDOC>PACKAGE DBMS_REPCAT_AUTHDOC>PACKAGE BODY DBMS_REPCAT_AUTHDOC>TABLE AQ$_SCHEDULESDOC>DOC>If any objects found please follow below article.DOC>Note 1030426.6 How to Clean Up Duplicate Objects Owned by SYS and SYSTEM schemaDOC>Read the Exceptions carefully before taking actions.DOC>DOC>################################################################################DOC>#========================Password protected roles========================DOC>DOC>################################################################################DOC>DOC> In version 11.2 password protected roles are no longer enabled by default so ifDOC> an application relies on such roles being enabled by default and no action isDOC> performed to allow the user to enter the password with the set role command, itDOC> is recommended to remove the password from those roles (to allow for existingDOC> privileges to remain available). For more information see:DOC>DOC> Note 745407.1 : What Roles Can Be Set as Default for a User?DOC>DOC>################################################################################DOC>#Querying for password protected roles ....================JVM Verification================================================================Checking Existence of Java-Based Users and Roles================================================DOC>DOC>################################################################################DOC>DOC> There should not be any Java Based users for database version 9.0.1 and above.DOC> If any users found, it is faulty JVM.DOC>DOC>################################################################################DOC>#User Existence---------------------------No Java Based UsersDOC>DOC>###############################################################DOC>DOC> Healthy JVM Should contain Six Roles. For 12.2 Seven RolesDOC> If there are more or less than six role, JVM is inconsistent.DOC>DOC>###############################################################DOC>#Role------------------------------There are 7 JAVA related rolesRolesROLE------------------------------JAVAUSERPRIVJAVAIDPRIVJAVASYSPRIVJAVADEBUGPRIVDBJAVASCRIPTJAVA_ADMINJAVA_DEPLOY=========================================List of Invalid Java Objects owned by SYS=========================================There are no SYS owned invalid JAVA objectsDOC>DOC>#################################################################DOC>DOC> Check the status of the main JVM interface packages DBMS_JAVADOC> and INITJVMAUX and make sure it is VALID.DOC>DOC> If there are no Invalid objects below will result in zero rows.DOC>DOC>#################################################################DOC>#no rows selectedDOC>DOC>#################################################################DOC>DOC> If the JAVAVM component is not installed in the database (forDOC> example, after creating the database with custom scripts), theDOC> next query will report the following error:DOC>DOC> select dbms_java.longname('foo') "JAVAVM TESTING" from dualDOC> *DOC> ERROR at line 1:DOC> ORA-00904: "DBMS_JAVA"."LONGNAME": invalid identifierDOC>DOC> If the JAVAVM component is installed, the query should succeedDOC> with 'foo' as result.DOC>DOC>#################################################################DOC>#JAVAVM TESTING---------------foo===================================Oracle Multimedia/InterMedia status===================================.Oracle Multimedia/interMedia is installed and listed with the following version: 12.2.0.1.0 and status: VALID.Checking for installed Database Schemas...ORDSYS user exists.ORDPLUGINS user exists.MDSYS user exists.SI_INFORMTN_SCHEMA user exists..Checking for Prerequisite Components...JAVAVM installed and listed as validXDK installed and listed as validXDB installed and listed as validValidating Oracle Multimedia/interMedia...(no output if component status is valid)PL/SQL procedure successfully completed. *** End of LogFile ***Upload db_upg_diag_labdb03_09_Feb_2022_0556.log from "/home/oracle/bkp/labdb03_upgrade" directorySQL> |
1.15: Database Backup: Take the database a full backup before upgrade.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | [oracle@DBsGuruN2 bkp]$ . oraenvORACLE_SID = [labdb03] ? labdb03The Oracle base remains unchanged with value /u01/app/oracle[oracle@DBsGuruN2 bkp]$ rman target /Recovery Manager: Release 12.2.0.1.0 - Production on Tue Feb 8 17:54:05 2022Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.connected to target database: LABDB03 (DBID=326197667)RMAN> run{ALLOCATE CHANNEL D1 DEVICE TYPE DISK FORMAT '/home/oracle/bkp/labdb03_%U';ALLOCATE CHANNEL D2 DEVICE TYPE DISK FORMAT '/home/oracle/bkp/labdb03_%U';ALLOCATE CHANNEL D3 DEVICE TYPE DISK FORMAT '/home/oracle/bkp/labdb03_%U';BACKUP tag 'UPGRADE_DB' FORCE AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG;BACKUP CURRENT CONTROLFILE TAG 'UPGRADE_CTL' FORMAT '/home/oracle/bkp/labdb03ctl_%u';BACKUP SPFILE TAG 'UPGRADE_SPFILE' FORMAT '/home/oracle/bkp/labdb03sf_%U';RELEASE CHANNEL D1;2> RELEASE CHANNEL D2;RELEASE CHANNEL D3;}3> 4> 5> 6> 7> 8> 9> 10> 11> 12>using target database control file instead of recovery catalogallocated channel: D1channel D1: SID=17 device type=DISKallocated channel: D2channel D2: SID=140 device type=DISKallocated channel: D3channel D3: SID=268 device type=DISKStarting backup at 08-FEB-22current log archivedchannel D1: starting compressed archived log backup setchannel D1: specifying archived log(s) in backup setinput archived log thread=1 sequence=5 RECID=1 STAMP=1096134857channel D1: starting piece 1 at 08-FEB-22channel D1: finished piece 1 at 08-FEB-22piece handle=/home/oracle/bkp/labdb03_010lbc69_1_1 tag=UPGRADE_DB comment=NONEchannel D1: backup set complete, elapsed time: 00:00:01Finished backup at 08-FEB-22Starting backup at 08-FEB-22channel D1: starting compressed full datafile backup setchannel D1: specifying datafile(s) in backup setinput datafile file number=00001 name=/oradata/labdb03/system01.dbfinput datafile file number=00007 name=/oradata/labdb03/users01.dbfchannel D1: starting piece 1 at 08-FEB-22channel D2: starting compressed full datafile backup setchannel D2: specifying datafile(s) in backup setinput datafile file number=00003 name=/oradata/labdb03/sysaux01.dbfinput datafile file number=00004 name=/oradata/labdb03/undotbs01.dbfchannel D2: starting piece 1 at 08-FEB-22channel D1: finished piece 1 at 08-FEB-22piece handle=/home/oracle/bkp/labdb03_020lbc6a_1_1 tag=UPGRADE_DB comment=NONEchannel D1: backup set complete, elapsed time: 00:00:35channel D2: finished piece 1 at 08-FEB-22piece handle=/home/oracle/bkp/labdb03_030lbc6a_1_1 tag=UPGRADE_DB comment=NONEchannel D2: backup set complete, elapsed time: 00:00:35Finished backup at 08-FEB-22Starting backup at 08-FEB-22current log archivedchannel D1: starting compressed archived log backup setchannel D1: specifying archived log(s) in backup setinput archived log thread=1 sequence=6 RECID=2 STAMP=1096134894channel D1: starting piece 1 at 08-FEB-22channel D1: finished piece 1 at 08-FEB-22piece handle=/home/oracle/bkp/labdb03_040lbc7e_1_1 tag=UPGRADE_DB comment=NONEchannel D1: backup set complete, elapsed time: 00:00:01Finished backup at 08-FEB-22Starting backup at 08-FEB-22channel D1: starting full datafile backup setchannel D1: specifying datafile(s) in backup setincluding current control file in backup setchannel D1: starting piece 1 at 08-FEB-22channel D1: finished piece 1 at 08-FEB-22piece handle=/home/oracle/bkp/labdb03ctl_050lbc7f tag=UPGRADE_CTL comment=NONEchannel D1: backup set complete, elapsed time: 00:00:01Finished backup at 08-FEB-22Starting backup at 08-FEB-22channel D1: starting full datafile backup setchannel D1: specifying datafile(s) in backup setincluding current SPFILE in backup setchannel D1: starting piece 1 at 08-FEB-22channel D1: finished piece 1 at 08-FEB-22piece handle=/home/oracle/bkp/labdb03sf_060lbc7h_1_1 tag=UPGRADE_SPFILE comment=NONEchannel D1: backup set complete, elapsed time: 00:00:01Finished backup at 08-FEB-22Starting Control File and SPFILE Autobackup at 08-FEB-22piece handle=/home/oracle/FRA/LABDB03/autobackup/2022_02_08/o1_mf_s_1096134898_k04r8tz4_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 08-FEB-22released channel: D1released channel: D2released channel: D3RMAN>[oracle@DBsGuruN2 ~]$ cd /home/oracle/bkp/[oracle@DBsGuruN2 bkp]$ ls -lrttotal 329004-rw-r-----. 1 oracle oinstall 1245696 Feb 8 17:54 labdb03_010lbc69_1_1-rw-r-----. 1 oracle oinstall 111738880 Feb 8 17:54 labdb03_030lbc6a_1_1-rw-r-----. 1 oracle oinstall 213123072 Feb 8 17:54 labdb03_020lbc6a_1_1-rw-r-----. 1 oracle oinstall 7168 Feb 8 17:54 labdb03_040lbc7e_1_1-rw-r-----. 1 oracle oinstall 10665984 Feb 8 17:54 labdb03ctl_050lbc7f-rw-r-----. 1 oracle oinstall 114688 Feb 8 17:54 labdb03sf_060lbc7h_1_1[oracle@DBsGuruN2 bkp]$ |
1.16: Create guaranteed restore point: You can also create a guaranteed restore point, for this feature your DB should be in archive log mode along with flashback ON with ample free space in FRA and this is a completely optional step depending on your requirements & criticality.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | SQL> create restore point PRE_UPGRADE_LABDB03 guarantee flashback database;Restore point created.SQL> COL NAME FOR A25SQL> COL GUARANTEE_FLASHBACK_DATABASE FOR A31SQL> select NAME,GUARANTEE_FLASHBACK_DATABASE,TIME from V$restore_point;NAME GUARANTEE_FLASHBACK_DATABASE TIME------------------------- ------------------------------- ---------------------------------------------------------------------------PRE_UPGRADE_LABDB03 YES 08-FEB-22 06.37.46.000000000 PM[oracle@DBsGuruN2 ~]$ cd /home/oracle/FRA/LABDB03/flashback[oracle@DBsGuruN2 flashback]$ ls -lrttotal 102416-rw-r-----. 1 oracle oinstall 52436992 Feb 8 18:37 o1_mf_k04ts4sd_.flb-rw-r-----. 1 oracle oinstall 52436992 Feb 8 18:38 o1_mf_k04ts2gn_.flb |
1.17: Change the parameter CLUSTER_DATABASE to FALSE: To change the value of CLUSTER_DATABASE to FALSE is applicable only to the RAC database.
1 2 3 4 5 6 7 8 9 | SQL> alter system set cluster_database=FALSE scope=spfile;System altered.SQL> show parameter cluster_databaseNAME TYPE VALUE------------------------------------ ----------- ------------------------------cluster_database boolean FALSE |
1.18: Others:
1.19.1: Disable cronjobs/scheduler jobs/Triggers if any.
1.19.2: Blackout database in OEM. Click here to get steps for Target Blackouts in OEM 13c.
1.19.3: Stop all dependent applications.
1.19: Stop the database: Shutdown the database.
1 2 3 4 | SQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down. |
For RAC:
1 | [oracle@DBsGuruN2 ~]$ srvctl stop database -db <DB NAME> |
1.20: Copy SPFILE & PASSWORD FILE: Copy SPFILE & PASSWORD FILE from 12c to 19c ORACLE HOME.
1 2 3 4 5 | [oracle@DBsGuruN2 dbs]$ cd $ORACLE_HOME/dbs[oracle@DBsGuruN2 dbs]$ cp orapwlabdb03 spfilelabdb03.ora /u01/app/oracle/product/1930/db_1/dbs/[oracle@DBsGuruN2 dbs]$ ls -lrt /u01/app/oracle/product/1930/db_1/dbs/*labdb03*-rw-r-----. 1 oracle oinstall 3584 Feb 9 19:07 /u01/app/oracle/product/1930/db_1/dbs/spfilelabdb03.ora-rw-r-----. 1 oracle oinstall 3584 Feb 9 19:07 /u01/app/oracle/product/1930/db_1/dbs/orapwlabdb03 |
2. Manual Upgrade using command Steps
2.1: Startup in Upgrade Mode: Start the database in upgrade mode from 19c ORACLE_HOME.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | [oracle@DBsGuruN2 ~]$ export ORACLE_HOME=/u01/app/oracle/product/1930/db_1[oracle@DBsGuruN2 ~]$ export PATH=$ORACLE_HOME/bin:$PATH[oracle@DBsGuruN2 ~]$ export ORACLE_SID=labdb03[oracle@DBsGuruN2 ~]$ which sqlplus/u01/app/oracle/product/1930/db_1/bin/sqlplus[oracle@DBsGuruN2 ~]$ sqlplus -vSQL*Plus: Release 19.0.0.0.0 - ProductionVersion 19.3.0.0.0[oracle@DBsGuruN2 ~]$[oracle@DBsGuruN2 ~]$ sqlplus / as sysdbaSQL*Plus: Release 19.0.0.0.0 - Production on Wed Feb 9 19:22:43 2022Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle. All rights reserved.Connected to an idle instance.SQL> startup upgradeORACLE instance started.Total System Global Area 1241513488 bytesFixed Size 8896016 bytesVariable Size 335544320 bytesDatabase Buffers 889192448 bytesRedo Buffers 7880704 bytesDatabase mounted.Database opened.SQL> SELECT NAME,OPEN_MODE,STATUS,VERSION FROM V$DATABASE, V$INSTANCE;NAME OPEN_MODE STATUS VERSION--------- -------------------- ------------ -----------------LABDB03 READ WRITE OPEN MIGRATE 19.0.0.0.0 |
2.2: Execute dbupgrade command-line tool: To manually upgrade the 19c database, we can execute any one of the commands dbupgrade or catctl.pl.
$ORACLE_HOME/bin/dbupgrade -n 5 -l /home/oracle/bkp/labdb03_upgrade/log
OR
$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catctl.pl -n 5 -l /home/oracle/bkp/labdb03_upgrade/log catupgrd.sql
-n Maximum number of parallel SQL processes to use when upgrading the database. Multitenant database defaults to the total number of CPUs on your system. Traditional database defaults to 4.
-l Directory to use for spool log files.
Here we are upgrading using dbupgrade command-line tool and it took approx 26 minutes to complete the upgrade and executed in the background using nohup. Follow the below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | [oracle@DBsGuruN2 bin]$ ls dbupgradedbupgrade[oracle@DBsGuruN2 bin]$ ls -lt dbupgrade-rwxr-x---. 1 oracle oinstall 3136 Apr 17 2019 dbupgrade[oracle@DBsGuruN2 bin]$[oracle@DBsGuruN2 bin]$ nohup ./dbupgrade -l /home/oracle/bkp/labdb03_upgrade/log &[1] 13156[oracle@DBsGuruN2 bin]$ nohup: ignoring input and appending output to ‘nohup.out’[oracle@DBsGuruN2 bin]$ tail -333f nohup.outArgument list for [/u01/app/oracle/product/1930/db_1/rdbms/admin/catctl.pl]For Oracle internal use only A = 0Run in c = 0Do not run in C = 0Input Directory d = 0Echo OFF e = 1Simulate E = 0Forced cleanup F = 0Log Id i = 0Child Process I = 0Log Dir l = /home/oracle/bkp/labdb03_upgrade/logPriority List Name L = 0Upgrade Mode active M = 0SQL Process Count n = 0SQL PDB Process Count N = 0Open Mode Normal o = 0Start Phase p = 0End Phase P = 0Reverse Order r = 0AutoUpgrade Resume R = 0Script s = 0Serial Run S = 0RO User Tablespaces T = 0Display Phases y = 0Debug catcon.pm z = 0Debug catctl.pl Z = 0catctl.pl VERSION: [19.0.0.0.0] STATUS: [Production] BUILD: [RDBMS_19.3.0.0.0DBRU_LINUX.X64_190417]/u01/app/oracle/product/1930/db_1/rdbms/admin/orahome = [/u01/app/oracle/product/1930/db_1]/u01/app/oracle/product/1930/db_1/bin/orabasehome = [/u01/app/oracle/product/1930/db_1]catctlGetOraBaseLogDir = [/u01/app/oracle/product/1930/db_1]Analyzing file /u01/app/oracle/product/1930/db_1/rdbms/admin/catupgrd.sqlLog file directory = [/home/oracle/bkp/labdb03_upgrade/log]catcon::set_log_file_base_path: ALL catcon-related output will be written to [/home/oracle/bkp/labdb03_upgrade/log/catupgrd_catcon_13161.lst]catcon::set_log_file_base_path: catcon: See [/home/oracle/bkp/labdb03_upgrade/log/catupgrd*.log] files for output generated by scriptscatcon::set_log_file_base_path: catcon: See [/home/oracle/bkp/labdb03_upgrade/log/catupgrd_*.lst] files for spool files, if anyNumber of Cpus = 4Database Name = labdb03DataBase Version = 12.2.0.1.0Parallel SQL Process Count = 4Components in [labdb03] Installed [APS CATALOG CATJAVA CATPROC CONTEXT DV JAVAVM OLS ORDIM OWM SDO XDB XML XOQ]Not Installed [APEX EM MGW ODM RAC WK]------------------------------------------------------Phases [0-107] Start Time:[2022_02_09 19:35:04]------------------------------------------------------*********** Executing Change Scripts ***********Serial Phase #:0 [labdb03] Files:1 Time: 52s*************** Catalog Core SQL ***************Serial Phase #:1 [labdb03] Files:5 Time: 29sRestart Phase #:2 [labdb03] Files:1 Time: 4s*********** Catalog Tables and Views ***********Parallel Phase #:3 [labdb03] Files:19 Time: 11sRestart Phase #:4 [labdb03] Files:1 Time: 3s************* Catalog Final Scripts ************Serial Phase #:5 [labdb03] Files:7 Time: 12s***************** Catproc Start ****************Serial Phase #:6 [labdb03] Files:1 Time: 10s***************** Catproc Types ****************Serial Phase #:7 [labdb03] Files:2 Time: 10sRestart Phase #:8 [labdb03] Files:1 Time: 4s**************** Catproc Tables ****************Parallel Phase #:9 [labdb03] Files:67 Time: 19sRestart Phase #:10 [labdb03] Files:1 Time: 4s************* Catproc Package Specs ************Serial Phase #:11 [labdb03] Files:1 Time: 52sRestart Phase #:12 [labdb03] Files:1 Time: 3s************** Catproc Procedures **************Parallel Phase #:13 [labdb03] Files:94 Time: 10sRestart Phase #:14 [labdb03] Files:1 Time: 3sParallel Phase #:15 [labdb03] Files:120 Time: 14sRestart Phase #:16 [labdb03] Files:1 Time: 3sSerial Phase #:17 [labdb03] Files:22 Time: 5sRestart Phase #:18 [labdb03] Files:1 Time: 4s***************** Catproc Views ****************Parallel Phase #:19 [labdb03] Files:32 Time: 12sRestart Phase #:20 [labdb03] Files:1 Time: 4sSerial Phase #:21 [labdb03] Files:3 Time: 9sRestart Phase #:22 [labdb03] Files:1 Time: 4sParallel Phase #:23 [labdb03] Files:25 Time: 79sRestart Phase #:24 [labdb03] Files:1 Time: 3sParallel Phase #:25 [labdb03] Files:12 Time: 48sRestart Phase #:26 [labdb03] Files:1 Time: 3sSerial Phase #:27 [labdb03] Files:1 Time: 0sSerial Phase #:28 [labdb03] Files:3 Time: 4sSerial Phase #:29 [labdb03] Files:1 Time: 0sRestart Phase #:30 [labdb03] Files:1 Time: 3s*************** Catproc CDB Views **************Serial Phase #:31 [labdb03] Files:1 Time: 3sRestart Phase #:32 [labdb03] Files:1 Time: 4sSerial Phase #:34 [labdb03] Files:1 Time: 0s***************** Catproc PLBs *****************Serial Phase #:35 [labdb03] Files:293 Time: 17sSerial Phase #:36 [labdb03] Files:1 Time: 0sRestart Phase #:37 [labdb03] Files:1 Time: 4sSerial Phase #:38 [labdb03] Files:6 Time: 5sRestart Phase #:39 [labdb03] Files:1 Time: 4s*************** Catproc DataPump ***************Serial Phase #:40 [labdb03] Files:3 Time: 34sRestart Phase #:41 [labdb03] Files:1 Time: 4s****************** Catproc SQL *****************Parallel Phase #:42 [labdb03] Files:13 Time: 48sRestart Phase #:43 [labdb03] Files:1 Time: 3sParallel Phase #:44 [labdb03] Files:11 Time: 7sRestart Phase #:45 [labdb03] Files:1 Time: 3sParallel Phase #:46 [labdb03] Files:3 Time: 3sRestart Phase #:47 [labdb03] Files:1 Time: 3s************* Final Catproc scripts ************Serial Phase #:48 [labdb03] Files:1 Time: 7sRestart Phase #:49 [labdb03] Files:1 Time: 4s************** Final RDBMS scripts *************Serial Phase #:50 [labdb03] Files:1 Time: 3s************ Upgrade Component Start ***********Serial Phase #:51 [labdb03] Files:1 Time: 3sRestart Phase #:52 [labdb03] Files:1 Time: 4s********** Upgrading Java and non-Java *********Serial Phase #:53 [labdb03] Files:2 Time: 226s***************** Upgrading XDB ****************Restart Phase #:54 [labdb03] Files:1 Time: 3sSerial Phase #:56 [labdb03] Files:3 Time: 10sSerial Phase #:57 [labdb03] Files:3 Time: 7sParallel Phase #:58 [labdb03] Files:10 Time: 5sParallel Phase #:59 [labdb03] Files:25 Time: 7sSerial Phase #:60 [labdb03] Files:4 Time: 8sSerial Phase #:61 [labdb03] Files:1 Time: 0sSerial Phase #:62 [labdb03] Files:32 Time: 6sSerial Phase #:63 [labdb03] Files:1 Time: 0sParallel Phase #:64 [labdb03] Files:6 Time: 9sSerial Phase #:65 [labdb03] Files:2 Time: 16sSerial Phase #:66 [labdb03] Files:3 Time: 20s**************** Upgrading ORDIM ***************Restart Phase #:67 [labdb03] Files:1 Time: 3sSerial Phase #:69 [labdb03] Files:1 Time: 4sParallel Phase #:70 [labdb03] Files:2 Time: 24sRestart Phase #:71 [labdb03] Files:1 Time: 4sParallel Phase #:72 [labdb03] Files:2 Time: 5sSerial Phase #:73 [labdb03] Files:2 Time: 4s***************** Upgrading SDO ****************Restart Phase #:74 [labdb03] Files:1 Time: 3sSerial Phase #:76 [labdb03] Files:1 Time: 31sSerial Phase #:77 [labdb03] Files:2 Time: 5sRestart Phase #:78 [labdb03] Files:1 Time: 4sSerial Phase #:79 [labdb03] Files:1 Time: 32sRestart Phase #:80 [labdb03] Files:1 Time: 4sParallel Phase #:81 [labdb03] Files:3 Time: 50sRestart Phase #:82 [labdb03] Files:1 Time: 4sSerial Phase #:83 [labdb03] Files:1 Time: 7sRestart Phase #:84 [labdb03] Files:1 Time: 4sSerial Phase #:85 [labdb03] Files:1 Time: 10sRestart Phase #:86 [labdb03] Files:1 Time: 3sParallel Phase #:87 [labdb03] Files:4 Time: 51sRestart Phase #:88 [labdb03] Files:1 Time: 4sSerial Phase #:89 [labdb03] Files:1 Time: 4sRestart Phase #:90 [labdb03] Files:1 Time: 4sSerial Phase #:91 [labdb03] Files:2 Time: 8sRestart Phase #:92 [labdb03] Files:1 Time: 4sSerial Phase #:93 [labdb03] Files:1 Time: 2sRestart Phase #:94 [labdb03] Files:1 Time: 4s******* Upgrading ODM, WK, EXF, RUL, XOQ *******Serial Phase #:95 [labdb03] Files:1 Time: 12sRestart Phase #:96 [labdb03] Files:1 Time: 4s*********** Final Component scripts ***********Serial Phase #:97 [labdb03] Files:1 Time: 3s************* Final Upgrade scripts ************Serial Phase #:98 [labdb03] Files:1 Time: 198s******************* Migration ******************Serial Phase #:99 [labdb03] Files:1 Time: 2s*** End PDB Application Upgrade Pre-Shutdown ***Serial Phase #:100 [labdb03] Files:1 Time: 3sSerial Phase #:101 [labdb03] Files:1 Time: 0sSerial Phase #:102 [labdb03] Files:1 Time: 58s***************** Post Upgrade *****************Serial Phase #:103 [labdb03] Files:1 Time: 32s**************** Summary report ****************Serial Phase #:104 [labdb03] Files:1 Time: 3s*** End PDB Application Upgrade Post-Shutdown **Serial Phase #:105 [labdb03] Files:1 Time: 2sSerial Phase #:106 [labdb03] Files:1 Time: 0sSerial Phase #:107 [labdb03] Files:1 Time: 30s------------------------------------------------------Phases [0-107] End Time:[2022_02_09 20:00:34]------------------------------------------------------Grand Total Time: 1531s LOG FILES: (/home/oracle/bkp/labdb03_upgrade/log/catupgrd*.log)Upgrade Summary Report Located in:/home/oracle/bkp/labdb03_upgrade/log/upg_summary.logGrand Total Upgrade Time: [0d:0h:25m:31s] |
3. Post upgrade Steps
3.1: Review Upgrade Logs: Go to upgrade log location and review log files.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | [oracle@DBsGuruN2 ~]$ cd /home/oracle/bkp/labdb03_upgrade/log[oracle@DBsGuruN2 log]$ ls -lrttotal 71344-rw-------. 1 oracle oinstall 464 Feb 9 19:34 catupgrd_catcon_13161.lst-rw-r--r--. 1 oracle oinstall 0 Feb 9 19:55 catupgrd_datapatch_upgrade.err-rw-r--r--. 1 oracle oinstall 1307 Feb 9 19:58 catupgrd_datapatch_upgrade.log-rw-------. 1 oracle oinstall 7802138 Feb 9 20:00 catupgrd1.log-rw-------. 1 oracle oinstall 5728207 Feb 9 20:00 catupgrd2.log-rw-------. 1 oracle oinstall 8599735 Feb 9 20:00 catupgrd3.log-rw-r--r--. 1 oracle oinstall 37956 Feb 9 20:00 catupgrd_stderr.log-rw-r--r--. 1 oracle oinstall 1732 Feb 9 20:00 upg_summary.log-rw-------. 1 oracle oinstall 50854214 Feb 9 20:00 catupgrd0.log[oracle@DBsGuruN2 log]$ cat upg_summary.logOracle Database Release 19 Post-Upgrade Status Tool 02-09-2022 20:00:0Database Name: LABDB03Component Current Full Elapsed TimeName Status Version HH:MM:SSOracle Server UPGRADED 19.3.0.0.0 00:09:30JServer JAVA Virtual Machine UPGRADED 19.3.0.0.0 00:01:27Oracle XDK UPGRADED 19.3.0.0.0 00:00:31Oracle Database Java Packages UPGRADED 19.3.0.0.0 00:00:07OLAP Analytic Workspace UPGRADED 19.3.0.0.0 00:00:13Oracle Label Security UPGRADED 19.3.0.0.0 00:00:07Oracle Database Vault UPGRADED 19.3.0.0.0 00:00:16Oracle Text UPGRADED 19.3.0.0.0 00:00:30Oracle Workspace Manager UPGRADED 19.3.0.0.0 00:00:28Oracle Real Application Clusters UPGRADED 19.3.0.0.0 00:00:00Oracle XML Database UPGRADED 19.3.0.0.0 00:01:23Oracle Multimedia UPGRADED 19.3.0.0.0 00:00:36Spatial UPGRADED 19.3.0.0.0 00:03:40Oracle OLAP API UPGRADED 19.3.0.0.0 00:00:09Datapatch 00:03:08Final Actions 00:03:20Post Upgrade 00:00:27Total Upgrade Time: 00:23:41Database time zone version is 26. It is older than current release timezone version 32. Time zone upgrade is needed using the DBMS_DST package.Grand Total Upgrade Time: [0d:0h:25m:31s][oracle@DBsGuruN2 log]$ |
NOTE: If don’t pass the parameter for log location in dbupgrade command then below is the default location for the upgrade log.
$ORACLE_HOME/cfgtoollogs/<DB NAME>/upgrade/
3.2: Update Oratab: Update new ORACLE_HOME for 19c in the file /etc/oratab.
1 2 3 4 5 | [oracle@DBsGuruN2 ~]$ vi /etc/oratablabdb03:/u01/app/oracle/product/1930/db_1:N:wq[oracle@DBsGuruN2 ~]$ cat /etc/oratab | grep -i labdb03labdb03:/u01/app/oracle/product/1930/db_1:N |
3.3: Start the Database: Set the environment and start the database.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | [oracle@DBsGuruN2 ~]$ . oraenvORACLE_SID = [labdb01] ? labdb03The Oracle base remains unchanged with value /u01/app/oracle[oracle@DBsGuruN2 ~]$ sqlplus / as sysdbaSQL*Plus: Release 19.0.0.0.0 - Production on Thu Feb 10 19:29:57 2022Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle. All rights reserved.Connected to an idle instance.SQL> startupORACLE instance started.Total System Global Area 1241513488 bytesFixed Size 8896016 bytesVariable Size 520093696 bytesDatabase Buffers 704643072 bytesRedo Buffers 7880704 bytesDatabase mounted.Database opened.SQL> SELECT NAME,OPEN_MODE,STATUS,VERSION FROM V$DATABASE, V$INSTANCE;NAME OPEN_MODE STATUS VERSION--------- -------------------- ------------ -----------------LABDB03 READ WRITE OPEN 19.0.0.0.0 |
3.4: Execute utlrp.sql and validate Objects Status: Execute utlrp.sql and validate invalid objects in the database, should not be any invalid objects after the upgrade. After completion of the script must review logs and validate the object’s status in DB.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | [oracle@DBsGuruN2 ~]$ . oraenvORACLE_SID = [labdb01] ? labdb03The Oracle base remains unchanged with value /u01/app/oracle[oracle@DBsGuruN2 ~]$ cd $ORACLE_HOME/rdbms/admin/[oracle@DBsGuruN2 admin]$ $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b utlrp -d '''.''' utlrp.sqlcatcon::set_log_file_base_path: ALL catcon-related output will be written to [/u01/app/oracle/product/1930/db_1/rdbms/admin/utlrp_catcon_5328.lst]catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/1930/db_1/rdbms/admin/utlrp*.log] files for output generated by scriptscatcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/1930/db_1/rdbms/admin/utlrp_*.lst] files for spool files, if anycatcon.pl: completed successfully[oracle@DBsGuruN2 admin]$ ls -lrt /u01/app/oracle/product/1930/db_1/rdbms/admin/utlrp*.log-rw-------. 1 oracle oinstall 10268 Feb 10 19:39 /u01/app/oracle/product/1930/db_1/rdbms/admin/utlrp0.log[oracle@DBsGuruN2 admin]$ cat /u01/app/oracle/product/1930/db_1/rdbms/admin/utlrp0.logSQL*Plus: Release 19.0.0.0.0 - Production on Thu Feb 10 19:39:34 2022Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle. All rights reserved.SQL> Connected.SQL> 2Session altered.SQL> 2Session altered.SQL>ALTER SYSTEM KILL SESSION '394,48893' force timeout 0 -- process 5379/------------Output Trimmed------------SQL> Rem ===========================================================================SQL> Rem END utlrp.sqlSQL> Rem ===========================================================================SQL>END_RUNNING--------------------------------------------------------------------------------==== @./utlrp.sql Container:labdb03 Id:0 22-02-10 07:41:52 Proc:0 ====SQL>END_RUNNING--------------------------------------------------------------------------------==== @./utlrp.sql Container:labdb03 Id:0 22-02-10 07:41:52 Proc:0 ====SQL> SQL>SQL> ========== PROCESS ENDED ==========SQL> ========== Process Terminated by catcon ==========SQL> Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - ProductionVersion 19.3.0.0.0[oracle@DBsGuruN2 admin]$SQL> select owner, count(*) from dba_objects where status <> 'VALID' group by owner;no rows selected |
3.5: Execute postupgrade_fixups.sql: Execute postupgrade_fixups.sql which was generated in step 1.1.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | [oracle@DBsGuruN2 admin]$ $ORACLE_HOME/perl/bin/perl -I$ORACLE_HOME/perl/lib -I$ORACLE_HOME/rdbms/admin $ORACLE_HOME/rdbms/admin/catcon.pl -l /home/oracle/bkp/labdb03_upgrade/ -b labdb04_postfix /home/oracle/bkp/labdb03_upgrade/postupgrade_fixups.sqlcatcon::set_log_file_base_path: ALL catcon-related output will be written to [/home/oracle/bkp/labdb03_upgrade/labdb04_postfix_catcon_6355.lst]catcon::set_log_file_base_path: catcon: See [/home/oracle/bkp/labdb03_upgrade/labdb04_postfix*.log] files for output generated by scriptscatcon::set_log_file_base_path: catcon: See [/home/oracle/bkp/labdb03_upgrade/labdb04_postfix_*.lst] files for spool files, if anycatcon.pl: completed successfully[oracle@DBsGuruN2 admin]$[oracle@DBsGuruN2 admin]$ ls -lrt /home/oracle/bkp/labdb03_upgrade/labdb04_postfix*.log-rw-------. 1 oracle oinstall 1340 Feb 10 19:53 /home/oracle/bkp/labdb03_upgrade/labdb04_postfix0.log[oracle@DBsGuruN2 admin]$ cat /home/oracle/bkp/labdb03_upgrade/labdb04_postfix0.logSQL*Plus: Release 19.0.0.0.0 - Production on Thu Feb 10 19:53:43 2022Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle. All rights reserved.SQL> Connected.SQL> 2Session altered.SQL> 2Session altered.SQL>ALTER SYSTEM KILL SESSION '394,49534' force timeout 0 -- process 6420/SQL> SQL>SQL> 2Session altered.SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> 2CATCONSECTION--------------------------==== CATCON EXEC ROOT ====SQL>BEGIN_RUNNING--------------------------------------------------------------------------------==== @/home/oracle/bkp/labdb03_upgrade/postupgrade_fixups.sql Container:labdb03Id:0 22-02-10 07:53:43 Proc:0 ====SQL>BEGIN_RUNNING--------------------------------------------------------------------------------==== @/home/oracle/bkp/labdb03_upgrade/postupgrade_fixups.sql Container:labdb03Id:0 22-02-10 07:53:43 Proc:0 ====SQL> 2Session altered.SQL> 2Session altered.SQL>Session altered.PL/SQL procedure successfully completed.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 ScriptAuto-Generated by: Oracle Preupgrade Script Version: 19.0.0.0.0 Build: 1Generated on: 2022-02-08 18:02:01For Source Database: LABDB03Source Database Version: 12.2.0.1.0For Upgrade to Version: 19.0.0.0.0Preup PreupgradeAction Issue IsNumber 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 thathave not been remedied and are still present in the database.Depending on the severity of the specific issue, and the nature ofthe issue itself, that could mean that your database upgrade is notfully complete. To resolve the outstanding issues, start by reviewingthe postupgrade_fixups.sql and searching it for the name ofthe failed CHECK NAME or Preupgrade Action Number listed above.There you will find the original corresponding diagnostic messagefrom the preupgrade which explains in more detail what still needsto be done.PL/SQL procedure successfully completed.Session altered.SQL>END_RUNNING--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------==== @/home/oracle/bkp/labdb03_upgrade/postupgrade_fixups.sql Container:labdb03 Id:0 22-02-10 07:55:15 Proc:0 ====SQL>END_RUNNING--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------==== @/home/oracle/bkp/labdb03_upgrade/postupgrade_fixups.sql Container:labdb03 Id:0 22-02-10 07:55:15 Proc:0 ====SQL> SQL>SQL> ========== PROCESS ENDED ==========SQL> ========== Process Terminated by catcon ==========SQL> Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - ProductionVersion 19.3.0.0.0 |
3.6: Post upgrade validation tool: Execute utlusts.sql to validate upgrade status and review the log file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | SQL> @$ORACLE_HOME/rdbms/admin/utlusts.sqlEnter value for 1:Oracle Database Release 19 Post-Upgrade Status Tool 02-10-2022 19:59:1Database Name: LABDB03Component Current Full Elapsed TimeName Status Version HH:MM:SSOracle Server VALID 19.3.0.0.0 00:09:30JServer JAVA Virtual Machine VALID 19.3.0.0.0 00:01:27Oracle XDK VALID 19.3.0.0.0 00:00:31Oracle Database Java Packages VALID 19.3.0.0.0 00:00:07OLAP Analytic Workspace VALID 19.3.0.0.0 00:00:13Oracle Label Security VALID 19.3.0.0.0 00:00:07Oracle Database Vault VALID 19.3.0.0.0 00:00:16Oracle Text VALID 19.3.0.0.0 00:00:30Oracle Workspace Manager VALID 19.3.0.0.0 00:00:28Oracle Real Application Clusters OPTION OFF 19.3.0.0.0 00:00:00Oracle XML Database VALID 19.3.0.0.0 00:01:23Oracle Multimedia VALID 19.3.0.0.0 00:00:36Spatial VALID 19.3.0.0.0 00:03:40Oracle OLAP API VALID 19.3.0.0.0 00:00:09Datapatch 00:03:08Final Actions 00:03:20Post Upgrade 00:00:27Post Compile 00:02:09Total Upgrade Time: 00:25:50Database time zone version is 26. It is older than current release timezone version 32. Time zone upgrade is needed using the DBMS_DST package. |
3.7: Upgrade Timezone: Require to upgrade DB timezone file version to 32. Prior to the upgrade, it was 26, refer to the post-upgrade tool log.
Execute utltz_upg_check.sql to validate the current RDBMS DST version and the newest RDBMS DST version.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | SQL> @$ORACLE_HOME/rdbms/admin/utltz_upg_check.sqlINFO: 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: 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 willINFO: restart the database 2 times WITHOUT any confirmation or prompt.Session altered. |
Execute utltz_upg_apply.sql to upgrade DST version to 32.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | SQL> @$ORACLE_HOME/rdbms/admin/utltz_upg_apply.sqlSession altered.INFO: If an ERROR occurs, the script will EXIT SQL*Plus.INFO: The database RDBMS DST version will be updated to DSTv32 .WARNING: This script will restart the database 2 timesWARNING: 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 1241513488 bytesFixed Size 8896016 bytesVariable Size 687865856 bytesDatabase Buffers 536870912 bytesRedo Buffers 7880704 bytesDatabase 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 1241513488 bytesFixed Size 8896016 bytesVariable Size 687865856 bytesDatabase Buffers 536870912 bytesRedo Buffers 7880704 bytesDatabase 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_L"Number of failures: 0Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_S"Number of failures: 0Table list: "MDSYS"."SDO_DIAG_MESSAGES_TABLE"Number of failures: 0Table list: "DVSYS"."AUDIT_TRAIL$"Number of failures: 0Table list: "DVSYS"."SIMULATION_LOG$"Number of failures: 0INFO: 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> COL PROPERTY_NAME FOR A25SQL> COL PROPERTY_VALUE FOR A21SQL> Select version from v$timezone_file; VERSION---------- 321 row selected. |
Optionally execute again post-upgrade status tool.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | SQL> @$ORACLE_HOME/rdbms/admin/utlusts.sqlEnter value for 1:Oracle Database Release 19 Post-Upgrade Status Tool 02-10-2022 20:09:2Database Name: LABDB03Component Current Full Elapsed TimeName Status Version HH:MM:SSOracle Server VALID 19.3.0.0.0 00:09:30JServer JAVA Virtual Machine VALID 19.3.0.0.0 00:01:27Oracle XDK VALID 19.3.0.0.0 00:00:31Oracle Database Java Packages VALID 19.3.0.0.0 00:00:07OLAP Analytic Workspace VALID 19.3.0.0.0 00:00:13Oracle Label Security VALID 19.3.0.0.0 00:00:07Oracle Database Vault VALID 19.3.0.0.0 00:00:16Oracle Text VALID 19.3.0.0.0 00:00:30Oracle Workspace Manager VALID 19.3.0.0.0 00:00:28Oracle Real Application Clusters OPTION OFF 19.3.0.0.0 00:00:00Oracle XML Database VALID 19.3.0.0.0 00:01:23Oracle Multimedia VALID 19.3.0.0.0 00:00:36Spatial VALID 19.3.0.0.0 00:03:40Oracle OLAP API VALID 19.3.0.0.0 00:00:09Datapatch 00:03:08Final Actions 00:03:20Post Upgrade 00:00:27Post Compile 00:02:09Total Upgrade Time: 00:25:50Database time zone version is 32. It meets current release needs. |
3.8: Set the parameter Compatible: Change the COMPATIBLE parameter value to 19.0.0 to enable to use of all features of the upgraded version. This step is a very crucial step in terms of downgrading the database to the previous version or restoring guaranteed restore point. Make sure before the set a new value of COMPATIBLE parameter no major impact to DB in terms of performance, if possible test application for few days with an existing value of this parameter especially for the lower environment (DEV/TEST/UAT) upgrades so you have enough confidence to change it when you perform PROD databases upgrade.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | SQL> show parameter COMPATIBLE parameter;NAME TYPE VALUE------------------------------------ ----------- ------------------------------compatible string 12.2.0SQL> alter system set compatible='19.0.0' scope=spfile;System altered.SQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL> startupORACLE instance started.Total System Global Area 1241513488 bytesFixed Size 8896016 bytesVariable Size 687865856 bytesDatabase Buffers 536870912 bytesRedo Buffers 7880704 bytesDatabase mounted.Database opened.SQL> show parameter COMPATIBLE parameter;NAME TYPE VALUE------------------------------------ ----------- ------------------------------compatible string 19.0.0 |
3.9: Drop Guaranteed Restore Point: Drop restore point only after successful validation along with green signal by dependent applications/checkout.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | SQL> COL NAME FOR A25SQL> COL GUARANTEE_FLASHBACK_DATABASE FOR A31SQL> select NAME,GUARANTEE_FLASHBACK_DATABASE,TIME from V$restore_point;NAME GUARANTEE_FLASHBACK_DATABASE TIME------------------------- ------------------------------- ---------------------------------------------------------------------------PRE_UPGRADE_LABDB03 YES 08-FEB-22 06.37.46.000000000 PMSQL> drop restore point PRE_UPGRADE_LABDB03;Restore point dropped.SQL> select NAME,GUARANTEE_FLASHBACK_DATABASE,TIME from V$restore_point;no rows selected |
3.10: RAC DB Action: Follow the below steps for the RAC database only.
3.10.1: Set cluster_database to TRUE.
1 2 3 4 5 6 7 8 | SQL> alter system set cluster_database=TRUE scope=spfile;System altered.SQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.[oracle@DBsGuruN2 admin]$ srvctl start database -db <DB NAME> |
3.10.2: Upgrade the Oracle Clusterware keys for the database.
1 | [oracle@DBsGuruN2 admin]$ srvctl upgrade database -db <DB NAME> -o <ORACLE_HOME> |
3.11: Listener Status: Validate the services for the database.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | [oracle@DBsGuruN2 admin]$ lsnrctl status LISTENER_19CLSNRCTL for Linux: Version 19.0.0.0.0 - Production on 10-FEB-2022 20:37:33Copyright (c) 1991, 2019, Oracle. All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DBsGuruN2.labdomain)(PORT=1521)))STATUS of the LISTENER------------------------Alias LISTENER_19CVersion TNSLSNR for Linux: Version 19.0.0.0.0 - ProductionStart Date 10-FEB-2022 20:35:26Uptime 0 days 0 hr. 2 min. 7 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File /u01/app/oracle/product/1930/db_1/network/admin/listener.oraListener Log File /u01/app/oracle/diag/tnslsnr/DBsGuruN2/listener_19c/alert/log.xmlListening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DBsGuruN2.labdomain)(PORT=1521)))Services Summary...Service "labdb03" has 1 instance(s). Instance "labdb03", status READY, has 1 handler(s) for this service...Service "labdb03XDB" has 1 instance(s). Instance "labdb03", status READY, has 1 handler(s) for this service...The command completed successfully |
3.12: Others:
3.12.1: Enable cronjobs/scheduler jobs/Triggers if any.
3.12.2: Delete blackout database in OEM. Click here to get steps for Target Blackouts in OEM 13c.
3.12.3: Start all dependent applications.
This document is only for learning purpose and always validate in the LAB environment first before applying in the LIVE environment.
Hope so you like this article!
Please share your valuable feedback/comments/subscribe and follow us below and don’t forget to click on the bell icon to get the most recent update. Click here to understand more about our pursuit.
Related Articles
- Step by Step Manual Upgrade Container (CDB-PDB) Database from 12c to 19c in Multitenant Architecture
- Steps to Upgrade Grid Infra – Standalone (GI) and Oracle Database from 12.2 to 19.14
- Steps to Apply Database and Grid Infrastructure RU Patch Before Grid Infrastructure Configuration (before root.sh or rootupgrade.sh execution)
- Step by Step Upgrade Oracle Database from 12c to 19c using DBUA
- Step by Step Manual Upgrade Oracle Database from 12c to 19c
3587 Total Views , 34 Views Today





