Upgrade Oracle
11.2.0.4 database to 12.1.0.2
For all detail
information on Oracle database upgrade, you can refer to Oracle's upgrade
document.
(Doc ID 1152016.1)
Master Note For Oracle Database Upgrades and Migrations
I am using here dbua to upgrade, the most simple and easy way to upgrade an Oracle database.
Source :
Oracle Home: /u02/app/oracle/product/11.2.0/db_1
Release: 11.2.0.4.0
Db Name: LONDON
Target :
Oracle Home: /u03/app/oracle/product/12.1.0/db_1
Release: 12.1.0.2
Db Name: LONDON
Overall steps:
- Install Oracle 12c (software only) in
new Oracle Home.
- Backup Oracle 11g database. (this can
be done from dbua also)
- Check registry components and invalid
objects.
- Stop 11g listener.
- Change ORACLE_HOME to new home
- Create new Oracle 12c listener for new
home. (this can be done from dbua as well)
- Copy and Run preupgrade scripts
- Run DBUA from new Oracle home
- Verify the upgraded database
1. Install Oracle 12c
(software only) in new Oracle Home
Installed in
/u03/app/oracle/product/12.1.0/db_1
- Backup Oracle 11g database (this can be done
from dbua also)
I
have taken RMAN level 0 backup of database LONDON .
[oracle@testing backup]$ ls
/u02/backup
log
LONDON_Arch_00:59:15-10-27-2016_0frjcbr4_1_15
LONDON_Arch_00:59:15-10-27-2016_0irjcbsh_1_18
LONDON_FULL_00:59:15-10-27-2016_0grjcbrb_1_16
LONDON_FULL_00:59:15-10-27-2016_0hrjcbse_1_17
LONDON_spfile_00:59:15-10-27-2016_0jrjcbsi_1_19
rman
[oracle@testing rman]$ ls
/u02/backup/rman
ctl_c-2270880098-20161027-01
[oracle@testing rman]$ ls
/u02/backup/log
LONDON_FULL_DISK_00:59:15-10-27-2016.log
- Check registry components and invalid objects
SQL> select * from
registry$history;
ACTION_TIME ACTION NAMESPACE
VERSION ID COMMENTS BUNDLE_SER
------------------------------
---------- ---------- ---------- ---------- -------------------- ----------
- Stop 11g listener
- Change ORACLE_HOME to new home
- Create new Oracle 12c listener for new home.
(this can be done from dbua as well)
- Copy and Run 12c Preupgrade script from 11g
home.
We
have to copy preupgrd.sql and utluppkg.sql from 12c home to temporary location.
Preupgrade results.
Please review preupgrade.log.
If any lapse, you can
execute preupgrade_fixups.sql.
Once preupgrade.log has
been reviewed, we can proceed.
- Run dbua from new Oracle home.
Launch dbua from new
Oracle Home. Database should be in ope mode throughout the upgrade.
[oracle@testing ~]$ cd
/u03/app/oracle/product/12.1.0/db_1/bin
[oracle@testing bin]$ ./dbua
You can either move
database files or keep at same old place.
You can select
listeners for new Oracle Home.
After all selection, summary
of upgrade will pop up to confirm.
dbua will show you
upgrade status and progress throughout the upgrade.
- Verify the Upgraded database.
Once finished, you can
see the Upgrade details window to see summary of upgrade steps. You can review
the upgrade log to check any failure.
As you can see all are
successful. So we can relax.
Upgrade is finished. We
can check our database in new version.
/etc/oratab is updated.
Database version has
been changed.
Currently database
compatible parameter has not been changed. Once you are confirmed, all are ok,
you can change compatible parameter to 12.1.0
[oracle@testing ~]$ cat /etc/oratab
|grep LONDON
LONDON:/u03/app/oracle/product/12.1.0/db_1:N
col host_name for a20
select host_name, instance_name,
database_status, instance_role, version from v$instance;
SQL>
HOST_NAME INSTANCE_NAME DATABASE_STATUS INSTANCE_ROLE VERSION
-------------------- ----------------
----------------- ------------------ -----------------
testing.localdomain LONDON ACTIVE PRIMARY_INSTANCE 12.1.0.2.0
SQL> select * from v$version;
BANNER
CON_ID
--------------------------------------------------------------------------------
----------
Oracle Database 12c Enterprise Edition
Release 12.1.0.2.0 - 64bit Production 0
PL/SQL Release 12.1.0.2.0 -
Production 0
CORE
12.1.0.2.0 Production
0
TNS for Linux: Version 12.1.0.2.0 -
Production 0
NLSRTL Version 12.1.0.2.0 -
Production
0
SQL> select comp_name, comp_id,
version, status from dba_registry;
COMP_NAME COMP_ID VERSION STATUS
----------------------------------------
-------------------- ------------------------------ -----------
Oracle Application Express APEX 4.2.5.00.08 VALID
OWB OWB 11.2.0.4.0 VALID
OLAP Catalog AMD 11.2.0.4.0 OPTION OFF
Spatial SDO 12.1.0.2.0 VALID
Oracle Multimedia ORDIM 12.1.0.2.0 VALID
Oracle XML Database XDB 12.1.0.2.0 VALID
Oracle Text CONTEXT 12.1.0.2.0 VALID
Oracle Workspace Manager OWM 12.1.0.2.0 VALID
Oracle Database Catalog Views CATALOG 12.1.0.2.0 VALID
Oracle Database Packages and
Types CATPROC 12.1.0.2.0 VALID
JServer JAVA Virtual Machine JAVAVM 12.1.0.2.0 VALID
Oracle XDK XML 12.1.0.2.0 VALID
Oracle Database Java Packages CATJAVA 12.1.0.2.0 VALID
OLAP Analytic Workspace APS 12.1.0.2.0 VALID
Oracle OLAP API XOQ 12.1.0.2.0 VALID
SQL> select count(*) from
dba_objects where status = 'INVALID';
COUNT(*)
----------
0
[oracle@testing bin]$
$ORACLE_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version
12.1.0.1.3
Copyright (c) 2016, Oracle
Corporation. All rights reserved.
Oracle Home : /u03/app/oracle/product/12.1.0/db_1
Central Inventory :
/u02/app/oraInventory
from :
/u03/app/oracle/product/12.1.0/db_1/oraInst.loc
OPatch version : 12.1.0.1.3
OUI version : 12.1.0.2.0
Log file location :
/u03/app/oracle/product/12.1.0/db_1/cfgtoollogs/opatch/opatch2016-10-31_15-21-00PM_1.log
Lsinventory Output file location :
/u03/app/oracle/product/12.1.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2016-10-31_15-21-00PM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 12c
12.1.0.2.0
There are 1 products installed in this
Oracle Home.
There are no Interim patches installed
in this Oracle Home.
--------------------------------------------------------------------------------
OPatch succeeded.
No comments:
Post a Comment
Leave a Reply...