Skip to content

Insight and analysis of technology and business strategy

How to Upgrade from 11.1.0.7 to 11.2.0.3 on Linux

Part I - Installing and patching the software

Occasionally during our regular DBA tasks, we get a client request or simply notice the need and actually suggest an upgrade of a particular RDBMS, GI, OMS, or any other Oracle product. My actual, and I believe the most common, approach is to first search through the official Oracle documentation to try finding step-by-step procedures for what we need. Well that all sounds nice, and we definitely need to look at the documentation no matter how often we do such upgrades, patch or do any other action. However, I was never able to find a specific step-by-step guide simply because of the jumps from page to page. I eventually get lost in all the information gathered while reviewing such documentation.

Tired of that, I now usually try making my own manuals at the end of such actions. This way, reviewing the documentation and preparing the actual action plan can be less confusing and time consuming.


Recently, I was upgrading a database from 11.1.0.7 to the current 11.2.0.3 version. The database was using ASM, but I should notify at the beginning that the configuration is for a Stand-Alone Server and not RAC. Basically, the first things to be done for this procedure are:

- Check the certification of Oracle 11gR2 with your Platform/Operating system before downloading and installing Oracle 11gR2.
- Download and install Oracle 11g Release 2 in a new Oracle Home.
- Install the latest available Patchset from Metalink (if available).
- Install the latest opatch available for your platform and database version (if available).
- Install the latest available Critical Patch Update (if available).
- Either take a Cold or Hot backup of your source database (advisable to have cold backup).

All my work was actually performed by following these links:

- https://www.oracle.com/us/support/library/lifetime-support-technology-069183.pdf
- Complete Checklist for Manual Upgrades to 11gR2 [ID 837570.1]
- https://docs.oracle.com/cd/E11882_01/install.112/e24322/pre_install.htm#BABCFBDG

The 10 first pre-checks that need to be done are the following:

1.) Check for the existing active database version and use the compatibility matrix to check the minimum version of the database if it can be directly upgraded to Oracle 11g Release 2 (11.2) - 11.1.0.6 or higher can be directly upgraded to 11.2.x.

SQL> select * from v$version;

2.) Check the phisical memory - at least 256 MB of RAM is required.

grep MemTotal /proc/meminfo

3.) Check the swap space:

grep SwapTotal /proc/meminfo

The following describes the relationship between installed RAM and the configured swap space recommendation:

Between 0 MB and 256 MB - 3 times the size of RAM
Between 256 MB and 512 MB - 2 times the size of RAM
Between 512 MB and 2 GB - 1.5 times the size of RAM
Between 2 GB and 16 GB - Equal to the size of RAM
More than 16 GB - 16 GB

4.) Check the system architecture to verify that the processor architecture matches the Oracle software release to install – you will need to download and install the software matching that architecture.

uname -m

5.) Check for the amount of space available in the /tmp directory (/tmp directory needs to have minimum 400MB free).

df -k /tmp

6.) Check the amount of free disk space available. The disk space requirement is 1.38 GB, but it is a good thing to have extra space, considering you might want to install RDBMS and GI, have enough room for diagnostic files, and so on.

df -k

7.) Check the operation system version - use this link to determine if the OS matches the requirements:

uname -a
cat /etc/redhat-release

8.) Check the OS Kernel - use this link to determine if the kernel matches the requirements:

uname -r

9.) Check the OS Package Requirements - use this link to determine if the packages meet the requirements.

rpm -qa --qf "%{NAME}-%{VERSION}-%{RELEASE}_%{ARCH}.rpm %{INSTALLTIME:date}\n" | grep part_of_package_name

10.) Check if the required Oracle user and DBA group exist.

id oracle

Once we have confirmed that all the prerequisites are met, we can download the installation files on the server where we plan to install the new software. As I mentioned at the beginning, the database I am about to upgrade is a standalone, but it uses ASM. The major thing here that we need to pay attention to is that in 11gR2, ASM is included as part of the 11gR2 Grid Infrastructure software. To upgrade the ASM, we need to install the 11gR2 Grid Infrastructure software because ASM is no longer part of the database software as was the case until 11gR1. The path we are going to take now is:

1) Install Grid Infrastructure software only.
2) Install RDBMS software only.
3) Patch both GI and RDBMS with the latest PSU and CPU.
4) Upgrade the ASM to 11.2.0.3.
5) Upgrade the database to 11.2.0.3.

Once the installation files are downloaded and unzipped, we can start with installation.

NOTE: To download the RDBMS and GI installation software, I used the first three zip files recommended
by MOS:

- Connect to MOS -> Patches & Updates -> Product or Family (Advanced) :
o Product:Oracle Database;
o Release: Oracle 11.2.0.3.0;
o Platform Linux x86-64;
o Type: Patchset
- From the suggested files download the:
o p10404530_112030_Linux-x86-64_1of7.zip
o p10404530_112030_Linux-x86-64_2of7.zip
o p10404530_112030_Linux-x86-64_3of7.zip
- Using the Recommended Patch advisor from MOS downloaded the:
o p13696251_112030_Linux-x86-64.zip

Going through the documentation and other blogs and posts, I noticed that every procedure was using the OUI for this upgrades/installations in graphic mode. Given the complex security protocols we are facing when accessing our client's servers, it is sometimes difficult to configure xforwarding, so we usually use the silent method for such installations and upgrades. Here I will present the silent method. For the silent installation, we first need to create a response file. I used the templates that come with the installation files and filled out the necessary information. As an example, I give you both response files:

1. Response file for installing the grid infrastructure software - grid_install_25052012_2.rsp

###############################################################################
## Copyright(c) Oracle Corporation 1998,2011. All rights reserved. ##
## ##
## Specify values for the variables listed below to customize ##
## your installation. ##
## ##
## Each variable is associated with a comment. The comment ##
## can help to populate the variables with the appropriate ##
## values. ##
## ##
## IMPORTANT NOTE: This file contains plain text passwords and ##
## should be secured to have read permission only by oracle user ##
## or db administrator who owns this installation. ##
## ##
###############################################################################

###############################################################################
## ##
## Instructions to fill this response file ##
## To install and configure 'Grid Infrastructure for Cluster' ##
## - Fill out sections A,B,C,D,E,F and G ##
## - Fill out section G if OCR and voting disk should be placed on ASM ##
## ##
## To install and configure 'Grid Infrastructure for Standalone server' ##
## - Fill out sections A,B and G ##
## ##
## To install software for 'Grid Infrastructure' ##
## - Fill out sections A,B and C ##
## ##
## To upgrade clusterware and/or Automatic storage management of earlier ##
## releases ##
## - Fill out sections A,B,C,D and H ##
## ##
###############################################################################
#------------------------------------------------------------------------------
# Do not change the following system generated value.
#------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v11_2_0

###############################################################################
# #
# SECTION A - BASIC #
# #
###############################################################################

#-------------------------------------------------------------------------------
# Specify the hostname of the system as set during the install. It can be used
# to force the installation to use an alternative hostname rather than using the
# first hostname found on the system. (e.g., for systems with multiple hostnames
# and network interfaces)
#-------------------------------------------------------------------------------
ORACLE_HOSTNAME=test_machine

#-------------------------------------------------------------------------------
# Specify the location which holds the inventory files.
# This is an optional parameter if installing on
# Windows based Operating System.
#-------------------------------------------------------------------------------
INVENTORY_LOCATION=/u01/app/oraInventory

