You are on page 1of 18

Steps to upgrade RAC database to 12.2 and migration.

Document Change Log


Revision Date Author Description of change

1.0 2018-02-05 Joshua Ehiguese Document Creation.

Step 1  Check cluster and database status.

Check cluster.
{noden1:+ASM1} $ olsnodes -t -s
noden1 Active Unpinned
noden2 Active Unpinned
{noden1:+ASM1} $ crsctl check cluster -all
**************************************************************
noden1:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
noden2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
{noden1:+ASM1} $ crsctl status res -t | grep -i off
OFFLINE OFFLINE noden1 STABLE
OFFLINE OFFLINE noden2 STABLE
{noden1:+ASM1} $ crsctl status res -t | grep -i int
{noden1:+ASM1} $ crsctl status res -t | grep -i unk
{noden1:+ASM1} $ crsctl status res -t | grep -i off
Step 1  Confirm or take backups
Cluster backup.
{noden1:+ASM1} $ ocrconfig -showbackup

noden2 2018/02/05 09:26:14


+OCR_VOTE:/node/OCRBACKUP/backup00.ocr.284.967281971 0

noden2 2018/02/05 05:26:09


+OCR_VOTE:/node/OCRBACKUP/backup01.ocr.291.967267565 0

noden2 2018/02/05 01:26:04


+OCR_VOTE:/node/OCRBACKUP/backup02.ocr.288.967253159 0

noden2 2018/02/04 01:25:33


+OCR_VOTE:/node/OCRBACKUP/day.ocr.285.967166735 0

noden2 2018/01/24 01:20:26


+OCR_VOTE:/node/OCRBACKUP/week.ocr.290.966216027 0

noden2 2018/01/17 13:04:08


+OCR_VOTE:/node/OCRBACKUP/backup_20180117_130408.ocr.278.965653449 0
{noden1:+ASM1} $

Database backup.

RMAN> configure maxsetsize clear;

old RMAN configuration parameters:


CONFIGURE MAXSETSIZE TO 35 G;
RMAN configuration parameters are successfully reset to default value

RMAN> show all;

RMAN configuration parameters for database with db_unique_name DB1M are:


CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 60 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT1945APE' TO
'%F';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO
'/u01/backup/db1m/%F';
CONFIGURE DEVICE TYPE 'SBT1945APE' PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO COMPRESSED
BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE 'SBT1945APE' TO 1;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE 'SBT1945APE' TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT1945APE' PARMS 'ENV=(NB_ORA_POLICY=ORA-
zoro-nice-policy, NB_ORA_CLIENT=noden2-ebs, NB_ORA_SCHED=Oracle-Backup)';
CONFIGURE CHANNEL DEVICE TYPE DISK RATE 3 G FORMAT
'/u01/backup/db1m/%d_rman_%U.bus';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF;
CONFIGURE ENCRYPTION ALGORITHM 'AES128';
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR
LOAD TRUE;
CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS;
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO DISK;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+ERECOVERY/DB1M/RMAN-BACKUP/CONTROL-
FILE/snapcf_db1m2.f';

RMAN> backup incremental level 0 database plus archivelog delete input TAG
before_upgrade;

RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file
name=+ERECOVERY/DB1M/ARCHIVELOG/2018_02_05/thread_1_seq_1086.333.967297709
thread=1 sequence=1086
channel ORA_DISK_2: throttle time: 0:00:01
Finished backup at 05-FEB-18

Starting Control File and SPFILE Autobackup at 05-FEB-18


piece handle=/u01/backup/db1m/c-1693427581-20180205-00 comment=NONE
Finished Control File and SPFILE Autobackup at 05-FEB-18

RMAN>
RMAN>
RMAN>
RMAN>
RMAN>
RMAN>
RMAN>

Note: remove from oem and add aback after upgrade and migration

Check current settings.


{noden2:db1m2} $ srvctl config database -d db1m
Database unique name: db1m
Database name:
Oracle home: /u01/oracle/product/12.1.0.2_home
Oracle user: oracle
Spfile: +EDATA/DB1M/spfiledb1m.ora
Password file: +EDATA/DB1M/PASSWORD/pwddb1m.299.905605135
Domain: domain.ca
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: EDATA,ERECOVERY
Mount point paths:
Services: db1m_s,db1m_s1,db1m_s2
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: oper
Database instances: db1m1,db1m2
Configured nodes: noden1,noden2
Database is administrator managed
{noden2:db1m2} $ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Mon Feb 5 14:00:06 2018

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

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage
Management, OLAP,
Advanced Analytics and Real Application Testing options

