Upgrade 12c to 19c: Traiditional Way
Introduction
This page described how to upgrade single instance of FMS Database from version 11.2.0.4 to 19.3.0.0 in Windows Server 2012 R2 Standard
Source Server Preparation Upgrade Checklist
Use this checklist to prepare your server with the earlier Oracle Database release before you start the upgrade.
Use this checklist to prepare your server with the earlier Oracle Database release before you start the upgrade.
TAKS |
DESCRIPTION |
Clean up the database |
|
Check materialized views |
|
Check Time Zone setting |
|
Removing EM Repository (if exists) |
|
Check accounts using ONLY 10g password version |
|
Ensure that you do not have the deprecated parameter SEC_CASE_SENSITIVE_LOGON set to FALSE |
|
Gather dictionary statistics to decrease Oracle Database downtime |
EXEC DBMS_STATS.GATHER_DICTIONARY_STATS; |
Back up the database (recommended) |
man target / run
{ |
Install 19c Binaries
Unzip
and copy the file into:
C:\temp
Install 19c Software. Run setup.exe
put c:\oracle as Oracle base!!
2. Once completed installation, run this in powershell
C:\Oracle\product\12.1.0\dbhome_1\jdk\bin\java -jar C:\Oracle\product\19.0.0.0\dbhome_1\rdbms\admin\preupgrade.jar
- if encounter below issues :-
ERROR - Unable to run preupgrade due to:
ERROR:
ORA-01017: invalid username/password; logon denied
Solution
Go to C:\Oracle\Oracle\product\12.1.0\dbhome_1\network\admin\sqlnet.ora then set SQLNET.AUTHENTICATION_SERVICES= (NTS) instead of (NONE)
It will generate pre-upgrade script, which you need to run and check, in powershell login to db using
sqlplus / as sysdba
Below command will list all the issues that you need to resolve before upgrade
@C:\Oracle\cfgtoollogs\fidelio\preupgrade\preupgrade_fixups.sql
Below command will list all the issues that you need to resolve before upgrade
Then run below script for get rib the Invalid_objects_exist.
sql> @C:\Oracle\product\12.1.0\dbhome_1\RDBMS\ADMIN\utlrp.sql, and
sql> select count(*) from dba_objects where status='INVALID';
→ make sure it return 0 error
If unable to return 0 means there have some compiling issue. run below script to see the object.
sql >SET SERVEROUTPUT ON;
sql >EXECUTE DBMS_PREUP.INVALID_OBJECTS;
To get rid of this, recompile objects. You have several options:
1. This script may take some time, depending on the number of objects.
@$ORACLE_HOME/rdbms/admin/utlrp.sql
2. Compile objects of a particular schema:
EXEC DBMS_UTILITY.compile_schema(schema => 'APPS');
Compiling individual objects:
-- Compiling a package;
ALTER PACKAGE APPS.DAIL_REPORT COMPILE;
ALTER PACKAGE APPS.DAIL_REPORT COMPILE BODY;
-- Compiling a procedure:
ALTER PROCEDURE APPS.REPORT_PROC COMPILE;
-- Compiling a view:
ALTER VIEW APPS.USERSTATUS_VW COMPILE;
-- Compiling a function:
ALTER FUNCTION APPS.SYNC_FUN COMPILE;
If still cannot, then sql > drop Object_type Object_Name;
sql> select count(*) from dba_objects where status='INVALID';
→ make sure it return 0 error
Option1: Run Upgrade using Scripts
1 Shutdown the database from the Oracle 12.1 Home
sqlplus / as sysdba
shutdown immediate
2 Copy the password file and spfile from the 12.1 Oracle Home to the 19c Oracle Home
cd /u01/app/oracle/product/19c/dbhome_1/dbs
cp /u01/app/oracle/product/12.1.0/dbhome_1/dbs/orapwTEST .
cp /u01/app/oracle/product/12.1.0/dbhome_1/dbs/spfileTEST.ora .
3 Shutdown the database
Start the database in upgrade mode
unset ORACLE_HOME LD_LIBRARY_PATH TNS_ADMIN
export ORACLE_SID=TEST
export ORACLE_HOME=/u01/app/oracle/product/19c/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
sqlplus / as sysdba
startup upgrade;
4 Execute the manual upgrade cd $ORACLE_HOME/bin
./dbupgrade
5 Change the entry in /etc/oratab
- To setup your environment for the future
Change the Oracle Home parameter
TEST:/u01/app/oracle/product/12.1.0/dbhome_1:N TO
TEST:/u01/app/oracle/product/19c/dbhome_1:N
6 Startup the database in the new ORACLE HOME
unset ORACLE_HOME LD_LIBRARY_PATH TNS_ADMIN
export ORACLE_SID=test
. oraenv
sqlplus / as sysdba
startup
7 Compile all invalid objects @?/rdbms/admin/utlrp.sql
Execute the post fixup scripts (same location as the pre upgrade fixup SQL directory)
@/tmp/upgrade/postupgrade_fixups.sql
8 Verify components after the upgrade
@?/rdbms/admin/utlusts.sql TEXT
9 Update Time Zone (Optional)
Option2: Run Upgrade using DBUA
Now you can invoke DBUA from Command Prompt.
cd C:\Oracle\product\19.0.0.0\dbhome_1\bin
dbua
Make sure all the severity issue have been solve.
Tick Recompile invalid Objects during Post Upgrade
Info
Make sure your listener status
is Up, and Migrate
= Yes!!
Untick Configure Enterprise Manager
Check
Everything is in order, then start upgrade
Complete
Installation
@C:\Oracle\cfgtoollogs\fidelio\preupgrade\postupgrade_fixups.sql
Maybe will encounter issue as below, but just ignore it.
Enter value for c_apex_version_4_dots:
Enter value for c_upgradable_versions:
Enter value for c_minimum_compatible:
Enter value for c_upgradable_versions:
Enter value for c_upgradable_versions:
Enter value for c_upgradable_versions:
Enter value for c_minimum_compatible:
Enter value for c_minimum_compatible:
Enter value for c_minimum_compatible:
Enter value for c_oracle_high_version_4_dots:
Enter value for c_ltz_content_ver:
Enter value for c_ltz_content_ver:
Enter value for c_ltz_content_ver:
Enter value for c_ltz_content_ver:
Enter value for c_oracle_high_version_0_dots:
Enter value for c_upgradable_versions:
Enter value for c_default_processes:
Enter value for c_oracle_high_version_4_dots:
Enter value for c_oracle_high_version_0_dots:
ERROR at line 1:
ORA-04063: package body "SYS.DBMS_PREUP" has errors
ORA-06512: at line 11
Target Server Post-Upgrade Checklist
Complete these checks on the upgraded Oracle Database environment.
Query for any INVALID Objects |
SELECT substr(owner,1,12) owner, substr(object_name,1,12) object, substr(object_type,1,30) object, status from dba_objects WHERE status <> 'VALID'; |
Verify DBA_REGISTRY |
col
COMP_ID for a10 |
Target Server Post-Upgrade Checklist
Complete these checks on the upgraded Oracle Database environment.
TASK |
DESCRIPTION |
Query for any INVALID Objects |
SELECT substr(owner,1,12) owner, substr(object_name,1,12) object, substr(object_type,1,30) object, status from dba_objects WHERE status <> 'VALID'; |
Verify DBA_REGISTRY |
col
COMP_ID for a10 |
Good Docs:
2521164.1 Oracle Database 19c Proactive Patch Information - Start Here For Patch Downloads
2539778.1 Oracle 19c - Complete Checklist for Manual Upgrades to Non-CDB Oracle Database 19c
2543981.1 Oracle 19c - Complete Checklist for upgrading Oracle 12c, 18c Container Database (CDB) to Oracle 19c Release using DBUA
2549866.1 Oracle 19c - Complete checklist for Manual Upgrade for upgrading Oracle 12.x, 18c Container database (CDB) to Oracle 19c (19.x)
2545064.1 Oracle 19c - Complete Checklist for Upgrading to Oracle Database 19c (19.x) using DBUA
2539778.1 Oracle 19c - Complete Checklist for Manual Upgrades to Non-CDB Oracle Database 19c
How to Download and Run Oracle's Database Pre-Upgrade Utility (Doc ID 884522.1)
Script to Collect DB Upgrade/Migrate Diagnostic Information (Doc ID 556610.1) – dbupgdiag.sql