#-------------------------------------------------------------------------------
# Specify the languages in which the components will be installed.
#
# en : English ja : Japanese
# fr : French ko : Korean
# ar : Arabic es : Latin American Spanish
# bn : Bengali lv : Latvian
# pt_BR: Brazilian Portuguese lt : Lithuanian
# bg : Bulgarian ms : Malay
# fr_CA: Canadian French es_MX: Mexican Spanish
# ca : Catalan no : Norwegian
# hr : Croatian pl : Polish
# cs : Czech pt : Portuguese
# da : Danish ro : Romanian
# nl : Dutch ru : Russian
# ar_EG: Egyptian zh_CN: Simplified Chinese
# en_GB: English (Great Britain) sk : Slovak
# et : Estonian sl : Slovenian
# fi : Finnish es_ES: Spanish
# de : German sv : Swedish
# el : Greek th : Thai
# iw : Hebrew zh_TW: Traditional Chinese
# hu : Hungarian tr : Turkish
# is : Icelandic uk : Ukrainian
# in : Indonesian vi : Vietnamese
# it : Italian
#
# all_langs : All languages
#
# Specify value as the following to select any of the languages.
# Example : SELECTED_LANGUAGES=en,fr,ja
#
# Specify value as the following to select all the languages.
# Example : SELECTED_LANGUAGES=all_langs
#-------------------------------------------------------------------------------
SELECTED_LANGUAGES=en

#-------------------------------------------------------------------------------
# Specify the installation option.
# Allowed values: CRS_CONFIG or HA_CONFIG or UPGRADE or CRS_SWONLY
# CRS_CONFIG - To configure Grid Infrastructure for cluster
# HA_CONFIG - To configure Grid Infrastructure for stand alone server
# UPGRADE - To upgrade clusterware software of earlier release
# CRS_SWONLY - To install clusterware files only (can be configured for cluster
# or stand alone server later)
#-------------------------------------------------------------------------------
oracle.install.option=CRS_SWONLY

#-------------------------------------------------------------------------------
# Specify the complete path of the Oracle Base.
#-------------------------------------------------------------------------------
ORACLE_BASE=/u01/app/oracle

#-------------------------------------------------------------------------------
# Specify the complete path of the Oracle Home.
#-------------------------------------------------------------------------------
ORACLE_HOME=/u01/app/11.2.0/grid

################################################################################
# #
# SECTION B - GROUPS #
# #
# The following three groups need to be assigned for all GI installations. #
# OSDBA and OSOPER can be the same or different. OSASM must be different #
# than the other two. #
# The value to be specified for OSDBA, OSOPER and OSASM group is only for #
# Unix based Operating System. #
# #
################################################################################
#-------------------------------------------------------------------------------
# The DBA_GROUP is the OS group which is to be granted OSDBA privileges.
#-------------------------------------------------------------------------------
oracle.install.asm.OSDBA=dba

#-------------------------------------------------------------------------------
# The OPER_GROUP is the OS group which is to be granted OSOPER privileges.
# The value to be specified for OSOPER group is optional.
#-------------------------------------------------------------------------------
oracle.install.asm.OSOPER=dba

#-------------------------------------------------------------------------------
# The OSASM_GROUP is the OS group which is to be granted OSASM privileges. This
# must be different than the previous two.
#-------------------------------------------------------------------------------
oracle.install.asm.OSASM=dba

################################################################################
# #
# SECTION C - SCAN #
# #
################################################################################
#-------------------------------------------------------------------------------
# Specify a name for SCAN
#-------------------------------------------------------------------------------
oracle.install.crs.config.gpnp.scanName=

#-------------------------------------------------------------------------------
# Specify a unused port number for SCAN service
#-------------------------------------------------------------------------------
oracle.install.crs.config.gpnp.scanPort=

################################################################################
# #
# SECTION D - CLUSTER & GNS #
# #
################################################################################
#-------------------------------------------------------------------------------
# Specify a name for the Cluster you are creating.
#
# The maximum length allowed for clustername is 15 characters. The name can be
# any combination of lower and uppercase alphabets (A - Z), (0 - 9), hyphen(-)
# and underscore(_).
#-------------------------------------------------------------------------------
oracle.install.crs.config.clusterName=

#-------------------------------------------------------------------------------
# Specify 'true' if you would like to configure Grid Naming Service(GNS), else
# specify 'false'
#-------------------------------------------------------------------------------
oracle.install.crs.config.gpnp.configureGNS=false

#-------------------------------------------------------------------------------
# Applicable only if you choose to configure GNS
# Specify the GNS subdomain and an unused virtual hostname for GNS service
# Additionally you may also specify if VIPs have to be autoconfigured
#
# Value for oracle.install.crs.config.autoConfigureClusterNodeVIP should be true
# if GNS is being configured(oracle.install.crs.config.gpnp.configureGNS), false
# otherwise.
#-------------------------------------------------------------------------------
oracle.install.crs.config.gpnp.gnsSubDomain=
oracle.install.crs.config.gpnp.gnsVIPAddress=
oracle.install.crs.config.autoConfigureClusterNodeVIP=

#-------------------------------------------------------------------------------
# Specify a list of public node names, and virtual hostnames that have to be
# part of the cluster.
#
# The list should a comma-separated list of nodes. Each entry in the list
# should be a colon-separated string that contains 2 fields.
#
# The fields should be ordered as follows:
# 1. The first field is for public node name.
# 2. The second field is for virtual host name
# (specify as AUTO if you have chosen 'auto configure for VIP'
# i.e. autoConfigureClusterNodeVIP=true)
#
# Example: oracle.install.crs.config.clusterNodes=node1:node1-vip,node2:node2-vip
#-------------------------------------------------------------------------------
oracle.install.crs.config.clusterNodes=

#-------------------------------------------------------------------------------
# The value should be a comma separated strings where each string is as shown below
# InterfaceName:SubnetMask:InterfaceType
# where InterfaceType can be either "1", "2", or "3"
# (1 indicates public, 2 indicates private, and 3 indicates the interface is not used)
#
# For example: eth0:140.87.24.0:1,eth1:10.2.1.0:2,eth2:140.87.52.0:3
#
#-------------------------------------------------------------------------------
oracle.install.crs.config.networkInterfaceList=

################################################################################
# #
# SECTION E - STORAGE #
# #
################################################################################

#-------------------------------------------------------------------------------
# Specify the type of storage to use for Oracle Cluster Registry(OCR) and Voting
# Disks files
# - ASM_STORAGE
# - FILE_SYSTEM_STORAGE
#-------------------------------------------------------------------------------
oracle.install.crs.config.storageOption=

#-------------------------------------------------------------------------------
# THIS PROPERTY NEEDS TO BE FILLED ONLY IN CASE OF WINDOWS INSTALL.
# Specify a comma separated list of strings where each string is as shown below:
# Disk Number:Partition Number:Drive Letter:Format Option
# The Disk Number and Partition Number should refer to the location which has to
# be formatted. The Drive Letter should refer to the drive letter that has to be
# assigned. "Format Option" can be either of the following -
# 1. SOFTWARE - Format to place software binaries.
# 2. DATA - Format to place the OCR/VDSK files.
#
# For example: 1:2:P:DATA,1:3:Q:SOFTWARE,1:4:R:DATA,1:5:S:DATA
#
#-------------------------------------------------------------------------------
oracle.install.crs.config.sharedFileSystemStorage.diskDriveMapping=

