Manual, Command-line Method for Upgrading Oracle Database
Manual upgrades provide benefits and risks.
A manual upgrade consists of running SQL scripts and utilities from a command line to upgrade a database to the new Oracle Database release.
Manual upgrades give you finer control over the upgrade process. However, manual upgrades are susceptible to error when upgrade or pre-upgrade steps either are not followed, or are performed out of order.
Before the Upgrade
- Analyze the database using the Pre-Upgrade Information Tool.
The Pre-Upgrade Information Tool is a Java JAR file that is supplied with Oracle Database. When you start the tool, it self-extracts, and then executes SQL scripts.
The Pre-Upgrade Information Tool displays warnings about possible upgrade issues with the database, and generates fixup scripts for you to use to address any issues. It also displays information about required initialization parameters for the new release of Oracle Database.
- Prepare the new Oracle home.
- Perform a backup of the database.
Depending on the Oracle Database release you upgrade, you can be required to perform more pre-upgrade steps. These steps can include adjusting the parameter file for the upgrade, removing desupported initialization parameters, or adjusting initialization parameters that can cause upgrade problems also upgrade to the latest release of Oracle Database 12 release 2 (12.2) depends on the release number of your current database.
For Oracle Database release earlier than 22.214.171.124, then you cannot directly upgrade your Oracle Database to the latest release. In this case, you are required to upgrade to an intermediate release before upgrading to Oracle Database 12 release 2.
For any multi-step upgrade, if you must carry out two upgrades to upgrade to the current release, then you must run the preupgrade script twice: First, for the intermediate upgrade release, and second, for the target upgrade target release.
Upgrade Paths for Oracle Database 12c
126.96.36.199 or later
Direct upgrade is supported.
10.2.0.2, 10.2.0.3, 10.2.0.4 and 10.2.0.5
188.8.131.52 or earlier
Direct upgrade to Oracle Database 12c is not supported.
Solution: Upgrade to an intermediate Oracle Database release that can be directly upgraded to the current release. You must upgrade Oracle Database releases that are not supported for direct upgrade in this release to an intermediate Oracle Database release that is supported for direct upgrade. When upgrading to an intermediate Oracle Database release, follow the instructions in the intermediate release documentation. After you complete an upgrade to the intermediate release Oracle Database, you can upgrade the intermediate release database to the current Oracle Database 12c release.
This restriction does not apply if you use Oracle Data Pump export/import to migrate data to the new release.
Upgrade from release 184.108.40.206 to release 220.127.116.11 or 18.104.22.168. Then upgrade from release 22.214.171.124 to 12.2
Apply below patch for your respective version to avoid SPM issue after upgrade.
Parallel Upgrade Utility (
catctl.pl, and the
dbupgradescript) enable you to upgrade simultaneously components that do not require upgrades to occur in a specific order.
Parallel Upgrade Utility,
catctl.pl is introduced in 12cR1 and requiringyou to run it from Perl. But for dbupgrade we can directly run into shell.
Review the preupgraded generated logs as above and fixed as per recommendations.
Login as sysdba and execute preupgrade fixup script with old Oracle Home
Validate the invalid objects before upgrade.
Move parameter file , listener.ora, tnsnames.ora, sqlnet.ora and ldap.ora to new Oracle Home 12cR2, and shutdown the database and start the database with 12cR2 home in startup upgrade mode.
Edit /etc/oratab with new Oracle Home : /u01/app/oracle/product/126.96.36.199/DB_1
UPGRADE STEPS to 12cR2:
Validate the Upgraded Summary Logs
In summary logs we find the timezone version is not upgrade to match version with current release. Now we are going to manually fix to current release.
For this we need to shutdown the database and start the database in upgrade mode to update the timezone to current release.
Go to the upgraded logs location and validate the logs for any error during upgradation.
Once done we need to run the post upgrade fixes as sysdba.
Execute the utlu122s.sql to validate the post upgraded components.
Run the utlrp to recompile objects if any….
Hope this help … :)