Oracle Database 12c Upgrade with the New Upgrade Features (Step by Step)
By Tarek Salama on Nov 17, 2013
The latest version of Oracle Database, Oracle Database 12c, is available for download from our Oracle Technology Network. Oracle Database 12c introduces over 500 features, including several improvements to upgrade performance, automation, and reporting. Some of the new feautures and imporvements are directly relevant to the upgrade process to Oracle Database 12c
Let's review those features, making the upgrade process a lot easier and straighforward, so you can get started with your upgrades to 12c
NEW preupgrade script
Executes pre-upgrade checks and generates “fixup” scripts
Must be executed within the source (lower-numbered version) environment
Generates fixup scripts to remedy issues that can be resolved via SQL*Plus commands before upgrade
Scripts and logs are generated in the preupgrade directory of the source environment
Faster Upgrade, Less Downtime
New feature in Oracle Database 12c – and the default for upgrades
- SERVER component upgrade scripts get executed in parallel, where possible
- Overall time to upgrade is reduced between 20% and 40%
- Parallel upgrade is driven by a PERL script
How to Start Your Upgrade
SQL> startup upgrade
$> cd $ORACLE_HOME/rdbms/admin
$> $ORACLE_HOME/perl/bin/perl catctl.pl -n 4 catupgrd.sql
NOTE: Invoking catupgrd.sql from the SQL*Plus command prompt will give you instructions for how to run the new parallel upgrade.
New Output at Terminal and in Log files
Step By Step Upgrade Using DBUA Enhancements
In this release, there are more options for recovering from failures during upgrade and for restarting the upgrade from the point where the failure occurred. For example, Oracle Database 12c introduces new Oracle Recovery Manager (RMAN) support and Guaranteed Restore Point features. You can fix a problem that DBUA encounters and then return to the upgrade process.
">· With new achievement logging that tracks the upgrade progress, you now have the option to use Guaranteed Restore Point to restore your database if the upgrade fails. DBUA automatically creates a Restore Point.
o If an error occurs while DBUA during pre-upgrade steps, including backup and restore and listener migration, then you can restart DBUA.
o If post-upgrade steps fail due to encountering an error, then DBUA displays the manual steps for you to finish the upgrade. If the post-upgrade steps stop, then you can defer the saved post upgrade steps to finish the upgrade manually. Post-upgrade steps include moving data, post migration processing, upgrading the time zone file, or configuring Oracle Enterprise Manager.
· The option to use Oracle RMAN to restore your database in case the upgrade fails has been improved in this release. In certain cases, DBUA now enables you to restore your database from your own backup.
· With RMAN backup, DBUA supports backing up of databases that use Oracle Automatic Storage Management (Oracle ASM).
Enhanced Pre-Upgrade and Post-Upgrade Summary Report
DBUA generates HTML reports before and after the upgrade. These reports include component status, and also provide the ability to drill down to database objects, including invalid objects where an action to fix a problem might be available.
So, let’s start the upgrade by using DBUA.
If you installed the software for Oracle Database 12c and specified that you are upgrading an existing Oracle database, then DBUA starts automatically. You can also start DBUA independently after the installation is complete. While the upgrade is in process, DBUA shows the upgrade progress for each component. DBUA writes detailed trace and log files and produces a complete HTML report for later reference. To enhance security, DBUA automatically locks new user accounts in the upgraded database. DBUA then proceeds to create new configuration files (parameter and listener files) in the new Oracle home. DBUA does not begin the upgrade process until all of the pre-upgrade steps are completed.
So, start you DBUA and chose the database that you want to Upgrade, then click next.
The Automated Pre-Upgrade Fixes will appear to enable you to fix any issues related to the upgrade.
The Upgrade Options Configuration page appears with the Upgrade Options tab selected.
The Upgrade Options Configuration page with the Upgrade Options tab selected provides the following options:
The Upgrade Parallelism section enables the degree of parallelism for the upgrade process. This option reduces the time needed to perform the upgrade, based on the number of CPUs available to handle the running of scripts and processes simultaneously.
By default, DBUA sets Upgrade Parallelism to the number of CPUs or 2 if the number of CPUs is less than 4. You can adjust this default value by selecting a new value from the Degree of Parallelism drop-down list.
The Upgrade Options section provides the following settings:
- Recompile Invalid Objects During Post-Upgrade.
Select Recompile Invalid Objects During Post-Upgrade if you want DBUA to recompile all invalid PL/SQL modules after the upgrade is complete. Specify the parallelism for the recompilation of invalid objects during post upgrade. DBUA provides a recommended degree of Recompilation Parallelism, which it sets to one less than the number of CPU you have available. Taking advantage of parallelism can significantly reduce the upgrade time. If you do not have DBUA recompile invalid objects in its post-upgrade phase, then you must manually recompile invalid objects after the database is upgraded.
- Upgrade Time Zone Data.
Select Upgrade Time Zone Data for DBUA to update the time zone data file for this release. If you do not select this option, then you must update the time zone configuration file manually after the upgrade.
- Gather Statistics Before Upgrade.
Select Gather Statistics Before Upgrade to reduce the overall time for the upgrade process.
- Change Tablespace Offline/Read Only During Upgrade.
Select Change Tablespace Offline/Read Only During Upgrade if you are upgrading a database for which you must transport tablespaces. In this case, the file headers must be made read/write before transporting.
The File Locations area enables you to browse for the location for output that DBUA creates for diagnostics. You can enter a full path into the field, or you can click Browse to navigate to a location.
(Optional) Click the Custom Scripts tab to specify custom SQL scripts that you would like to run before and after the upgrade.
The Custom Scripts page appears. (You may click Next without using the Custom Scripts option.)
Optional: In the Before Upgrade and After Upgrade fields, browse to the location of any custom SQL scripts that you would like to run. You can specify either one or both, or leave the fields blank to skip this option.
Click Next. The Management Options page appears.
In the Management Options page, select an option:
- Configure Enterprise Manager Database Express
Oracle Enterprise Manager Database Express is a web-based database management application that is built into Oracle Database 12c. EM Express replaces the DB Control component that was available in releases 10g and 11g.
- Register with Enterprise Manager Cloud Control
Registering with Oracle Enterprise Manager Cloud Control adds the database and its related entities such as Listener, Oracle ASM disk groups, and Oracle Clusterware as managed targets.
If you select this option, then you must provide information in the following fields:
- OMS Host
- OMS Port
- Enterprise Manager Admin Username
- Enterprise Manager Admin Password
- DBSNMP Password
If you are upgrading a single-instance database or Oracle Express Edition (XE), then the Move Database Files page appears.
In the Move Database Files page, select an option:
- Move Database Files as Part of Upgrade
- Move Fast Recovery Area as Part of Upgrade
If you choose Move Database Files as Part of Upgrade, then you must also configure Storage Type for the database files.
In the Storage Type drop-down list, select File System or Oracle ASM.
- If you select File System, then your database files are moved to the host file system.
- If you select Oracle Automatic Storage Management (Oracle ASM), then your database files are moved to Oracle ASM storage, which must currently exist on your system. If you do not have an Oracle ASM instance, then you can create one using Automatic Storage Management Configuration Assistant (ASMCA) from the Oracle Grid Infrastructure home and then restart DBUA.
If you choose Move Fast Recovery Area as Part of Upgrade, then you must also configure the storage type and location for the fast recovery area and specify the size to be allocated as described in this step.
- The Move Database Files and Move Fast Recovery Area options are independent of each other. For example, you can choose to move database files to Oracle ASM and leave the fast recovery area on the file system.
- When you choose to move the fast recovery area, DBUA does not physically move existing archived redo logs to a new location. Instead, DBUA sets the DB_RECOVERY_FILE_DEST and DB_RECOVERY_FILE_DEST_SIZE initialization parameters to the new location and new size when the database is started from the new Oracle home.
- If an Oracle Express Edition database is being upgraded to Oracle Enterprise Edition, then you must configure a fast recovery area. If a fast recovery area is currently configured, then the current settings are retained but the page displays to enable you to override these values.
Fast Recovery Area Storage Type
In the Storage Type list, select File System or Oracle ASM.
If you select File System, then your fast recovery area is on the host file system.
If you select Oracle Automatic Storage Management (Oracle ASM), then your fast recovery area is on Oracle ASM storage, which must currently exist on your system. If you do not have an Oracle ASM instance, then you can create one using Automatic Storage Management Configuration Assistant (ASMCA) from the Oracle Cloud Infrastructure home and then restart DBUA.
Fast Recovery Area Location
Browse to the location on the host file system, or on Oracle ASM storage.
Fast Recovery Area Size
Specify the size to allocate for the fast recovery area. The default is 1024 MB.
The Network Configuration page appears for listener selection.
The Listener Selection area of the Network Configuration page shows a table with: Name, Port, Oracle home, Status, and Migrate columns. To the left of the listener name is a box for selecting the listener.
Select one or more listeners from the source Oracle home to be migrated to the new upgraded Oracle home.
- DBUA adds the selected listener to the listener.ora file of the target Oracle home and starts it.
- DBUA removes the entry of the upgraded database from the old (source) listener.ora file.
- DBUA reloads the listener.ora file in both the source and target Oracle Database environments.
Integration with Existing RMAN Backups and Use a Guaranteed Restore Point.
In the Recovery Options page, select the recovery method to use in case the upgrade process encounters a problem.
The following recovery options and configurations are available:
- Use RMAN Backup
- Use Flashback and Guaranteed Restore Point
- I have my own backup and restore strategy
The Database Upgrade Summary page appears.
View the Upgrade Log in Progress
View the Alert Log
After the upgrade has completed, the Upgrade Results page displays a description of the original database and the upgraded database and shows the changes made to the initialization parameters. The page also shows the directory where various log files are stored after the upgrade.
So when you receive this message it’s mean that your upgrade has finished. Once again, this a rather simple process of upgrading, but if you require additional help for upgrading the database on your solution, don't hesitate to contact us.
For any questions please contact us at partner.imc-AT-beehiveonline.oracle-DOT-com