This procedure describes how to
upgrade Oracle Grid Infrastructure from 11g (11.2.0.3) to 12c (12.1.0.2), on
Linux environment.
On 12.1.0.2 the GIMR (Grid
Infrastructure Management Repository) is installed and his database, MGMTDB is
automatically created as part of the upgrade or initial installation. It run as
a container database on a single node of the RAC cluster but his data files are
created on the same disk group which holds the OCR and Voting disk and there is
a prerequisite that there is at least 8GB of free space in that ASM disk group.
Before starting, you must
ensure that all the nodes are up and all the cluster services are online on
each node. You can use crsctl command on each node:
Step
1:
On Node 1:
[grid@entdbrac06 bin]$ crsctl check cluster
-all
**************************************************************
entdbrac06:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is
online
CRS-4533: Event Manager is online
**************************************************************
entdbrac07:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is
online
CRS-4533: Event Manager is online
**************************************************************
[grid@entdbrac06 bin]$ crsctl check crs
CRS-4638: Oracle High Availability Services
is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is
online
CRS-4533: Event Manager is online
On Node 2:
[grid@entdbrac07 ~]$ crsctl check cluster
-all
**************************************************************
entdbrac06:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is
online
CRS-4533: Event Manager is online
**************************************************************
entdbrac07:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is
online
CRS-4533: Event Manager is online
**************************************************************
[grid@entdbrac07 ~]$ crsctl check crs
CRS-4638: Oracle High Availability Services
is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is
online
CRS-4533: Event Manager is online
Provide
the credentials and the download the two zip files:
Step 3:
Unzip
the two files on the same directory and then execute the runInstaller program:
[grid@entdbrac06
grid]$./runInstaller
By
default, the OUI detect that you want to upgrade the existing GI and the “Upgrade
Oracle Grid Infrastructure or Oracle Automatic Storage Management” option is checked.
Press
Next.
Select
your language and the Press Next.
Make
sure that both all nodes are selected. Press SSH connectivity
Provide
Grid User password and then Press Test.
Press
OK.
Provide
OSASM, OSDBA for ASM and OSOPER for ASM group. Press Next.
Specify
Oracle Base and Oracle Home directory for GI.
You
can skip to provide root password. In this case you will manually execute the
rootUpgrade.sh file as root user. Press Next.
Wait
until the checks have completed.
You
can ignore the verification results by checking “Ignore All” check option.
Press Next.
Press
Yes.
Press
Install.
Installer
proceeds…
Installer
keeps going…
Log
as root, execute script rootugrade.sh
On
Node 1 frist:
[root@entdbrac06 ~]#
/u01/12.1.0/grid/rootupgrade.sh
Performing root user operation.
The following environment variables
are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/12.1.0/grid
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.
Using configuration parameter file:
/u01/12.1.0/grid/crs/install/crsconfig_params
2016/09/14 13:25:04 CLSRSC-4015:
Performing install or upgrade action for Oracle Trace File Analyzer (TFA)
Collector.
2016/09/14 13:25:26 CLSRSC-4003:
Successfully patched Oracle Trace File Analyzer (TFA) Collector.
2016/09/14 13:25:29 CLSRSC-464:
Starting retrieval of the cluster configuration data
2016/09/14 13:25:38 CLSRSC-465:
Retrieval of the cluster configuration data has successfully completed.
2016/09/14 13:25:38 CLSRSC-363:
User ignored prerequisites during installation
2016/09/14 13:25:51 CLSRSC-515:
Starting OCR manual backup.
2016/09/14 13:25:54 CLSRSC-516: OCR
manual backup successful.
2016/09/14 13:25:58 CLSRSC-468:
Setting Oracle Clusterware and ASM to rolling migration mode
2016/09/14 13:25:58 CLSRSC-482:
Running command: '/u01/12.1.0/grid/bin/asmca -silent -upgradeNodeASM
-nonRolling false -oldCRSHome /u01/11.2.0/grid -oldCRSVersion 11.2.0.3.0
-nodeNumber 1 -firstNode true -startRolling true'
ASM configuration upgraded in local
node successfully.
2016/09/14 13:26:04 CLSRSC-469:
Successfully set Oracle Clusterware and ASM to rolling migration mode
2016/09/14 13:26:04 CLSRSC-466:
Starting shutdown of the current Oracle Grid Infrastructure stack
2016/09/14 13:28:05 CLSRSC-467:
Shutdown of the current Oracle Grid Infrastructure stack has successfully
completed.
OLR initialization - successful
2016/09/14 13:38:20 CLSRSC-329:
Replacing Clusterware entries in file 'oracle-ohasd.conf'
CRS-4133: Oracle High Availability
Services has been stopped.
CRS-4123: Oracle High Availability
Services has been started.
2016/09/14 13:45:51 CLSRSC-472:
Attempting to export the OCR
2016/09/14 13:45:51 CLSRSC-482:
Running command: 'ocrconfig -upgrade grid oinstall'
2016/09/14 13:46:02 CLSRSC-473:
Successfully exported the OCR
2016/09/14 13:46:07 CLSRSC-486:
At this stage of upgrade, the OCR has changed.
Any attempt to downgrade the cluster after
this point will require a complete cluster outage to restore the OCR.
2016/09/14 13:46:07 CLSRSC-541:
To downgrade the cluster:
1. All nodes that have been upgraded must be
downgraded.
2016/09/14 13:46:07 CLSRSC-542:
2. Before downgrading the last node, the Grid
Infrastructure stack on all other cluster nodes must be down.
2016/09/14 13:46:07 CLSRSC-543:
3. The downgrade command must be run on the
node entdbrac07 with the '-lastnode' option to restore global configuration
data.
2016/09/14 13:46:38 CLSRSC-343:
Successfully started Oracle Clusterware stack
clscfg: EXISTING configuration
version 5 detected.
clscfg: version 5 is 11g Release 2.
Successfully taken the backup of
node specific configuration in OCR.
Successfully accumulated necessary
OCR keys.
Creating OCR keys for user 'root',
privgrp 'root'..
Operation successful.
2016/09/14 13:47:00 CLSRSC-474:
Initiating upgrade of resource types
2016/09/14 13:47:22 CLSRSC-482:
Running command: 'upgrade model -s
11.2.0.3.0 -d 12.1.0.2.0 -p first'
2016/09/14 13:47:22 CLSRSC-475:
Upgrade of resource types successfully initiated.
2016/09/14 13:47:28 CLSRSC-325: Configure Oracle Grid Infrastructure for a
Cluster ... succeeded
[root@entdbrac06 ~]#
On
node 2:
[root@entdbrac07 ~]# cd
/u01/12.1.0/grid/rootupgrade.sh
-bash: cd:
/u01/12.1.0/grid/rootupgrade.sh: Not a directory
[root@entdbrac07 ~]#
/u01/12.1.0/grid/rootupgrade.sh
Performing root user operation.
The following environment variables
are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/12.1.0/grid
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.
Using configuration parameter file:
/u01/12.1.0/grid/crs/install/crsconfig_params
2016/09/14 13:51:26 CLSRSC-4015:
Performing install or upgrade action for Oracle Trace File Analyzer (TFA)
Collector.
2016/09/14 13:51:48 CLSRSC-4003:
Successfully patched Oracle Trace File Analyzer (TFA) Collector.
2016/09/14 13:51:49 CLSRSC-464:
Starting retrieval of the cluster configuration data
2016/09/14 13:51:55 CLSRSC-465:
Retrieval of the cluster configuration data has successfully completed.
2016/09/14 13:51:55 CLSRSC-363:
User ignored prerequisites during installation
ASM configuration upgraded in local
node successfully.
2016/09/14 13:52:06 CLSRSC-466:
Starting shutdown of the current Oracle Grid Infrastructure stack
2016/09/14 13:54:03 CLSRSC-467:
Shutdown of the current Oracle Grid Infrastructure stack has successfully
completed.
OLR initialization - successful
2016/09/14 13:54:28 CLSRSC-329:
Replacing Clusterware entries in file 'oracle-ohasd.conf'
CRS-4133: Oracle High Availability
Services has been stopped.
CRS-4123: Oracle High Availability
Services has been started.
2016/09/14 13:56:58 CLSRSC-343:
Successfully started Oracle Clusterware stack
clscfg: EXISTING configuration
version 5 detected.
clscfg: version 5 is 12c Release 1.
Successfully taken the backup of
node specific configuration in OCR.
Successfully accumulated necessary
OCR keys.
Creating OCR keys for user 'root',
privgrp 'root'..
Operation successful.
Start upgrade invoked..
2016/09/14 13:57:20 CLSRSC-478:
Setting Oracle Clusterware active version on the last node to be upgraded
2016/09/14 13:57:20 CLSRSC-482:
Running command: '/u01/12.1.0/grid/bin/crsctl set crs activeversion'
Started to upgrade the Oracle
Clusterware. This operation may take a few minutes.
Started to upgrade the OCR.
Started to upgrade the CSS.
The CSS was successfully upgraded.
Started to upgrade the CRS.
The CRS was successfully upgraded.
Successfully upgraded the Oracle
Clusterware.
Oracle Clusterware operating
version was successfully set to 12.1.0.2.0
2016/09/14 13:59:07 CLSRSC-479:
Successfully set Oracle Clusterware active version
2016/09/14 13:59:12 CLSRSC-476:
Finishing upgrade of resource types
2016/09/14 13:59:23 CLSRSC-482:
Running command: 'upgrade model -s
11.2.0.3.0 -d 12.1.0.2.0 -p last'
2016/09/14 13:59:23 CLSRSC-477:
Successfully completed upgrade of resource types
2016/09/14 13:59:52 CLSRSC-325: Configure Oracle Grid Infrastructure for a
Cluster ... succeeded
[root@entdbrac07 ~]#
Press
Ok.
Installation
continues…
Press
Close.
Step 4: Post-Installation
tasks
[grid@entdbrac06 ~]$ crsctl check
cluster -all
**************************************************************
entdbrac06:
CRS-4537: Cluster Ready Services is
online
CRS-4529: Cluster Synchronization
Services is online
CRS-4533: Event Manager is online
**************************************************************
entdbrac07:
CRS-4537: Cluster Ready Services is
online
CRS-4529: Cluster Synchronization
Services is online
CRS-4533: Event Manager is online
**************************************************************
[grid@entdbrac06 ~]$
[grid@entdbrac07 ~]$ crsctl check
cluster -all
**************************************************************
entdbrac06:
CRS-4537: Cluster Ready Services is
online
CRS-4529: Cluster Synchronization
Services is online
CRS-4533: Event Manager is online
**************************************************************
entdbrac07:
CRS-4537: Cluster Ready Services is
online
CRS-4529: Cluster Synchronization
Services is online
CRS-4533: Event Manager is online
**************************************************************
[grid@entdbrac07 ~]$
[grid@entdbrac06 ~]$ crsctl query
crs softwareversion
Oracle Clusterware version on node
[entdbrac06] is [12.1.0.2.0]
[grid@entdbrac06 ~]$
[grid@entdbrac07 ~]$ crsctl query
crs softwareversion
Oracle Clusterware version on node
[entdbrac07] is [12.1.0.2.0]
[grid@entdbrac07 ~]$
[grid@entdbrac06 ~]$ crsctl query
crs activeversion -f
Oracle Clusterware active version
on the cluster is [12.1.0.2.0]. The cluster upgrade state is [NORMAL].
[grid@entdbrac06 ~]$
[grid@entdbrac06 ~]$ ps -ef |grep
pmon
grid 4109
1 0 14:10 ? 00:00:00 mdb_pmon_-MGMTDB
grid 27629 49654 0 14:24 pts/2 00:00:00 grep pmon
grid 55800
1 0 13:54 ? 00:00:00 asm_pmon_+ASM1
oracle 56355
1 0 13:54 ? 00:00:00 ora_pmon_rocrasc1
[grid@entdbrac06 ~]$
[root@entdbrac06 ~]# cd
/u01/12.1.0/grid/bin/
[root@entdbrac06 bin]# ./oclumon
manage -get reppath
CHM Repository Path = +OCR_DG/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysmgmtdata.269.922543845
[root@entdbrac06 bin]#
[root@entdbrac06 bin]# ./srvctl
status mgmtdb -verbose
Database is enabled
Instance -MGMTDB is running on node
entdbrac06. Instance status: Open.
[root@entdbrac06 bin]# ./srvctl
config mgmtdb
Database unique name: _mgmtdb
Database name:
Oracle home: <CRS home>
Oracle user: grid
Spfile:
+OCR_DG/_MGMTDB/PARAMETERFILE/spfile.268.922543713
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Type: Management
PDB name: entdbrac06_scan
PDB service: entdbrac06_scan
Cluster name: entdbrac06-scan
Database instance: -MGMTDB
[root@entdbrac06
bin]#
Such an ideal piece of blog.Thanks for sharing
RépondreSupprimerOracle SOA Online Training