Ø
Steps
For Upgrading Oracle Database To 19c Using DBUA
·
Database preinstall 19c
·
19c software install
·
Pre-upgrade check
·
Run the pre-upgrade fixup script
·
Run utlrp.sql ( to compile invalid objects)
·
Check database component status
·
To enable restore , in case of failure, enable
flashback option
·
Start DBUA
·
Post Check
·
Updating sqlnet . ora file
·
Updating compatible parameter post upgrade
[root@ranesh ~] # yum install -y
https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
Loaded plugins: refresh-packagekit,
security
Setting up Install Process
Examining
/var/tmp/yum-root-3mPcvL/oracle-database-preinstall -19c-1.0-1. el7. x86_64. rpm :
oracle-database-preinstall -19c-1.0-1. el7. x86_64
Marking
/var/tmp/yum-root-3mPcvL/oracle-database-preinstall -19c-1.0-1. el7. x86_64. rpm to
be installed
Resolving Dependencies
--> Running transaction check
---> Package
oracle-database-preinstall -19c. x86_64 0:1.0-1. el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================================================================================
Package
Arch Version Repository
Size
=======================================================================================================================================================================
Installing:
Transaction Summary
=======================================================================================================================================================================
Install 1 Package(s)
Total size: 55 k
Installed size: 55 k
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : oracle-database-preinstall -19c-1.0-1. el7. x86_64
1/1
Verifying : oracle-database-preinstall -19c-1.0-1. el7. x86_64
1/1
Installed:
Complete!
./runInstaller . sh
PREUPGRADE CHECK
[oracle@new19c
dbhome_1]$ cd jdk/bin/
[oracle@new19c bin] $
java -jar /u01/app/oracle/product/19.0.0 /dbhome_1/rdbms/admin/preupgrade . jar
TEXT TERMINAL
Report generated by Oracle Database Pre-Upgrade Information Tool Version
19.0.0.0.0 Build: 1 on 2020-02-27T19:23:07
Upgrade-To version: 19.0.0.0.0
=======================================
Status of the database prior to
=======================================
Database Name: PROD
Container Name: prod
Container ID: 0
Version: 12.1.0.2.0
DB Patch Level: No Patch Bundle applied
Compatible: 12.1.0.2.0
Platform: Linux x86 64-bit
Timezone File: 18
Database log mode: ARCHIVELOG
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
Oracle Label Security [to be upgraded] VALID
Oracle Database Vault [to be upgraded] VALID
Oracle Text [to be upgraded] VALID
Oracle XML Database [to be upgraded] VALID
Oracle Java Packages [to be upgraded] VALID
Oracle Multimedia [to be upgraded] VALID
Oracle Spatial [to be upgraded] VALID
Oracle OLAP API [to be upgraded] VALID
==============
BEFORE UPGRADE
==============
REQUIRED ACTIONS
================
1. Set
MB. Check alert log during the upgrade to ensure there is remaining free
DB_RECOVERY_FILE_DEST_SIZE is set at 4560 MB. There is currently 4472 MB
Currently:
Fast recovery area
Limit
Used
Available
The database has
RECOMMENDED ACTIONS
===================
2. Upgrade Oracle Application Express (APEX) manually before the database
The database contains APEX version 4.2.5.00.08. Upgrade APEX to at least
Starting with Oracle Database Release 18, APEX is not upgraded
Note 1088970.1 for information about APEX installation and upgrades.
3.
EXECUTE DBMS_STATS
Dictionary statistics do not exist or are stale (not up-to-date).
Dictionary statistics help the Oracle optimizer find efficient SQL
For information on managing optimizer statistics, refer to the 12.1.0.2
Oracle Database SQL Tuning Guide.
4.
None of the fixed object tables have had stats collected.
Gathering statistics on fixed objects, if none have been gathered yet, is
For information on managing optimizer statistics, refer to the 12.1.0.2
Oracle Database SQL Tuning Guide.
INFORMATION ONLY
================
5. To help you keep track of your
AUTOEXTEND
Min Size
---------- ---------- -----------
SYSAUX 600 MB 717 MB
SYSTEM 780 MB 1126 MB
TEMP 60 MB 150 MB
UNDOTBS1 60 MB 448 MB
Minimum
6. Check the Oracle Backup and Recovery User's Guide for information on how
If you are using a version of the recovery catalog schema that is older
It is good practice to have the catalog schema the same or higher version
ORACLE GENERATED FIXUP SCRIPT
=============================
All of the issues in database PROD
SQL>@/u01/app/oracle/cfgtoollogs/prod/
=============
AFTER UPGRADE
=============
REQUIRED ACTIONS
================
None
RECOMMENDED ACTIONS
===================
7. Upgrade the database time zone file using the DBMS_DST package.
The database
Oracle recommends upgrading to the desired (latest) version of the time
Globalization Support Guide.
8. 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
Some directory object path names may currently contain symbolic links.
Starting in Release 18c, symbolic links are not allowed in
9.
EXECUTE DBMS_STATS
Oracle recommends gathering dictionary statistics after upgrade.
Dictionary statistics provide essential information to the Oracle
10. Gather statistics on fixed objects after the upgrade and when there is a
EXECUTE DBMS_STATS
This recommendation is given for all
Fixed object statistics provide essential information to the Oracle
For information on managing optimizer statistics, refer to the 12.1.0.2
Oracle Database SQL Tuning Guide.
ORACLE GENERATED FIXUP SCRIPT
=============================
All of the issues in database PROD
SQL>@/u01/app/oracle/cfgtoollogs/prod/
==================
PREUPGRADE SUMMARY
==================
/u01/app/oracle/cfgtoollogs/prod/
/u01/app/oracle/cfgtoollogs/prod/
/u01/app/oracle/cfgtoollogs/prod/
Execute
Before upgrade:
Log into the database and execute the
@/u01/app/oracle/cfgtoollogs/prod/
After the upgrade:
Log into the database and execute the
@/u01/app/oracle/cfgtoollogs/prod/
[oracle@new19c
checksBuffer.tmp preupgrade_driver.sql
components.properties preupgrade_fixups.sql
dbms_registry_extended.sql preupgrade.log
parameters.properties preupgrade_package.sql
postupgrade_fixups.sql upgrade
[oracle@new19c
preupgrade ] $ pwd
/u01/app/oracle/cfgtoollogs/prod/preupgrade
SQL*Plus: Release
12.1.0.2.0 Production on Thu Feb 27 19:26:51 2020
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, OLAP,
Advanced Analytics and Real Application Testing options
SQL>
@preupgrade_fixups. sql
Executing Oracle
PRE-Upgrade Fixup Script
Auto-Generated by: Oracle Preupgrade Script
Version: 19.0.0.0.0
Build: 1
Generated on: 2020-02-27 19:22:59
For Source
Database: PROD
Source Database Version:
12.1.0.2.0
For Upgrade to
Version: 19.0.0.0.0
Action Issue Is
Number Preupgrade Check Name Remedied
Further DBA Action
------ ------------------------ ----------
--------------------------------
1.
min_recovery_area_size NO Manual fixup required.
2.
apex_manual_upgrade NO Manual fixup recommended.
3. dictionary_stats YES None.
4.
pre_fixed_objects YES None.
5.
tablespaces_info NO Informational only.
Further action is optional.
6.
rman_recovery_version NO Informational only.
Further action is optional.
The fixup scripts have
been run and resolved what they can. However,
Depending on the
severity of the specific issue, and the nature of
There you will find the
original corresponding diagnostic message
PL/SQL procedure
successfully completed.
INVALID COUNT
SQL> select count( *)
from dba_objects where status='INVALID';
COUNT( *)
----------
0
Check database
component status
SQL> set pagesize500
COMP_NAME STATUS VERSION
----------------------------------------
----------- ----------
JServer JAVA Virtual
Machine VALID
12.1.0.2.0
Oracle Application
Express VALID
4.2.5.00.0
Oracle Database Catalog
Views VALID
12.1.0.2.0
Oracle Database Java
Packages VALID
12.1.0.2.0
Oracle Database Packages
and Types VALID
12.1.0.2.0
Oracle Database Vault VALID
12.1.0.2.0
Oracle Label Security VALID
12.1.0.2.0
Oracle Multimedia VALID
12.1.0.2.0
Oracle OLAP API VALID 12.1.0.2.0
Oracle Real Application
Clusters OPTION OFF 12.1.0.2.0
Oracle Text VALID
12.1.0.2.0
Oracle Workspace Manager VALID 12.1.0.2.0
Oracle XDK VALID
12.1.0.2.0
Oracle XML Database VALID
12.1.0.2.0
Spatial VALID 12.1.0.2.0
16 rows selected.
SQL> select * from
v$timezone_file;
FILENAME VERSION CON_ID
--------------------
---------- ----------
timezlrg_18.dat 18
0
SQL> SELECT * FROM
v$backup WHERE status ! = 'NOT ACTIVE';
SQL> SELECT * FROM
v$recover_file;
To enable restore
, in case of failure, enable flashback option.
SQL> alter system set
db_recovery_file_dest_size=20G scope=both;
System altered.
SQL> alter database
flashback on;
Database altered.
SQL> ! date
[oracle@new19c
dbhome_1] $ export ORACLE_HOME=/u01/app/oracle/product/19.0.0 /dbhome_1
[oracle@new19c
dbhome_1] $
[oracle@new19c
dbhome_1]$ cd bin/
[oracle@new19c bin] $
. /dbua
We can
pause and resume the upgrade during the process also.
cd /u01/app/oracle/cfgtoollogs/VIS/preupgrade
@postupgrade_fixup. sql
Post Check
SQL> select comp_id,status from dba_registry; COMP_ID STATUS ------------------------------ ----------- CATALOG VALID CATPROC VALID JAVAVM VALID XML VALID CATJAVA VALID RAC OPTION OFF XDB VALID OWM VALID CONTEXT VALID ORDIM VALID10 rowss selected.SQL> select * from v$timezone_file;FILENAME VERSION CON_ID-------------------- ---------- ----------timezlrg_32.dat 32 0Updating
sqlnet . file ora ORACLE_HOME=/oracle/app/oracle/product/ export /dbhome_1 19.0.0.0 $ORACLE_HOME/network/admin cd cat sqlnet . ora SQLNETALLOWED_LOGON_VERSION_SERVER=11 . Updating compatible parameter post upgradesystem set compatible='19.0.0' scope= alter ; spfile immediate; shutdown startup SELECT name, value FROM v$parameterWHERE name = 'compatible';
1 comment:
Good job
Post a Comment