Manual Upgrading Oracle Database From 11.2.0.4 to 12.2.0.1
Description:-
A manual upgrade consists of running SQL scripts and utilities from a command line to upgrade a database to the new Oracle Database release.
Current ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/db_1
New ORACLE_HOME=/u03/app/oracle/product/12.2/db_1
Database Name: Test
1. Run the preupgrade tool:
The preupgrade.jar Pre-Upgrade Information Tool is supplied with Oracle Database 12cR2.
This tool has reside in new oracle home.
/u03/app/oracle/product/12.2/db_1/rdbms/admin/preupgrade.jar
SYNTAX:
/u01/app/oracle/product/11.2.0.4/db_1/jdk/bin/java -jar /u03/app/oracle/product/12.2/db_1/rdbms/admin/preupgrade.jar FILE DIR /u01/
After run the above tool we will get below sql files.
Run the preupgrade_fixup.sql
A. To remove EM console.
B. Run the below block for refresh the materialized views.
C. We have to increase the number of processes and purge the recycle bin
2. Shutdown the database:
Take full database backup. we should turn on the flashback database and create a Guaranteed Restore Point which can be used to rollback if upgrade process fails.
3. Copy the parameter and password file from the 11g home to the new 12c home.
4. Set new ORACLE HOME of 12c location:
export ORACLE_HOME=/u01/app/oracle/product/12.2/db_1/
start the database in upgrade mode.
5. Run catctl.pl
catctl.pl is introduce in Oracle Database 12c, Parallel Upgrade Utility replaces the SQL Upgrade Utility catupgrd.sql. With Parallel Upgrade Utility, we can run upgrade scripts and processes in parallel. Using this script will increase our server CPU capacity and reduce the upgrade time.
-n is used for parallelism (new feature on oracle 12c)
$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catctl.pl -d $ORACLE_HOME/rdbms/admin -l /home/oracle/ -n 4 catupgrd.sql
6. Run “postupgrade_fixups.sql” .
A. To fix the manual error related to timezone
For 12cR2, the new timezone is 26. So once the db upgrade is completed, we have to upgrade the dst timezone from 14 to 26
Download DBMS_DST_scriptsV1.9.zip file from metalink.
Check the timezone version:
Unzip DBMS_DST_scriptsV1.9.zip file we will get below sql files for upgrade the timezone.
Check the Current Timezone detail:
Apply the New Timezone:
Check the timezone version:
Now it’s changed from 14 to 26.
7. Execute utlu122s.sql:
This tool is supplied with Oracle Database and displays the version and elapsed upgrade time for each component in DBA_REGISTRY.
8. Execute catuppst.sql:
If an Oracle bundle patch or patch set update (PSU or BP) is installed in the Oracle home, this script will automatically applies those patch set update to the database.
9. Execute utlrp.sql script to compile invalid objects.
10. Set COMPATIBALE parameter value for 12.2.0 as well as start the listener with 12.2 home.
11. Finally to check the component and version using dba_registry view.
Catch Me On:- Hariprasath Rajaram
LinkedIn:https://www.linkedin.com/in/hari-prasath-aa65bb19/
Facebook:https://www.facebook.com/HariPrasathdba
FB Group:https://www.facebook.com/groups/894402327369506/
FB Page: https://www.facebook.com/dbahariprasath/?
Twitter: https://twitter.com/hariprasathdba