SQL> select instance_name,status from gv$instance;

INSTANCE_NAME STATUS
---------------- ------------
db1m2 OPEN
db1m1 OPEN

SQL> SELECT * FROM DBA_OUTSTANDING_ALERTS;

no rows selected

SQL> select name from v$datafile;

NAME
----------------------------------------------------------------------------
----
+EDATA/DB1M/DATAFILE/system.266.905603359
+EDATA/DB1M/DATAFILE/zoro_data.258.905603357
+EDATA/DB1M/DATAFILE/sysaux.257.905603357
+EDATA/DB1M/DATAFILE/undotbs1.267.905603359
+EDATA/DB1M/DATAFILE/undotbs2.260.905603357
+EDATA/DB1M/DATAFILE/users.262.905603381
+EDATA/DB1M/DATAFILE/zoro_index.259.905603357
+EDATA/DB1M/DATAFILE/zoro_nolog_data.261.905603359
+EDATA/DB1M/DATAFILE/zoro_nolog_index.263.905603359
+EDATA/DB1M/DATAFILE/zoro_data.802.908882207
+EDATA/DB1M/DATAFILE/zoro_index.804.908882215

NAME
----------------------------------------------------------------------------
----
+EDATA/DB1M/DATAFILE/zoro_nolog_data.838.908882221
+EDATA/DB1M/DATAFILE/zoro_nolog_index.839.908882227
+EDATA/DB1M/DATAFILE/kikizoro_productv1945.849.911460113
+EDATA/DB1M/DATAFILE/kikizoro_productv19452.848.911460113
+EDATA/DB1M/DATAFILE/kikizoro_productv19453.847.911460115
+EDATA/DB1M/DATAFILE/kikizoro_productv19454.846.911460115
+EDATA/DB1M/DATAFILE/kikizoro_productv19455.845.911460117
+EDATA/DB1M/DATAFILE/kikizoro_productv19456.854.911460117
+EDATA/DB1M/DATAFILE/kikizoro_productv19457.856.911460117
+EDATA/DB1M/DATAFILE/kikizoro_productv19458.853.911460119
+EDATA/DB1M/DATAFILE/kikizoro_productv19459.855.911460119

NAME
----------------------------------------------------------------------------
----
+EDATA/DB1M/DATAFILE/kikizoro_productv19450.844.911460121
+EDATA/DB1M/DATAFILE/lolopcases1945.841.911460139
+EDATA/DB1M/DATAFILE/lolopcases19452.857.911460139
+EDATA/DB1M/DATAFILE/lolopcases19453.858.911460141
+EDATA/DB1M/DATAFILE/lolopcases19454.842.911460141
+EDATA/DB1M/DATAFILE/lolopcases19455.843.911460141
+EDATA/DB1M/DATAFILE/lolopcases19456.859.911460143
+EDATA/DB1M/DATAFILE/lolopcases19457.860.911460143
+EDATA/DB1M/DATAFILE/lolopcases19458.852.911460145
+EDATA/DB1M/DATAFILE/lolopcases19459.862.911460145
+EDATA/DB1M/DATAFILE/lolopcases19450.851.911460145

NAME
----------------------------------------------------------------------------
----
+EDATA/DB1M/DATAFILE/lolopcoll_ninja1945.861.911460147
+EDATA/DB1M/DATAFILE/lolopcoll_ninja19452.863.911460147
+EDATA/DB1M/DATAFILE/lolopcoll_ninja19453.800.911460147
+EDATA/DB1M/DATAFILE/lolopcoll_ninja19454.840.911460149
+EDATA/DB1M/DATAFILE/lolopcoll_ninja19455.887.911460149
+EDATA/DB1M/DATAFILE/lolopcoll_ninja19456.888.911460151
+EDATA/DB1M/DATAFILE/lolopcoll_ninja19457.889.911460151
+EDATA/DB1M/DATAFILE/lolopcoll_ninja19458.890.911460153
+EDATA/DB1M/DATAFILE/lolopcoll_ninja19459.891.911460153
+EDATA/DB1M/DATAFILE/lolopcoll_ninja19450.892.911460153
+EDATA/DB1M/DATAFILE/lolopcu_ninja1945.893.911460155