#-------------------------------------------------------------------------------
# These properties are applicable only if FILE_SYSTEM_STORAGE is chosen for
# storing OCR and voting disk
# Specify the location(s) and redundancy for OCR and voting disks
# In case of windows, mention the drive location that is specified to be
# formatted for DATA in the above property.
# Multiple locations can be specified, separated by commas
# Redundancy can be one of these:
# EXTERNAL - one(1) location should be specified for OCR and voting disk
# NORMAL - three(3) locations should be specified for OCR and voting disk
# Example:
# For Unix based Operating System:
# oracle.install.crs.config.sharedFileSystemStorage.votingDiskLocations=/oradbocfs/storage/vdsk1,/oradbocfs/storage/vdsk2,/oradbocfs/storage/vdsk3
# oracle.install.crs.config.sharedFileSystemStorage.ocrLocations=/oradbocfs/storage/ocr1,/oradbocfs/storage/ocr2,/oradbocfs/storage/ocr3
# For Windows based Operating System:
# oracle.install.crs.config.sharedFileSystemStorage.votingDiskLocations=P:\vdsk1,R:\vdsk2,S:\vdsk3
# oracle.install.crs.config.sharedFileSystemStorage.ocrLocations=P:\ocr1,R:\ocr2,S:\ocr3
#-------------------------------------------------------------------------------
oracle.install.crs.config.sharedFileSystemStorage.votingDiskLocations=
oracle.install.crs.config.sharedFileSystemStorage.votingDiskRedundancy=NORMAL
oracle.install.crs.config.sharedFileSystemStorage.ocrLocations=
oracle.install.crs.config.sharedFileSystemStorage.ocrRedundancy=NORMAL

################################################################################
# #
# SECTION F - IPMI #
# #
################################################################################

#-------------------------------------------------------------------------------
# Specify 'true' if you would like to configure Intelligent Power Management interface
# (IPMI), else specify 'false'
#-------------------------------------------------------------------------------
oracle.install.crs.config.useIPMI=false

#-------------------------------------------------------------------------------
# Applicable only if you choose to configure IPMI
# i.e. oracle.install.crs.config.useIPMI=true
# Specify the username and password for using IPMI service
#-------------------------------------------------------------------------------
oracle.install.crs.config.ipmi.bmcUsername=
oracle.install.crs.config.ipmi.bmcPassword=

################################################################################
# #
# SECTION G - ASM #
# #
################################################################################
#-------------------------------------------------------------------------------
# Specify a password for SYSASM user of the ASM instance
#-------------------------------------------------------------------------------
oracle.install.asm.SYSASMPassword=

#-------------------------------------------------------------------------------
# The ASM DiskGroup
#
# Example: oracle.install.asm.diskGroup.name=data
#
#-------------------------------------------------------------------------------
oracle.install.asm.diskGroup.name=

#-------------------------------------------------------------------------------
# Redundancy level to be used by ASM.
# It can be one of the following
# - NORMAL
# - HIGH
# - EXTERNAL
# Example: oracle.install.asm.diskGroup.redundancy=NORMAL
#
#-------------------------------------------------------------------------------
oracle.install.asm.diskGroup.redundancy=NORMAL

#-------------------------------------------------------------------------------
# Allocation unit size to be used by ASM.
# It can be one of the following values
# 1
# 2
# 4
# 8
# 16
# Example: oracle.install.asm.diskGroup.AUSize=4
# size unit is MB
#
#-------------------------------------------------------------------------------
oracle.install.asm.diskGroup.AUSize=1

#-------------------------------------------------------------------------------
# List of disks to create a ASM DiskGroup
#
# Example:
# For Unix based Operating System:
# oracle.install.asm.diskGroup.disks=/oracle/asm/disk1,/oracle/asm/disk2
# For Windows based Operating System:
# oracle.install.asm.diskGroup.disks=\\.\ORCLDISKDATA0,\\.\ORCLDISKDATA1
#
#-------------------------------------------------------------------------------
oracle.install.asm.diskGroup.disks=

#-------------------------------------------------------------------------------
# The disk discovery string to be used to discover the disks used create a ASM DiskGroup
#
# Example:
# For Unix based Operating System:
# oracle.install.asm.diskGroup.diskDiscoveryString=/oracle/asm/*
# For Windows based Operating System:
# oracle.install.asm.diskGroup.diskDiscoveryString=\\.\ORCLDISK*
#
#-------------------------------------------------------------------------------
oracle.install.asm.diskGroup.diskDiscoveryString=

#-------------------------------------------------------------------------------
# oracle.install.asm.monitorPassword=password
#-------------------------------------------------------------------------------
oracle.install.asm.monitorPassword=

################################################################################
# #
# SECTION H - UPGRADE #
# #
################################################################################
#-------------------------------------------------------------------------------
# Specify nodes for Upgrade.
# For upgrade on Windows, installer overrides the value of this parameter to include
# all the nodes of the cluster. However, the stack is upgraded one node at a time.
# Hence, this parameter may be left blank for Windows.
# Example: oracle.install.crs.upgrade.clusterNodes=node1,node2
#-------------------------------------------------------------------------------
oracle.install.crs.upgrade.clusterNodes=

#-------------------------------------------------------------------------------
# For RAC-ASM only. oracle.install.asm.upgradeASM=true/false
# Value should be 'true' while upgrading Cluster ASM of version 11gR2(11.2.0.1.0) and above
#-------------------------------------------------------------------------------
oracle.install.asm.upgradeASM=false
#------------------------------------------------------------------------------
# Specify the auto-updates option. It can be one of the following:
# a.MYORACLESUPPORT_DOWNLOAD
# b.OFFLINE_UPDATES
# c.SKIP_UPDATES
#------------------------------------------------------------------------------
oracle.installer.autoupdates.option=

#------------------------------------------------------------------------------
# In case MYORACLESUPPORT_DOWNLOAD option is chosen, specify the location where
# the updates are to be downloaded.
# In case OFFLINE_UPDATES option is chosen, specify the location where the updates
# are present.
oracle.installer.autoupdates.downloadUpdatesLoc=

#------------------------------------------------------------------------------
# Specify the My Oracle Support Account Username which has the patches download privileges
# to be used for software updates.
#
# Example : AUTOUPDATES_MYORACLESUPPORT_USERNAME=abc@oracle.com
#------------------------------------------------------------------------------
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
#------------------------------------------------------------------------------
# Specify the My Oracle Support Account Username password which has the patches download privileges
# to be used for software updates.
#
# Example : AUTOUPDATES_MYORACLESUPPORT_PASSWORD=password
#------------------------------------------------------------------------------
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=

#------------------------------------------------------------------------------
# Specify the Proxy server name. Length should be greater than zero.
#
# Example : PROXY_HOST=proxy.domain.com
#------------------------------------------------------------------------------
PROXY_HOST=

#------------------------------------------------------------------------------
# Specify the proxy port number. Should be Numeric and atleast 2 chars.
#
# Example : PROXY_PORT=25
#------------------------------------------------------------------------------
PROXY_PORT=
#------------------------------------------------------------------------------
# Specify the proxy user name. Leave PROXY_USER and PROXY_PWD
# blank if your proxy server requires no authentication.
#
# Example : PROXY_USER=username
#------------------------------------------------------------------------------
PROXY_USER=
#------------------------------------------------------------------------------
# Specify the proxy password. Leave PROXY_USER and PROXY_PWD
# blank if your proxy server requires no authentication.
#
# Example : PROXY_PWD=password
#------------------------------------------------------------------------------
PROXY_PWD=

#------------------------------------------------------------------------------
# Specify the proxy realm.
#
# Example : PROXY_REALM=metalink
#------------------------------------------------------------------------------
PROXY_REALM=

2. Response file for installing the RDBMS software - db_install.rsp

####################################################################
## Copyright(c) Oracle Corporation 1998,2011. All rights reserved.##
## ##
## Specify values for the variables listed below to customize ##
## your installation. ##
## ##
## Each variable is associated with a comment. The comment ##
## can help to populate the variables with the appropriate ##
## values. ##
## ##
## IMPORTANT NOTE: This file contains plain text passwords and ##
## should be secured to have read permission only by oracle user ##
## or db administrator who owns this installation. ##
## ##
####################################################################

