Site icon IT Tutorial

How to Upgrade Oracle Database 11g to Oracle 12c using DBUA

Hi,

I will explain how to upgrade Oracle Database from Oracle 11g to Oracle 12c in this article.

 

 

Read previous article to learn Oracle database upgrade methods.

Oracle Database Upgrade Guide and How to Upgrade Oracle Database

 

 

 

I have chosen DBUA ( Database Upgrade Assistant ) in this upgrade.

Before upgrade, connect to the Oracle 11g database  and query the database name and version as follows.

I’ll show you new version after the upgrade is completed.

 

bash-4.1$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sun Nov 17 10:07:24 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
POCDB
SQL> select version from v$instance;
VERSION
-----------------
11.2.0.4.0
SQL>





Read following article to install Oracle 12c software. I won’t explain how to install Oracle database 12c software in this post.

Oracle Database 12c Step by Step Installation On Linux -3

 

 

After Oracle 12c Software Only installation is completed, then Set New Oracle 12c Profile. Content of Oracle 12c bash Profile is like following.

 

bash-4.1$ vim 12cProfile_db
ORACLE_HOSTNAME=Kuheylan; export ORACLE_HOSTNAME
ORACLE_BASE=/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/12.1.0.1; export ORACLE_HOME
ORACLE_SID=POCDB; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit - p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi



 

 

 

Step -1: Set 12cProfile_db Profile and execute dbua tool like following.

bash-4.1$ . 12cProfile_db
 bash-4.1$ dbua



Step -2: Choose Upgrade Oracle Database option.

 

 

 

 

Step -3: Select Database in this step.

 

Step -4:  Validations steps, Click Next.

 

 

 

 

Step -5:  This step is very important to specify options how to uprade.

1- In the First option, select parallelism count for upgrade. Here we need to determine the parallelism as the number of CPUs the server has.  Server CPU Count> = Parallel count.

2- Check ” Recompile invalid objects during post upgrade ” option and select 3 parallelism.

4- Gather stats before upgrade, If your database is very big, then you can unselect it.

 

 

 

 

Step -6:  If you have Custom SQL Scripts, type it in this step.

 

Step -7: You can Configure Enterprise manager Database Express or Register with Enterprise Manager Cloud control.

 

 

 

 

Step -8: Don’t select if you don’t move database files to new location.

 

Step -9:  Select listener like following.

 

 

 

Step -10: I have my own backup and restore strategy so I have chosen second option.

 

 

Step -11: Database upgrade summary step. You can check it before upgrade.

 

 

 

 

 

 

Step -12: Upgrade is completed without errors.

 

 

 

 

Step -13:  Connect to database and query version again.

bash-4.1$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.1.0 Production on Sun Nov 17 17:39:21 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
POCDB
SQL> select version from v$instance;
VERSION
-----------------
12.1.0.1.0
SQL>

 

 

If you want to learn Manual Upgrade method for Oracle 12c, you should read following article.

https://ittutorial.org/manual-upgrade-oracle-database-from-11-2-0-4-to-12-2-0-1-without-dbua/

 

 

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

https://ittutorial.org/oracle-database-19c-tutorials-for-beginners/

Exit mobile version