Upgrade database from 11g to 12c using DBUA

DBUA in oracle 12c simplifies the upgrade process a lot . 

SEE: Manual upgrade from 11g to 12c

STEPS:

PRE-REQUSITES:

1. Install Oracle 12c RDMBS homeHow to install oracle 12c binary 

2.Enable flashback database:

This is  to ensure that, if upgrade fails , we can restore it using guarantee restore point.

 

3. Check whether all components are valid or not:

 

 

4. Make sure no invalid objects under sys or system schema:

5. Run pre-upgrade tool:

Copy the preupgrd.sql and utluppkg.sql script from Oracle 12c binary to any temporary location .

cp /oracle/app/oracle/product/12.1.0.2/dbhome_1/rdbms/admin/preupgrd.sql .
cp /oracle/app/oracle/product/12.1.0.2/dbhome_1/rdbms/admin/utluppkg.sql .

In action required, it is providing preupgrade_fixup.sql scrip to run before upgrade. Run the same in 11g database

Now review the output of this script. And take action manually, if those were not fixed by the script.

SQL> EXECUTE dbms_stats.gather_dictionary_stats;

PL/SQL procedure successfully completed.

6. Purge aud$ table ( take backup if required)

7 . Remove enterprise manager if installed:

From 12c , enterprise manager has been decommissioned from 12c. Either we can use oracle 12c/13c cloud control or enterprise database express for monitoring database.

Run below script to remove the EM component:

8. Check the ACLS present:

If this query returns any row- Please make sure 20369415 is applied to the ORACLE 12C rdbms binary , before upgrade.

UPGRADE:

At this stage, we are still connected to 11g database which is up and running.

Now run the dbua utility from 12c oracle_home location.

cd  oracle/app/oracle/product/12.1.0.2/dbhome_1/bin

./dbua

upgrade_dbua1

upgrade_dbua2 upgrade_dbua3

Select parallelism to required degree and select upgrade timezone , which will upgrade the timezone, after end of db upgrade.

upgrade_dbua4 upgrade_dbua5 upgrade_dbua6 upgrade_dbua7

Make sure to select USE FLASHBACK OPTION: ( it will create a restore point automatically)

upgrade_dbua8 upgrade_dbua9 upgrade_dbua10 upgrade_dbua11 upgrade_dbua12

 

POST-UPGRADE:

1. Run the post upgrade script.

2. Check the timezone version:

3. Check invalid sys or system objects:

4. Run utlrp.sql

5. Check the status of registry component:

Make sure all are in valid state:

6. Disable flashback and drop restore point:

Once confirmed that upgrade is successfully, then disable the flashback mode and drop the restore point;

2 thoughts on “Upgrade database from 11g to 12c using DBUA”

Leave a Reply

Your email address will not be published. Required fields are marked *

Skip to toolbar