#------------------------------------------------------------------------------
# Do not change the following system generated value.
#------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0

#------------------------------------------------------------------------------
# Specify the installation option.
# It can be one of the following:
# 1. INSTALL_DB_SWONLY
# 2. INSTALL_DB_AND_CONFIG
# 3. UPGRADE_DB
#-------------------------------------------------------------------------------
oracle.install.option=INSTALL_DB_SWONLY

#-------------------------------------------------------------------------------
# Specify the hostname of the system as set during the install. It can be used
# to force the installation to use an alternative hostname rather than using the
# first hostname found on the system. (e.g., for systems with multiple hostnames
# and network interfaces)
#-------------------------------------------------------------------------------
ORACLE_HOSTNAME=test_machine

#-------------------------------------------------------------------------------
# Specify the Unix group to be set for the inventory directory.
#-------------------------------------------------------------------------------
UNIX_GROUP_NAME=dba

#-------------------------------------------------------------------------------
# Specify the location which holds the inventory files.
# This is an optional parameter if installing on
# Windows based Operating System.
#-------------------------------------------------------------------------------
INVENTORY_LOCATION=

#-------------------------------------------------------------------------------
# Specify the languages in which the components will be installed.
#
# en : English ja : Japanese
# fr : French ko : Korean
# ar : Arabic es : Latin American Spanish
# bn : Bengali lv : Latvian
# pt_BR: Brazilian Portuguese lt : Lithuanian
# bg : Bulgarian ms : Malay
# fr_CA: Canadian French es_MX: Mexican Spanish
# ca : Catalan no : Norwegian
# hr : Croatian pl : Polish
# cs : Czech pt : Portuguese
# da : Danish ro : Romanian
# nl : Dutch ru : Russian
# ar_EG: Egyptian zh_CN: Simplified Chinese
# en_GB: English (Great Britain) sk : Slovak
# et : Estonian sl : Slovenian
# fi : Finnish es_ES: Spanish
# de : German sv : Swedish
# el : Greek th : Thai
# iw : Hebrew zh_TW: Traditional Chinese
# hu : Hungarian tr : Turkish
# is : Icelandic uk : Ukrainian
# in : Indonesian vi : Vietnamese
# it : Italian
#
# all_langs : All languages
#
# Specify value as the following to select any of the languages.
# Example : SELECTED_LANGUAGES=en,fr,ja
#
# Specify value as the following to select all the languages.
# Example : SELECTED_LANGUAGES=all_langs
#------------------------------------------------------------------------------
SELECTED_LANGUAGES=en

#------------------------------------------------------------------------------
# Specify the complete path of the Oracle Home.
#------------------------------------------------------------------------------
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1

#------------------------------------------------------------------------------
# Specify the complete path of the Oracle Base.
#------------------------------------------------------------------------------
ORACLE_BASE=/u01/app/oracle

#------------------------------------------------------------------------------
# Specify the installation edition of the component.
#
# The value should contain only one of these choices.
# EE : Enterprise Edition
# SE : Standard Edition
# SEONE : Standard Edition One
# PE : Personal Edition (WINDOWS ONLY)
#------------------------------------------------------------------------------
oracle.install.db.InstallEdition=EE

#------------------------------------------------------------------------------
# This variable is used to enable or disable custom install and is considered
# only if InstallEdition is EE.
#
# true : Components mentioned as part of 'optionalComponents' property
# are considered for install.
# false : Value for 'optionalComponents' is not considered.
#------------------------------------------------------------------------------
oracle.install.db.EEOptionsSelection=false

#------------------------------------------------------------------------------
# This variable is considered only if 'EEOptionsSelection' is set to true.
#
# Description: List of Enterprise Edition Options you would like to enable.
#
# The following choices are available. You may specify any
# combination of these choices. The components you choose should
# be specified in the form "internal-component-name:version"
# Below is a list of components you may specify to enable.
#
# oracle.oraolap:11.2.0.3.0 - Oracle OLAP
# oracle.rdbms.dm:11.2.0.3.0 - Oracle Data Mining
# oracle.rdbms.dv:11.2.0.3.0 - Oracle Database Vault
# oracle.rdbms.lbac:11.2.0.3.0 - Oracle Label Security
# oracle.rdbms.partitioning:11.2.0.3.0 - Oracle Partitioning
# oracle.rdbms.rat:11.2.0.3.0 - Oracle Real Application Testing
#------------------------------------------------------------------------------
oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.3.0,oracle.oraolap:11.2.0.3.0,oracle.rdbms.dm:11.2.0.3.0,
oracle.rdbms.dv:11.2.0.3.0,oracle.rdbms.lbac:11.2.0.3.0,oracle.rdbms.rat:11.2.0.3.0

###############################################################################
# #
# PRIVILEGED OPERATING SYSTEM GROUPS #
# ------------------------------------------ #
# Provide values for the OS groups to which OSDBA and OSOPER privileges #
# needs to be granted. If the install is being performed as a member of the #
# group "dba", then that will be used unless specified otherwise below. #
# #
# The value to be specified for OSDBA and OSOPER group is only for UNIX based #
# Operating System. #
# #
###############################################################################

#------------------------------------------------------------------------------
# The DBA_GROUP is the OS group which is to be granted OSDBA privileges.
#------------------------------------------------------------------------------
oracle.install.db.DBA_GROUP=dba

#------------------------------------------------------------------------------
# The OPER_GROUP is the OS group which is to be granted OSOPER privileges.
# The value to be specified for OSOPER group is optional.
#------------------------------------------------------------------------------
oracle.install.db.OPER_GROUP=dba

#------------------------------------------------------------------------------
# Specify the cluster node names selected during the installation.
# Example : oracle.install.db.CLUSTER_NODES=node1,node2
#------------------------------------------------------------------------------
oracle.install.db.CLUSTER_NODES=

#------------------------------------------------------------------------------
# This variable is used to enable or disable RAC One Node install.
#
# true : Value of RAC One Node service name is used.
# false : Value of RAC One Node service name is not used.
#
# If left blank, it will be assumed to be false
#------------------------------------------------------------------------------
oracle.install.db.isRACOneInstall=

#------------------------------------------------------------------------------
# Specify the name for RAC One Node Service.
#------------------------------------------------------------------------------
oracle.install.db.racOneServiceName=

#------------------------------------------------------------------------------
# Specify the type of database to create.
# It can be one of the following:
# - GENERAL_PURPOSE/TRANSACTION_PROCESSING
# - DATA_WAREHOUSE
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.type=

#------------------------------------------------------------------------------
# Specify the Starter Database Global Database Name.
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.globalDBName=

#------------------------------------------------------------------------------
# Specify the Starter Database SID.
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.SID=

#------------------------------------------------------------------------------
# Specify the Starter Database character set.
#
# It can be one of the following:
# AL32UTF8, WE8ISO8859P15, WE8MSWIN1252, EE8ISO8859P2,
# EE8MSWIN1250, NE8ISO8859P10, NEE8ISO8859P4, BLT8MSWIN1257,
# BLT8ISO8859P13, CL8ISO8859P5, CL8MSWIN1251, AR8ISO8859P6,
# AR8MSWIN1256, EL8ISO8859P7, EL8MSWIN1253, IW8ISO8859P8,
# IW8MSWIN1255, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE,
# KO16MSWIN949, ZHS16GBK, TH8TISASCII, ZHT32EUC, ZHT16MSWIN950,
# ZHT16HKSCS, WE8ISO8859P9, TR8MSWIN1254, VN8MSWIN1258
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.characterSet=AL32UTF8

#------------------------------------------------------------------------------
# This variable should be set to true if Automatic Memory Management
# in Database is desired.
# If Automatic Memory Management is not desired, and memory allocation
# is to be done manually, then set it to false.
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.memoryOption=true

