Upgrade database from 11g to 12c

Step by Step Procedure to update Oracle Database 11gR2 to 12cR1

There are different ways of upgrading to the latest release of Oracle database and Oracle provides multiple methods to upgrade. Few are listed below:

1)Database Upgrade Assistant (DBUA)
2)Manual Upgrade
3)Transportable Tablespaces
4)Datapump export/import
5)Oracle Streams
6)Oracle GoldenGate

Now, am Upgrading the database using DBUA as it the simplest and quickest way of all.

Here, my machine details are as follows…

Platform : OEL 5.7 (64 bit)

Database : 11.2.0.3 (64 bit)

Before starting the upgradation process, take the complete backup of database

1)Take cold backup of 11.2.0.3 database

[oracle@dns ~]$ cd $ORACLE_BASE
[oracle@dns oracle]$ ls
admin cfgtoollogs checkpoints diag fast_recovery_area oradata product
[oracle@dns oracle]$ cd oradata/
[oracle@dns oradata]$ ls
PROD
[oracle@dns oradata]$ cd PROD/
[oracle@dns PROD]$ ls
control01.ctl redo01.log redo03.log system01.dbf undotbs01.dbf
example01.dbf redo02.log sysaux01.dbf temp01.dbf users01.dbf
[oracle@dns PROD]$ cd ..
[oracle@dns oradata]$ ls
PROD
[oracle@dns oradata]$ cp -R PROD/ PROD_backup

2)Stop the Listener

[oracle@dns admin]$ lsnrctl stop PROD

LSNRCTL for Linux: Version 11.2.0.3.0 – Production on 04-JUL-2013 13:59:55
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dns.oracle.com)(PORT=1521)))
The command completed successfully

3)Create directory structure for 12c ORACLE_HOME

[oracle@dns product]$ mkdir -p /u01/app/oracle/product/12.1.0

4)export ORACLE_HOME to 12c

[oracle@dns 12.1.0]$ export ORACLE_HOME=/u01/app/oracle/product/12.1.0

5)Copy ( winscp or scp ) 12c software to /home/oracle

6)Launch Oracle 12c runinstaller

[oracle@dns database]$ pwd

/home/oracle/database
[oracle@dns database]$ ls
install response rpm runInstaller sshsetup stage welcome.html

Note: open new terminal & run xhost + command as a root user before running ./runInstaller 

[oracle@dns database]$ ./runInstaller

1-11gto12c1

Uncheck “I Wish to receive security updates via My oracle support” and click Next1-11gto12c2

Click Yes1-11gto12c3

Select “Skip Software Updates” and click Next1-11gto12c4

select “Upgrade an existing database” and click Next1-11gto12c5

Select your language and click Next1-11gto12c6

Select “Enterprise Edition” and click Next1-11gto12c7

Fill the details for ORACLE_BASE and software location and click Next
1-11gto12c8

Select the OSOPER grouop (Optional) and click Next
1-11gto12c9

If you satisfy with the summary click Next
1-11gto12c10

Now Oracle Database 12c installation starts 1-11gto12c11

Run the scripts as root user

[root@dns ~]# /u01/app/oracle/product/12.1.0/root.sh
Performing root user operation for Oracle 12c

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/12.1.0

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file “dbhome” already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file “oraenv” already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file “coraenv” already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

Click ok after completion of running that script
1-11gto12c12

Click Next1-11gto12c13

Fill the Listener Name and click Next1-11gto12c14

Click Next
1-11gto12c15

Select the port number and click Next1-11gto12c16

Click Next1-11gto12c17

Click Next1-11gto12c18

Select No and click Next
1-11gto12c19

Click Finish1-11gto12c20

Now DBUA ( Database Upgrade Assistant ) starts

Select “Upgrade Oracle Database” and click Next1-11gto12c21

Click Next1-11gto12c22

click on that “Pre Upgrade Utility Checks” – severiy 1-11gto12c23

You might see this error, safely ignore this error becuase this is a test machine.1-11gto12c24

Choose Ignore from Action menu and click Next
1-11gto12c25

Check the file locations and click Next
1-11gto12c26

Select “Configure Enterprise Manager (EM) Database Express and click Next1-11gto12c27

Click Next1-11gto12c28

Select listener and click Next1-11gto12c29

Choose ” I have my own backup and restore strategy” and click Next
1-11gto12c30

Click Finish1-11gto12c31

Oracle Database upgrade in progress,

Pre Upgrade steps will complete in seconds but Database Upgrades Steps takes atleast 90 min of time based on your machine performance and post upgrade steps will take just 5 mins.
1-11gto12c32

After finishing all upgradation steps click on “Upgrade Results”
1-11gto12c33

click “close”
1-11gto12c34

After successfully completion of upgradation click “close”
1-11gto12c35

 Oracle Database upgradation from 11g to 12c completed successfully.

Check it out the version of the upgraded database

[oracle@dns database]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 4 21:07:50 2013

Copyright (c) 1982, 2011, 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 banner from v$version;

BANNER
——————————————————————————–
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 – 64bit Production
PL/SQL Release 12.1.0.1.0 – Production
CORE 12.1.0.1.0 Production
TNS for Linux: Version 12.1.0.1.0 – Production
NLSRTL Version 12.1.0.1.0 – Production

 

Hope it helps……

 

Nagulu Polagani

"We are all apprentices in a craft where no one ever becomes a master."

Latest posts by Nagulu Polagani (see all)