NAME
----------------------------------------------------------------------------
----
+EDATA/DB1M/DATAFILE/lolopcu_ninja19452.894.911460155
+EDATA/DB1M/DATAFILE/lolopcu_ninja19453.895.911460157
+EDATA/DB1M/DATAFILE/lolopcu_ninja19454.896.911460157
+EDATA/DB1M/DATAFILE/lolopcu_ninja19455.897.911460157
+EDATA/DB1M/DATAFILE/lolopcu_ninja19456.898.911460159
+EDATA/DB1M/DATAFILE/lolopcu_ninja19457.899.911460159
+EDATA/DB1M/DATAFILE/lolopcu_ninja19458.900.911460159
+EDATA/DB1M/DATAFILE/lolopcu_ninja19459.901.911460161
+EDATA/DB1M/DATAFILE/lolopcu_ninja19450.902.911460161
+EDATA/DB1M/DATAFILE/lolopcu_dwell_geo_lvls_rpt1945.903.911460163
+EDATA/DB1M/DATAFILE/lolopcu_dwell_geo_lvls_rpt19452.904.911460163

NAME
----------------------------------------------------------------------------
----
+EDATA/DB1M/DATAFILE/lolopcu_dwell_geo_lvls_rpt19453.905.911460165
+EDATA/DB1M/DATAFILE/lolopcu_dwell_geo_lvls_rpt19454.906.911460165
+EDATA/DB1M/DATAFILE/lolopcu_dwell_geo_lvls_rpt19455.907.911460167
+EDATA/DB1M/DATAFILE/lolopcu_dwell_geo_lvls_rpt19456.908.911460167
+EDATA/DB1M/DATAFILE/lolopcu_dwell_geo_lvls_rpt19457.909.911460169
+EDATA/DB1M/DATAFILE/lolopcu_dwell_geo_lvls_rpt19458.910.911460169
+EDATA/DB1M/DATAFILE/lolopcu_dwell_geo_lvls_rpt19459.911.911460171
+EDATA/DB1M/DATAFILE/lolopcu_dwell_geo_lvls_rpt19450.912.911460171
+EDATA/DB1M/DATAFILE/lolopcu1945olerance_summary1945.913.911460171
+EDATA/DB1M/DATAFILE/lolopcu1945olerance_summary19452.914.911460173
+EDATA/DB1M/DATAFILE/lolopcu1945olerance_summary19453.915.911460173

NAME
----------------------------------------------------------------------------
----
+EDATA/DB1M/DATAFILE/lolopcu1945olerance_summary19454.916.911460175
+EDATA/DB1M/DATAFILE/lolopcu1945olerance_summary19455.917.911460175
+EDATA/DB1M/DATAFILE/lolopcu1945olerance_summary19456.918.911460177
+EDATA/DB1M/DATAFILE/lolopcu1945olerance_summary19457.919.911460177
+EDATA/DB1M/DATAFILE/lolopcu1945olerance_summary19458.920.911460177
+EDATA/DB1M/DATAFILE/lolopcu1945olerance_summary19459.921.911460179
+EDATA/DB1M/DATAFILE/lolopcu1945olerance_summary19450.922.911460179
+EDATA/DB1M/DATAFILE/lolopnrfu_cu_status1945.923.911460181
+EDATA/DB1M/DATAFILE/lolopnrfu_cu_status19452.924.911460181
+EDATA/DB1M/DATAFILE/lolopnrfu_cu_status19453.925.911460183
+EDATA/DB1M/DATAFILE/lolopnrfu_cu_status19454.926.911460183