#------------------------------------------------------------------------------
# Specify the total memory allocation for the database. Value(in MB) should be
# at least 256 MB, and should not exceed the total physical memory available
# on the system.
# Example: oracle.install.db.config.starterdb.memoryLimit=512
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.memoryLimit=

#------------------------------------------------------------------------------
# This variable controls whether to load Example Schemas onto
# the starter database or not.
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.installExampleSchemas=false

#------------------------------------------------------------------------------
# This variable includes enabling audit settings, configuring password profiles
# and revoking some grants to public. These settings are provided by default.
# These settings may also be disabled.
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.enableSecuritySettings=true

###############################################################################
# #
# Passwords can be supplied for the following four schemas in the #
# starter database: #
# SYS #
# SYSTEM #
# SYSMAN (used by Enterprise Manager) #
# DBSNMP (used by Enterprise Manager) #
# #
# Same password can be used for all accounts (not recommended) #
# or different passwords for each account can be provided (recommended) #
# #
###############################################################################

#------------------------------------------------------------------------------
# This variable holds the password that is to be used for all schemas in the
# starter database.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.ALL=

#-------------------------------------------------------------------------------
# Specify the SYS password for the starter database.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.SYS=

#-------------------------------------------------------------------------------
# Specify the SYSTEM password for the starter database.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.SYSTEM=

#-------------------------------------------------------------------------------
# Specify the SYSMAN password for the starter database.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.SYSMAN=

#-------------------------------------------------------------------------------
# Specify the DBSNMP password for the starter database.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.DBSNMP=

#-------------------------------------------------------------------------------
# Specify the management option to be selected for the starter database.
# It can be one of the following:
# 1. GRID_CONTROL
# 2. DB_CONTROL
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.control=DB_CONTROL

#-------------------------------------------------------------------------------
# Specify the Management Service to use if Grid Control is selected to manage
# the database.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=

###############################################################################
# #
# SPECIFY BACKUP AND RECOVERY OPTIONS #
# ------------------------------------ #
# Out-of-box backup and recovery options for the database can be mentioned #
# using the entries below. #
# #
###############################################################################

#------------------------------------------------------------------------------
# This variable is to be set to false if automated backup is not required. Else
# this can be set to true.
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.automatedBackup.enable=false

#------------------------------------------------------------------------------
# Regardless of the type of storage that is chosen for backup and recovery, if
# automated backups are enabled, a job will be scheduled to run daily to backup
# the database. This job will run as the operating system user that is
# specified in this variable.
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.automatedBackup.osuid=

#-------------------------------------------------------------------------------
# Regardless of the type of storage that is chosen for backup and recovery, if
# automated backups are enabled, a job will be scheduled to run daily to backup
# the database. This job will run as the operating system user specified by the
# above entry. The following entry stores the password for the above operating
# system user.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.automatedBackup.ospwd=

#-------------------------------------------------------------------------------
# Specify the type of storage to use for the database.
# It can be one of the following:
# - FILE_SYSTEM_STORAGE
# - ASM_STORAGE
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.storageType=

#-------------------------------------------------------------------------------
# Specify the database file location which is a directory for datafiles, control
# files, redo logs.
#
# Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM_STORAGE
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=

#-------------------------------------------------------------------------------
# Specify the backup and recovery location.
#
# Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM_STORAGE
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=

#-------------------------------------------------------------------------------
# Specify the existing ASM disk groups to be used for storage.
#
# Applicable only when oracle.install.db.config.starterdb.storage=ASM_STORAGE
#-------------------------------------------------------------------------------
oracle.install.db.config.asm.diskGroup=

#-------------------------------------------------------------------------------
# Specify the password for ASMSNMP user of the ASM instance.
#
# Applicable only when oracle.install.db.config.starterdb.storage=ASM_STORAGE
#-------------------------------------------------------------------------------
oracle.install.db.config.asm.ASMSNMPPassword=

#------------------------------------------------------------------------------
# Specify the My Oracle Support Account Username.
#
# Example : MYORACLESUPPORT_USERNAME=abc@oracle.com
#------------------------------------------------------------------------------
MYORACLESUPPORT_USERNAME=

#------------------------------------------------------------------------------
# Specify the My Oracle Support Account Username password.
#
# Example : MYORACLESUPPORT_PASSWORD=password
#------------------------------------------------------------------------------
MYORACLESUPPORT_PASSWORD=

#------------------------------------------------------------------------------
# Specify whether to enable the user to set the password for
# My Oracle Support credentials. The value can be either true or false.
# If left blank it will be assumed to be false.
#
# Example : SECURITY_UPDATES_VIA_MYORACLESUPPORT=true
#------------------------------------------------------------------------------
SECURITY_UPDATES_VIA_MYORACLESUPPORT=

#------------------------------------------------------------------------------
# Specify whether user doesn't want to configure Security Updates.
# The value for this variable should be true if you don't want to configure
# Security Updates, false otherwise.
#
# The value can be either true or false. If left blank it will be assumed
# to be false.
#
# Example : DECLINE_SECURITY_UPDATES=false
#------------------------------------------------------------------------------
DECLINE_SECURITY_UPDATES=true

#------------------------------------------------------------------------------
# Specify the Proxy server name. Length should be greater than zero.
#
# Example : PROXY_HOST=proxy.domain.com
#------------------------------------------------------------------------------
PROXY_HOST=

#------------------------------------------------------------------------------
# Specify the proxy port number. Should be Numeric and atleast 2 chars.
#
# Example : PROXY_PORT=25
#------------------------------------------------------------------------------
PROXY_PORT=

#------------------------------------------------------------------------------
# Specify the proxy user name. Leave PROXY_USER and PROXY_PWD
# blank if your proxy server requires no authentication.
#
# Example : PROXY_USER=username
#------------------------------------------------------------------------------
PROXY_USER=

#------------------------------------------------------------------------------
# Specify the proxy password. Leave PROXY_USER and PROXY_PWD
# blank if your proxy server requires no authentication.
#
# Example : PROXY_PWD=password
#------------------------------------------------------------------------------
PROXY_PWD=

#------------------------------------------------------------------------------
# Specify the proxy realm. This value is used if auto-updates option is selected.
#
# Example : PROXY_REALM=metalink
#------------------------------------------------------------------------------
PROXY_REALM=

#------------------------------------------------------------------------------
# Specify the Oracle Support Hub URL.
#
# Example : COLLECTOR_SUPPORTHUB_URL=https://orasupporthub.company.com:8080/
#------------------------------------------------------------------------------
COLLECTOR_SUPPORTHUB_URL=

#------------------------------------------------------------------------------
# Specify the auto-updates option. It can be one of the following:
# a.MYORACLESUPPORT_DOWNLOAD
# b.OFFLINE_UPDATES
# c.SKIP_UPDATES
#------------------------------------------------------------------------------
oracle.installer.autoupdates.option=SKIP_UPDATES
#------------------------------------------------------------------------------
# In case MYORACLESUPPORT_DOWNLOAD option is chosen, specify the location where
# the updates are to be downloaded.
# In case OFFLINE_UPDATES option is chosen, specify the location where the updates
# are present.
oracle.installer.autoupdates.downloadUpdatesLoc=
#------------------------------------------------------------------------------
# Specify the My Oracle Support Account Username which has the patches download privileges
# to be used for software updates.
# Example : AUTOUPDATES_MYORACLESUPPORT_USERNAME=abc@oracle.com
#------------------------------------------------------------------------------
AUTOUPDATES_MYORACLESUPPORT_USERNAME=