NAME
----------------------------------------------------------------------------
----
+EDATA/DB1M/DATAFILE/lolopnrfu_cu_status19455.927.911460185
+EDATA/DB1M/DATAFILE/lolopnrfu_cu_status19456.928.911460185
+EDATA/DB1M/DATAFILE/lolopnrfu_cu_status19457.929.911460185
+EDATA/DB1M/DATAFILE/lolopnrfu_cu_status19458.930.911460187
+EDATA/DB1M/DATAFILE/lolopnrfu_cu_status19459.931.911460187
+EDATA/DB1M/DATAFILE/lolopnrfu_cu_status19450.932.911460187
+EDATA/DB1M/DATAFILE/jackfile1945.933.911460189
+EDATA/DB1M/DATAFILE/jackfile19452.934.911460189
+EDATA/DB1M/DATAFILE/jackfile19453.935.911460191
+EDATA/DB1M/DATAFILE/jackfile19454.936.911460191
+EDATA/DB1M/DATAFILE/jackfile19455.937.911460191

NAME
----------------------------------------------------------------------------
----
+EDATA/DB1M/DATAFILE/jackfile19456.938.911460193
+EDATA/DB1M/DATAFILE/jackfile19457.939.911460193
+EDATA/DB1M/DATAFILE/jackfile19458.940.911460193
+EDATA/DB1M/DATAFILE/jackfile19459.941.911460195
+EDATA/DB1M/DATAFILE/jackfile19450.942.911460195
+EDATA/DB1M/DATAFILE/jackfile.1014.911461933
+EDATA/DB1M/DATAFILE/jackfile.1015.911462011

95 rows selected.
Review character set and database archive log settings

SQL> select instance_name,status from gv$instance;

INSTANCE_NAME STATUS
---------------- ------------
db1m2 OPEN
db1m1 OPEN

SQL> COLUMN value FORMAT A30


SQL> SELECT * FROM nls_database_parameters WHERE parameter =
'NLS_CHARACTERSET';

PARAMETER
----------------------------------------------------------------------------
----
VALUE
------------------------------
NLS_CHARACTERSET
WE8MSWIN1252

Note: put back in no Archivelog Mode after upgrade


SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 483
Next log sequence to archive 484
Current log sequence 484
SQL> show parameter recovery;

NAME TYPE
------------------------------------ --------------------------------
VALUE
------------------------------
db_recovery_file_dest string
+ERECOVERY
db_recovery_file_dest_size big integer
95G
recovery_parallelism integer
0
SQL> show parameter sessions;

NAME TYPE
------------------------------------ --------------------------------
VALUE
------------------------------
java_max_sessionspace_size integer
0
java_soft_sessionspace_limit integer
0
license_max_sessions integer
0
license_sessions_warning integer
0
sessions integer

NAME TYPE
------------------------------------ --------------------------------
VALUE
------------------------------
472
shared_server_sessions integer

SQL> show parameter process;

NAME TYPE
------------------------------------ --------------------------------
VALUE
------------------------------
aq1945m_processes integer
1
cell_offload_processing boolean
TRUE
db_writer_processes integer
1
gcs_server_processes integer
2
global1945xn_processes integer

NAME TYPE
------------------------------------ --------------------------------
VALUE
------------------------------
1
job_queue_processes integer
1000
log_archive_max_processes integer
4
processes integer
300
processor_group_name string

SQL> show parameter db_files;

NAME TYPE
------------------------------------ --------------------------------
VALUE
------------------------------
db_files integer
200
SQL>
Note: As db1m is using NLS_CHARACTERSET= WE8MSWIN1252 confirm the character set of
the target cdb.

{noden1:db1m} $ export ORACLE_SID=db1m1


{noden1:db1m1} $ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Mon Feb 5 14:04:05 2018

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

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management,
Advanced Analytics and Real Application Testing options

SQL> select instance_name,status from gv$instance;

INSTANCE_NAME STATUS
---------------- ------------
db1m1 OPEN
db1m2 OPEN

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Produ
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
{noden1:db1m1} $ . oraenv
ORACLE_SID = [db1m1] ? q20cdbm
The Oracle base remains unchanged with value /u01/oracle
{noden1:q20cdbm} $ export ORACLE_SID=q20cdbm1
{noden1:q20cdbm1} $ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Mon Feb 5 14:05:46 2018

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

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

SQL> select instance_name,status from gv$instance;

INSTANCE_NAME STATUS
---------------- ------------
q20cdbm1 OPEN
q20cdbm2 OPEN

SQL> COLUMN parameter FORMAT A30


SQL> COLUMN value FORMAT A30
SQL> SELECT *
FROM nls_database_parameters
WHERE parameter = 'NLS_CHARACTERSET'; 2 3

PARAMETER VALUE
------------------------------ ------------------------------
NLS_CHARACTERSET AL32UTF8

SQL>

Note: A staging cdb with NLS_CHARACTERSET= WE8MSWIN1252 is needed. E.g. cdbwe8


on q20 cluster.

Step 2 Run the pre-upgrade information tool.


/ /u01/oracle/product/12.1.0.2_home/jdk/bin/java -jar
/u01/oracle/product/12.2.0.1_home/rdbms/admin/preupgrade.jar FILE TEXT DIR
/home/oracle/joshua/db1m
{noden1:db1m} $ . oraenv
ORACLE_SID = [db1m] ?
The Oracle base remains unchanged with value /u01/oracle
{noden1:db1m} $ export ORACLE_SID=db1m1
{noden1:db1m1} $ /u01/oracle/product/12.1.0.2_home/jdk/bin/java -jar
/u01/oracle/product/12.2.0.1_home/rdbms/admin/preupgrade.jar FILE TEXT DIR
/home/oracle/joshua/db1m
Preupgrade generated files:
/u01/home/oracle/joshua/db1m/preupgrade.log
/u01/home/oracle/joshua/db1m/preupgrade_fixups.sql
/u01/home/oracle/joshua/db1m/postupgrade_fixups.sql
{noden1:db1m1} $

Review the log.


{noden1:db1g1} $ pwd
/u01/home/oracle/joshua/db1g
{noden1:db1g1} $ vi preupgrade.log

Report generated by Oracle Database Pre-Upgrade Information Tool Version


12.2.0.1.0

Upgrade-To version: 12.2.0.1.0

=======================================
Status of the database prior to upgrade
=======================================

Database Name: DB1M


Container Name: DB1M
Container ID: 0
Version: 12.1.0.2.0
Compatible: 12.1.0.2.0
Blocksize: 8192
Platform: Linux x86 64-bit
Timezone File: 18
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] VALID
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 Application Express [to be upgraded] VALID
Oracle OLAP API [to be upgraded] VALID

==============
BEFORE UPGRADE
==============

Run <preupgradeLogDirPath>/preupgrade_fixups.sql to complete all


of the BEFORE UPGRADE action items below marked with '(AUTOFIXUP)'.

==============
BEFORE UPGRADE
==============

Run <preupgradeLogDirPath>/preupgrade_fixups.sql to complete all


of the BEFORE UPGRADE action items below marked with '(AUTOFIXUP)'.

REQUIRED ACTIONS
================
+ Adjust TABLESPACE SIZES as needed.
Auto 12.2.0.1.0
Tablespace Size Extend Min Size Action
---------- ---------- -------- ---------- ------

SYSAUX 7764 MB DISABLED 6916 MB None


SYSTEM 1074 MB ENABLED 1566 MB None
TEMP 64 GB DISABLED 150 MB None
UNDOTBS1 24 GB ENABLED 400 MB None

Note that 12.2.0.1.0 minimum sizes are estimates.


If you plan to upgrade multiple pluggable databases concurrently,
then you must ensure that the UNDO tablespace size is equal to at least
the number of pluggable databases that you upgrade concurrently,
multiplied by that minimum. Failing to allocate sufficient space can
cause the upgrade to fail.

+ (AUTOFIXUP) Empty the RECYCLEBIN immediately before database upgrade.


The database contains 1036 objects in the recycle bin.

The recycle bin must be completely empty before database upgrade.

RECOMMENDED ACTIONS

RECOMMENDED ACTIONS
===================
+ Run 12.1.0.2.0 $ORACLE_HOME/rdbms/admin/utlrp.sql to recompile invalid
objects. You can view the individual invalid objects with

SET SERVEROUTPUT ON;


EXECUTE DBMS_PREUP.INVALID_OBJECTS;

8 objects are INVALID.

There should be no INVALID objects in SYS/SYSTEM or user schemas before


database upgrade.

+ If you plan on continuing to use the Oracle mitigation patch instead of


installing the Oracle recommended Oracle JavaVM (OJVM) Patch Set Update
(PSU), then you should enable Java development just before upgrade
using
the command:

EXECUTE SYS.DBMS_JAVA_DEV.ENABLE;

Taking this action will make your database subject to a known security
vulnerability, but without the PSU patch, Java development must still
be
enabled to allow some upgrade actions to complete. Extreme caution is
advised.