#------------------------------------------------------------------------------
# Specify the My Oracle Support Account Username password which has the patches download privileges
# to be used for software updates.
#
# Example : AUTOUPDATES_MYORACLESUPPORT_PASSWORD=password
#------------------------------------------------------------------------------
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=

Now, the response files are prepared, and as you can see inside, you must have the ORACLE_HOME, ORACLE_BASE, and INVENTORY_LOCATION directory structure already in place and with the right ownership (oracle:dba in my case).
So now we are ready to start the installation of the software.
To install the software, you need to run the following commands:

1) To install the GI software, go to the directory where you have unzipped the grid installation software and run the following command. In my case that is:

cd /u02/backups/ora11gr2/11.2.0.3/grid/
./runInstaller -silent -responseFile /u02/backups/ora11gr2/11.2.0.3/grid/response/grid_install_25052012_2.rsp

2) To install the RDBMS software, go to the directory where you have unzipped the RDBMS installation software and run the following command. In my case that is:

cd /u02/backups/ora11gr2/11.2.0.3/database/
./runInstaller -silent -responseFile /u02/backups/ora11gr2/11.2.0.3/database/response/db_install.rsp

NOTE: With these commands, only The GI software and the RDBMS software will be installed. At the end of each installation you will notice from the logs that root.sh script is required to be executed, but we will leave that for now since that will be done for the actual upgrade steps.

The next step once the GI and RDBMS software is installed is to install the latest PSU on top. After the patch file is downloaded and unzipped locally on the machine, the key point that we need to consider here is that when applying a PSU, it is always recommended to review the README file first that comes with the downloaded patch. The README contains all the necessary information and shows how the patch is applied. According to that info, you can always adjust the steps that I am about to take to apply the patch. In my case, the procedure goes like this:

1) Check the opatch utility to see if it matches the required version to apply the patch. (This info can be found in the README text document.)

$ORACLE_HOME/OPatch/opatch version

In case this requirement is not met, you can always download and install the latest opatch utility. You can use the following Metalink note for all the info about installing and using the latest opatch utility:

How To Download And Install The Latest OPatch Version [ID 274526.1]

2) Check all the prerequisites before applying the patch to check if there are any conflicts with some patches already applied. In my case, this goes like this:

export ORACLE_HOME=/u01/app/11.2.0/grid
cd

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph 13696216 -oh $ORACLE_HOME
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph 13696216 -oh /u01/app/oracle/product/11.2.0/db_1
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph 13696251 -oh $ORACLE_HOME
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph 13696251/custom/server/13696251 -oh /u01/app/oracle/product/11.2.0/db_1

3) Apply the patch on the newly installed GI and RDBMS software:

$ORACLE_HOME/OPatch/opatch napply -oh /u01/app/11.2.0/grid -local 13696251
$ORACLE_HOME/OPatch/opatch napply -oh /u01/app/11.2.0/grid -local 13696216
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
cd (location where patches are unzipped - 13696216)
$ORACLE_HOME/OPatch/opatch apply

Now we've reached the point where we have a fresh new GI and RDBMS installation on the box of the latest 11.2.0.3 version.

In my case, it is 11.2.0.3.2.

The next step  is to run /u01a/app/11.2.0/grid/root.sh and upgrade the ASM.

Part II - ASM upgrade

Going through the documentation and many other posts again, I see that most of the examples where the ASM is upgraded were using the graphical OUI or the ASMCA tools for that purpose. The method that I am about to present is actually a manual upgrade without using any of the tools mentioned above. It is pretty straight forward:

1) Connect to the box as an Oracle OS user.

2) Set the environment to point to the ASM:

[oracle@test_machine ~]$ . oraenv
ORACLE_SID = [oracle] ? +ASM

3) Create pfile from spfile and consider adjusting the memory target parameters, as there might be a legitimate reason for increasing those parameters. The default is only 272M, which can be easily exhausted by the processes and lead to ASM failure to start:

[oracle@test_machine ~]$ sqlplus '/ as sysdba'
SYS@+ASM AS SYSDBA> show parameter spfile
SYS@+ASM AS SYSDBA> alter system set memory_max_target=1G scope=spfile;
SYS@+ASM AS SYSDBA> alter system set memory_target=350M scope=spfile;
SYS@+ASM AS SYSDBA> alter system set lock_sga=false scope=spfile;
SYS@+ASM AS SYSDBA> create pfile='/home/oracle/pre_upgrade_11.2.0.3/pfile+ASM_pre_upg.ora' from spfile;
SYS@+ASM AS SYSDBA> exit

4) Check the parameters in crsconfig_params to see if it is all set.

[oracle@test_machine grid]$ cat /u01/app/11.2.0/grid/crs/install/crsconfig_params

5) Shutdown the ASM and the database that is using it.

6) Stop the database listener.

[oracle@test_machine ~]$ lsnrctl stop
[oracle@test_machine ~]$ lsnrctl status

7) Execute the root script from the installation mentioned in Part I:

/u01/app/11.2.0/grid/root.sh
The root script requires additional script to be executed as root in order to configure Grid Infrastructure for a Stand-Alone Server:
/u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/roothas.pl

8) Modify the /etc/oratab values with the new oracle home value for the ASM.

modify the line:
+ASM:/u01/app/oracle/product/11.1.0/db_1:Y
to
+ASM:/u01/app/11.2.0/grid:Y

9) Once the root script is executed, start up the ASM in nomount with the previously created pfile but from the new oracle home. Add the ASM to be part of the GI using srvctl as well:

[oracle@test_machine ~]$ . oraenv
ORACLE_SID = [oracle] ? +ASM
[oracle@test_machine ~]$ echo $ORACLE_HOME - confirm it is the new grid location
[oracle@test_machine ~]$ srvctl add asm
[oracle@test_machine ~]$ srvctl stop asm
[oracle@test_machine ~]$ sqlplus '/ as sysdba'
SQL> startup pfile='/home/oracle/pre_upgrade_11.2.0.3/pfile+ASM_pre_upg.ora' nomount;
SQL> show parameter spfile
SYS@+ASM AS SYSDBA> exit
[oracle@test_machine pre_upgrade_11.2.0.3]$ crsctl stat res -t
[oracle@test_machine pre_upgrade_11.2.0.3]$ crsctl check has
[oracle@test_machine pre_upgrade_11.2.0.3]$ crsctl stat res

10) Create spfile from pfile for the ASM.

SYS@+ASM AS SYSDBA> create spfile='/u01/app/11.2.0/grid/dbs/spfile+ASM.ora' from pfile='/home/oracle/pre_upgrade_11.2.0.3/pfile+ASM_pre_upg.ora';

11) Shut down and start up the ASM from the beginning so that it can use the new spfile.

SYS@+ASM AS SYSDBA>shutdown;
SYS@+ASM AS SYSDBA>startup;

12) Verify after starting ASM with spfile. (Check spfile used by the instance and check diskgroups.)

SYS@+ASM AS SYSDBA> show parameter spfile;
SYS@+ASM AS SYSDBA> select name, STATE, TYPE, TOTAL_MB, FREE_MB from v$asm_diskgroup;
SYS@+ASM AS SYSDBA> exit;
[oracle@test_machine pre_upgrade_11.2.0.3]$ crsctl stat res -t

13) Start the database listener.

[oracle@test_machine pre_upgrade_11.2.0.3]$ srvctl add listener
[oracle@test_machine pre_upgrade_11.2.0.3]$ srvctl start listener
[oracle@test_machine pre_upgrade_11.2.0.3]$ crsctl stat res -t
[oracle@test_machine pre_upgrade_11.2.0.3]$ srvctl status listener
[oracle@test_machine ~]$ lsnrctl status

14) Start the database that uses the ASM.