The temporary OJVM Mitigation patch is currently installed and active


in
the database, securing it against the known threat but disabling Java
development until you can install the latest OJVM PSU.

The upgrade may fail if Java development is disabled. When active, the
OJVM Mitigation patch disables Java development in the database.
Oracle
strongly recommends installing the latest OJVM PSU in both the
12.1.0.2.0 and 12.2.0.1.0 ORACLE_HOMEs which will eliminate the need
for
the mitigation patch. Doing that in 12.2.0.1.0 will not incur any
database downtime and will eliminate the same vulnerability during the
next upgrade. If you cannot apply the OJVM PSU, you may opt to retain
the mitigation patch in 12.1.0.2.0, but Java development still must be
enabled during the upgrade. Please refer to MOS note 1929745.1 for
more
details.

+ Review and remove any unnecessary HIDDEN/UNDERSCORE parameters.

The database contains the following initialization parameters whose


name
begins with an underscore:
_ash_size

Remove hidden parameters before database upgrade unless your


application
vendors and/or Oracle Support state differently. Changes will need to
be made in the spfile.

+ (AUTOFIXUP) Gather stale data dictionary statistics prior to database


upgrade in off-peak time using:

EXECUTE DBMS_MY-COMP.GATHER_DICTIONARY_MY-COMP;

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


Oracle Database SQL Tuning Guide.

+ Please make sure that all the MVs are refreshed and sys.sumdelta$
becomes empty before doing upgrade, unless you have strong business
reasons not to do so. You can use dbms_mview.refresh() to refresh the
MVs except those stale ones to be kept due to business need. If there
are any stale MVs depending on changes in sys.sumdelta$, do not
truncate
it, because doing so will cause wrong results after refresh.

There is one or more non-fresh MV in the database or sumdelta$ is not


empty.

Oracle recommends that all materialized views (MV's) are refreshed


before upgrading the database because this will clear the MV logs and
the sumdelta$ table, and make the UPGRADE process faster. If you choose

+ Please make sure that all the MVs are refreshed and sys.sumdelta$
becomes empty before doing upgrade, unless you have strong business
reasons not to do so. You can use dbms_mview.refresh() to refresh the
MVs except those stale ones to be kept due to business need. If there
are any stale MVs depending on changes in sys.sumdelta$, do not
truncate
it, because doing so will cause wrong results after refresh.

There is one or more non-fresh MV in the database or sumdelta$ is not


empty.

Oracle recommends that all materialized views (MV's) are refreshed


before upgrading the database because this will clear the MV logs and
the sumdelta$ table, and make the UPGRADE process faster. If you choose
to not refresh some MVs, the change data for those MV's will be carried
through the UPGRADE process. After UPGRADE, you can refresh the MV's
and
MV incremental refresh should work in normal cases.

INFORMATION ONLY
================
+ Consider upgrading APEX manually, before the database upgrade.

The database contains APEX version 4.2.5.00.08 and will need to be


upgraded to at least version 5.0.4.00.12.

To reduce database upgrade time, you can upgrade APEX manually before
the database upgrade. Refer to My Oracle Support Note 1088970.1 for
information on APEX installation upgrades.

=============
AFTER UPGRADE
=============

Run <preupgradeLogDirPath>/postupgrade_fixups.sql to complete all


of the AFTER UPGRADE action items below marked with '(AUTOFIXUP)'.

REQUIRED ACTIONS
================
None

RECOMMENDED ACTIONS

RECOMMENDED ACTIONS
===================
+ If you use the -T option for the database upgrade, then run
$ORACLE_HOME/rdbms/admin/utluptabdata.sql after the upgrade is
complete,
to VALIDATE and UPGRADE any user tables affected by changes to
Oracle-Maintained types.

There are user tables dependent on Oracle-Maintained object types.

If the -T option is used to set user tablespaces to READ ONLY during


the
upgrade, user tables in those tablespaces, that are dependent on
Oracle-Maintained types, will not be automatically upgraded. If a type
is evolved during the upgrade, any dependent tables need to be
re-validated and upgraded to the latest type version AFTER the database
upgrade completes.

+ Upgrade the database time zone version using the DBMS_DST package.

The database is using timezone datafile version 18 and the target


12.2.0.1.0 database ships with timezone datafile version 26.

Oracle recommends using the most recent timezone data. For further
information, refer to My Oracle Support Note 1585343.1.

+ (AUTOFIXUP) Gather dictionary statistics after the upgrade using the


command:

EXECUTE DBMS_MY-COMP.GATHER_DICTIONARY_MY-COMP;
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.

INFORMATION ONLY
================
+ Apply latest Oracle JavaVM (OJVM) Bundle Patch (BP) or Patch Set Update
(PSU) if it was not applied before database upgrade on 12.2.0.1.0
ORACLE_HOME. Please refer to MOS note 1929745.1 for more details.

The temporary OJVM Mitigation patch is currently installed and active


in
the database, securing it against the known threat but disabling Java
development until you can install the latest OJVM BP or PSU.

Oracle JavaVM Component Database PSU is released as part of the


Critical
Patch Update program from October 2014 onwards. Oracle recommends
applying the latest OJVM PSU patch to ALL databases that have Oracle
JavaVM present in the database, regardless of whether you are
explicitly
using it or not. Even if Oracle JavaVM is not present in the database
it
is best practice to install the OJVM PSU in case a new database is
created in the ORACLE_HOME.

Run the pre-upgrade fixup script.


SQL> @preupgrade_fixups.sql
Executing Oracle PRE-Upgrade Fixup Script

Auto-Generated by: Oracle Preupgrade Script


Version: 12.2.0.1.0 Build: 1
Generated on: 2018-02-05 14:15:50

For Source Database: DB1M


Source Database Version: 12.1.0.2.0
For Upgrade to Version: 12.2.0.1.0

Fixup
Check Name Status Further DBA Action
---------- ------ ------------------
purge_recyclebin Passed None
invalid_objects_exist Failed Manual fixup recommended.
jvm_mitigation_patch Failed Manual fixup recommended.
hidden_params Failed Manual fixup recommended.
dictionary_my-comp Passed None
mv_refresh Failed Manual fixup recommended.
apex_upgrade_msg Failed Manual fixup recommended.

PL/SQL procedure successfully completed.

SQL>

Note below will not compile.

SQL> COLUMN object_name FORMAT A30


SELECT owner,
object1945ype,
object_name,
status
FROM dba_objects
WHERE status = 'INVALID'
ORDER BY owner, object1945ype, object_name;SQL> 2 3 4 5 6 7

OWNER
OBJECT1945YPE OBJECT_NAME STATUS
----------------------------------------------------------------------------------------------------------------------------
---- ----------------------- ------------------------------ -------
ZORO_ORT
PACKAGE BODY COMMON_PKG INVALID
ZORO_ORT
PACKAGE BODY CPR_FEFU_F5_PKG INVALID
ZORO_ORT
PACKAGE BODY KPI_LL_VR_CAP_K3_PKG INVALID
ZORO_ORT
PACKAGE BODY KPI_NRFU_K4_PKG INVALID
ZORO_ORT
PACKAGE BODY PARA_EQ_M1_PKG INVALID
ZORO_ORT
PACKAGE BODY PARA_EQ_M2_PKG INVALID

6 rows selected.

SQL>

Enable Java.
SQL> SELECT version, status FROM dba_registry WHERE comp_id='JAVAVM';

VERSION STATUS
------------------------------ -----------
12.1.0.2.0 INVALID
SQL> EXECUTE SYS.DBMS_JAVA_DEV.ENABLE;

PL/SQL procedure successfully completed.

SQL> SELECT version, status FROM dba_registry WHERE comp_id='JAVAVM';

VERSION STATUS
------------------------------ -----------
12.1.0.2.0 INVALID

SQL>

Gather dictionary my-comp.


SQL> EXECUTE DBMS_MY-COMP.GATHER_DICTIONARY_MY-COMP;

PL/SQL procedure successfully completed.

SQL>

Purge recycle bin.


SQL> purge dba_recyclebin;

DBA Recyclebin purged.

SQL>

Confirm sec_case_sensitive_logon is set to true.


SQL> show parameter sec_case_sensitive_logon;

NAME TYPE VALUE


------------------------------------ -------------------------------- ------
------------------------
sec_case_sensitive_logon boolean TRUE
SQL>

You might also like