[oracle@test_machine ~]$ . oraenv
ORACLE_SID = [+ASM] ? TESTDB
[oracle@test_machine ~]$ sqlplus '/ as sysdba'
SYS@TESTDB AS SYSDBA>startup;

And voilà, you now have y64r ASM upgraded to 11.2.0.3. It is as simple as that.

Part III - Database upgrade

After the software is installed and verified and the ASM is successfully upgraded, the actual database upgrade is all that's left. For the upgrade, I was following the Complete Checklist for Manual Upgrades to 11gR2 [ID 837570.1] that MOS suggests. With no experiments, the procedure simply goes like this:

a) Pre-Upgrade Steps

1) Run the pre-upgrade information tool for collecting pre-upgrade information.

[oracle@test_machine ~] cd /home/oracle/pre_upgrade_11.2.0.3
[oracle@test_machine pre_upgrade_11.2.0.3] sqlplus '/ as sysdba'
SYS@TESTDB AS SYSDBA> spool upgrade_info.log
SYS@TESTDB AS SYSDBA> @utlu112i.sql
SYS@TESTDB AS SYSDBA> spool off
SYS@TESTDB AS SYSDBA> exit

2) Check for the integrity of the source database prior to starting the upgrade by downloading and running the dbupgdiag.sql script from My Oracle Support (Note 556610.1 Script to Collect DB Upgrade/Migrate Diagnostic Information dbupgdiag.sql https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=556610.1).

[oracle@test_machine ~] cd /home/oracle/pre_upgrade_11.2.0.3
[oracle@test_machine pre_upgrade_11.2.0.3] sqlplus '/ as sysdba'
SYS@TESTDB AS SYSDBA> @dbupgdiag.sql
SYS@TESTDB AS SYSDBA> exit

3) Find the users that have CONNECT role granted - in 11.2 the CONNECT Role is deprecated - From Oracle 10.2,'CONNECT' role only includes 'CREATE SESSION' privilege. If users or roles require privileges other than CREATE SESSION, then grant the specific required privileges prior to upgrade.

SELECT GRANTEE,PRIVILEGE FROM DBA_SYS_PRIVS WHERE GRANTEE ='CONNECT';
SELECT grantee FROM dba_role_privs WHERE granted_role = 'CONNECT' and
grantee NOT IN ('SYS', 'OUTLN', 'SYSTEM', 'CTXSYS', 'DBSNMP', 'LOGSTDBY_ADMINISTRATOR', 'ORDSYS', 'ORDPLUGINS',
'OEM_MONITOR', 'WKSYS', 'WKPROXY', 'WK_TEST', 'WKUSER', 'MDSYS', 'LBACSYS', 'DMSYS', 'WMSYS', 'EXFSYS', 'SYSMAN',
'MDDATA', 'SI_INFORMTN_SCHEMA', 'XDB', 'ODM');
* In my case we are all good here. We are upgrading from 11.1.0.7 where CONNECT role has only CREATE SESSION privilege

4) Create a script for DBLINK (in case the database has to be downgraded again since any password in database links are encrypted and all of the database links with encrypted passwords must be dropped prior to the downgrade). You can use the following script that will generate all the commands that will recreate the original db links once the DB is downgraded:

SELECT 'CREATE '||DECODE(U.NAME,'PUBLIC','public ')||'DATABASE LINK '||CHR(10) ||DECODE(U.NAME,'PUBLIC',Null, 'SYS','',U.NAME||'.')
|| L.NAME||chr(10) ||'CONNECT TO ' || L.USERID || ' IDENTIFIED BY "'||L.PASSWORD||'" USING '''||L.HOST||'''' ||chr(10)||';' TEXT
FROM SYS.LINK$ L, SYS.USER$ U WHERE L.OWNER# = U.USER#;

5) Check for TIMESTAMP WITH TIMEZONE Datatype.

* For 11.1.0.6 or 11.1.0.7, there is no need to apply any patchset before upgrading to 11.2.0.3. There is no need to apply DST patches on the 11.1.0.6 or 11.1.0.7 side first. You can skip any DST related upgrade instructions. The 11.2.0.3 RDBMS DST version after the upgrade to 11.2.0.3 will be the same DST version as used in 11.1.0.6 or 11.1.0.7.

6) Ensure that the National Characterset (NLS_NCHAR_CHARACTERSET) is UTF8 or AL16UTF16.  If it is UTF8 or AL16UTF16, then no action is needed.

SYS@EMREP AS SYSDBA> select value from NLS_DATABASE_PARAMETERS where parameter = 'NLS_NCHAR_CHARACTERSET';

7) Check the Optimizer Statistics - To determine the schemas which lack statistics, either review the output of the utlu112i.sql script or download and run the script from - Note 560336.1 Script to Check Schemas with Stale Statistics.

SYS@EMREP AS SYSDBA> EXECUTE dbms_stats.gather_dictionary_stats;

8) Disable Oracle Database Vault

* You can use the following link to properly disable the Oracle Database Vault:
https://docs.oracle.com/cd/E11882_01/server.112/e16544/dvdisabl.htm#BJEDGGGA

9) Back up Enterprise Manager Database Control Data. If the DB is being monitored by Grid Control, there is no need for this step.

i. Set ORACLE_HOME to your old Oracle Home.
ii. Set ORACLE_SID to the SID of the database being upgraded.
iii. Set PATH, LD_LIBRARY_PATH and SHLIB_PATH to point to the Oracle home from which the database is being upgraded.
iv. Change directory to Oracle Database 11g release 2 (11.2) home.
v. Run the emdwgrd command.
vi. Run the following command for single instance database:
$ emdwgrd -save -sid old_SID -path save_directory

* For more details, you can use the following link as well:
https://support.oracle.com/CSP/main/articlecmd=show&type=NOT&id=870877.1

10) Identify the DB users that will require Network ACL's configuration. This is required since 11.2 includes fine-grained access control to the UTL_TCP, UTL_SMTP, UTL_MAIL, UTL_HTTP, or UTL_INADDR packages using Oracle XMLDB. In this case, you must also configure network access control lists (ACLs) in the database before these packages can work as they did in prior releases. The actions that should be taken are part of the Post Upgrade tasks (step c.5).

* Use the Pre-Upgrade Information Tool to identify the DB users that will require Network ACL's configuration.

11) Check for corruption in the dictionary.

[oracle@test_machine ~] cd /home/oracle/pre_upgrade_11.2.0.3
[oracle@test_machine pre_upgrade_11.2.0.3] sqlplus '/ as sysdba'
SYS@TESTDB AS SYSDBA> @gen_analyze.sql
SYS@TESTDB AS SYSDBA> @$ORACLE_HOME/rdbms/admin/utlvalid.sql
SYS@TESTDB AS SYSDBA> @analyze.sql
SYS@TESTDB AS SYSDBA> select * from INVALID_ROWS;

12) Ensure that no files need media recovery and that no files are in backup mode.

SYS@TESTDB AS SYSDBA> SELECT * FROM v$recover_file;
SYS@TESTDB AS SYSDBA> SELECT * FROM v$backup WHERE status != 'NOT ACTIVE';

13) Check for password-protected roles - In version 11.2, password protected roles are no longer enabled by default so it is recommended to remove the password from those roles to allow existing privileges to remain available.

SYS@TESTDB AS SYSDBA> select * from dba_roles;

14) Resolve outstanding distributed transactions prior to the upgrade.

SYS@TESTDB AS SYSDBA> select * from dba_2pc_pending;

15) Check to see if a standby database exists.

SYS@TESTDB AS SYSDBA> SELECT SUBSTR(value,INSTR(value,'=',INSTR(UPPER(value),'SERVICE'))+1) FROM v$parameter
WHERE name LIKE 'log_archive_dest%' AND UPPER(value) LIKE 'SERVICE%';

16) Disable all batch and cron jobs.

SYS@TESTDB AS SYSDBA> dbms_scheduler.set_scheduler_attribute('SCHEDULER_DISABLED','TRUE');
SYS@TESTDB AS SYSDBA> alter system set job_queue_processes=0 scope=both;
. wait for the current running jobs to finish
. comment the crontab scripts

17) Ensure that the users' SYS and SYSTEM have 'SYSTEM' as their default tablespace.

SYS@TESTDB AS SYSDBA> SELECT username, default_tablespace FROM dba_users WHERE username in ('SYS','SYSTEM');

18) Ensure that, if the aud$ table exists, it is in the SYS schema and in the SYSTEM tablespace.

SYS@TESTDB AS SYSDBA> SELECT owner,tablespace_name FROM dba_tables WHERE table_name='AUD$';

19) Check whether the database has any externally authenticated SSL users. If any SSL users are found, you might need to deal with them after the upgrade:

SYS@TESTDB AS SYSDBA> SELECT name FROM sys.user$ WHERE ext_username IS NOT NULL AND password = 'GLOBAL';

* For more information you can use the following link:
https://docs.oracle.com/cd/E11882_01/server.112/e10819/afterup.htm#CEGCJHDI

20) Note down the location of datafiles, redo logs, and control files. Also take a backup of all configuration files like listener.ora, tnsnames.ora, etc. from $ORACLE_HOME.

SYS@TESTDB AS SYSDBA> SELECT name FROM v$controlfile;
SYS@TESTDB AS SYSDBA> SELECT file_name FROM dba_data_files;
SYS@TESTDB AS SYSDBA> SELECT group#, member FROM v$logfile;

21) Stop all Oracle-related processes on the box test_machine.

22) Start up the database in mount mode, enable flashback, and create restore point.
SYS@TESTDB AS SYSDBA> startup mount;
SYS@TESTDB AS SYSDBA> alter database flashback on;
SYS@TESTDB AS SYSDBA> alter system set db_recovery_file_dest_size=40G SCOPE=both;
SYS@TESTDB AS SYSDBA> create restore point before_upgrade GUARANTEE FLASHBACK DATABASE;

23) Back up the Database - Perform Cold Backup.

[oracle@test_machine pre_upgrade_11.2.0.3]$ rman target /
RMAN> RUN
{
ALLOCATE CHANNEL cha1 TYPE DISK;
BACKUP DATABASE FORMAT 'backup_location/%U' TAG before_upgrade;
BACKUP CURRENT CONTROLFILE;
};

24) Make a backup of the /u01/app/oracle/product/11.1.0/db_1/dbs/initETESTDB.ora file. (Create pfile from spfile as well on a backup location.)

25) Make sure the ORACLE_BASE, ORACLE_HOME, and PATH environment variables point to the new Oracle 11g Release 2 (11.2) directories.

[oracle@test_machine ~]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
[oracle@test_machine ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@test_machine ~]$ export ORACLE_BASE=/u01/app/oracle

26) Update the oratab entry to set the new ORACLE_HOME pointing to EMREP and disable automatic startup.

27) Set the environment to point to the new ORACLE_HOME.

[oracle@test_machine ~]$ . oraenv
ORACLE_SID = [oracle] ? TESTDB

b) Database upgrade Steps

1) At the operating system prompt, change to the new $ORACLE_HOME/rdbms/admin directory of 11gR2 Oracle Home.

[oracle@test_machine ~]$ cd $ORACLE_HOME/rdbms/admin

2) Start up the database in upgrade mode.

[oracle@test_machine admin] sqlplus '/ as sysdba'
SYS@TESTDB AS SYSDBA> startup UPGRADE

3) Set the system to spool results to a log file for later verification after the upgrade is completed and start the upgrade script.

SYS@TESTDB AS SYSDBA> set echo on
SYS@TESTDB AS SYSDBA> SPOOL upgrade.log
SYS@TESTDB AS SYSDBA> @catupgrd.sql
SYS@TESTDB AS SYSDBA> spool off

4) Start up the database in normal mode and run the Post-Upgrade Status Tool $ORACLE_HOME/rdbms/admin/utlu112s.sql, which provides a summary of the upgrade at the end of the spool log.

[oracle@test_machine admin] sqlplus '/ as sysdba'
SYS@TESTDB AS SYSDBA> STARTUP
SYS@TESTDB AS SYSDBA> @utlu112s.sql

5) Run catuppst.sql, located in the $ORACLE_HOME/rdbms/admin directory, to perform upgrade actions that do not require the database to be in UPGRADE mode.

SYS@TESTDB AS SYSDBA> @catuppst.sql

6) Run utlrp.sql to recompile any remaining stored PL/SQL and Java code in another session.

SYS@TESTDB AS SYSDBA> @utlrp.sql

7) Check for the integrity of the upgraded database by running dbupgdiag.sql - Note 556610.1 Script to Collect DB Upgrade/Migrate Diagnostic Information (dbupgdiag.sql).

[oracle@test_machine ~] cd /home/oracle/pre_upgrade_11.2.0.3
[oracle@test_machine pre_upgrade_11.2.0.3] sqlplus '/ as sysdba'
SYS@TESTDB AS SYSDBA> @dbupgdiag.sql
SYS@TESTDB AS SYSDBA> exit

c) Post Upgrade Steps

1) For the upgraded instance, modify the ORACLE_HOME parameter to point to the new ORACLE_HOME. Start the listener.

[oracle@test_machine ~]$ . oraenv
ORACLE_SID = [oracle] ? TESTDB
[oracle@test_machine ~]$ lsnrctl start
[oracle@test_machine ~]$ lsnrctl status

2) Make sure the ORACLE_BASE, ORACLE_HOME, and PATH environment variables point to the Oracle 11g Release 2 (11.2) directories.

3) Modify /etc/oratab entry to use automatic startup.

4) Check the current version of the Oracle time zone definitions in the upgraded database - This should be the same as the value found before the upgrade.

SYS@TESTDB AS SYSDBA> SELECT version FROM v$timezone_file;

5) Configure Fine-Grained Access to External Network Services.

* Modify the values in the script below appropriately and execute the script for each principal detected in step 10 from part a.

a) Pre-Upgrade Steps:

acl_name.xml => Enter a name for the access control list XML file.
ACL description => 'file description',
principal => 'user_or_role',
is_grant => TRUE|FALSE,
privilege => 'connect|resolve',
host_name => host name

DECLARE
acl_path VARCHAR2(4000);
BEGIN
SELECT acl INTO acl_path FROM dba_network_acls
WHERE host = 'host_name' AND lower_port IS NULL AND upper_port IS NULL;
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(acl_path,'principal','privilege') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(acl_path,'principal', is_grant, 'privilege');
END IF;
EXCEPTION
WHEN no_data_found THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('ACL_name.xml','ACL description', 'principal', is_grant, 'privilege');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('ACL_name.xml','host_name');
END;

COMMIT;

 

6) Enable back all previously disabled batch and cron jobs on the box.

SYS@TESTDB AS SYSDBA> dbms_scheduler.set_scheduler_attribute('SCHEDULER_DISABLED','FALSE');
SYS@TESTDB AS SYSDBA> alter system set job_queue_processes=10 scope=both;
. uncomment the crontab scripts

So basically, all these steps need to be covered when upgrading a database that uses ASM. By following the MOS instructions and the actual documentation precisely, all steps went smoothly without any surprises or uncomfortable moments of panic. I hope that you will find this post useful enough and that it will save you a lot of time when performing such upgrades in future.

Top Categories

  • There are no suggestions because the search field is empty.

Tell us how we can help!

dba-cloud-services
Upcoming-Events-banner