Vous êtes sur la page 1sur 17

Install and Upgrade

Grid Infrastructure 12.1.0.2 (no RAC)


+ Apply GI PSU
Current Configuration
Grid Infrastructure 12.1.0.1 is installed and running:
+ASM:/u03/app/oracle/grid/12.1.0:N:
One Diskgroup created in ASM
SQL> select name, total_mb, free_mb from v$asm_diskgroup;
NAME
TOTAL_MB
FREE_MB
------------------------------ ---------- ---------ORADATA
4204
4118
SQL> select name, total_mb, free_mb from v$asm_disk;
NAME
TOTAL_MB
FREE_MB
------------------------------ ---------- ---------ORAD1
2102
2058
ORAD2
2102
2060
GI Component Status looks good
$ crsctl status res -t
-------------------------------------------------------------------------------Name
Target State
Server
State details
-------------------------------------------------------------------------------Local Resources
-------------------------------------------------------------------------------ora.LISTENERASM.lsnr
ONLINE ONLINE
emcc
STABLE
ora.ORADATA.dg
ONLINE ONLINE
emcc
STABLE
ora.asm
ONLINE ONLINE
emcc
Started,STABLE
ora.ons
OFFLINE OFFLINE
emcc
STABLE
-------------------------------------------------------------------------------Cluster Resources
-------------------------------------------------------------------------------ora.cssd
1
ONLINE ONLINE
emcc
STABLE
ora.diskmon
1
OFFLINE OFFLINE
STABLE
ora.evmd

1
ora.ocadb1.db
1

ONLINE

ONLINE

OFFLINE OFFLINE

emcc

STABLE
Instance Shutdown,ST
ABLE

ora.ocadb1.emccdb1.svc
1
OFFLINE OFFLINE
STABLE
-------------------------------------------------------------------------------$
Do not have much space on the existing file systems, so going to install GI 12.1.0.2 to /d01 file system mounted newly to
the VirtualBox VM.
$ df -h
Filesystem
Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
33G
25G 6.5G 80% /
/dev/sda1
99M
23M
71M 25% /boot
tmpfs
4.0G 635M 3.3G 16% /dev/shm
/dev/sdb
40G
18G
21G 47% /u02
/dev/sde
12G 9.8G 1.6G 87% /u03
Orac12csw
466G 370G
96G 80% /media/sf_Orac12csw
/dev/sdf
26G 173M
24G
1% /d01
ASM instance is up and running.
$ ps -ef | grep ASM
oracle
4215
1 0 11:37 ?
00:00:00
/u03/app/oracle/grid/12.1.0/bin/tnslsnr LISTENERASM -no_crs_notify -inherit
oracle
4304
1 0 11:38 ?
00:00:00 asm_pmon_+ASM
oracle
4308
1 0 11:38 ?
00:00:01 asm_psp0_+ASM
oracle
4312
1 5 11:38 ?
00:02:15 asm_vktm_+ASM
oracle
4318
1 0 11:38 ?
00:00:00 asm_gen0_+ASM
oracle
4322
1 0 11:38 ?
00:00:00 asm_mman_+ASM
oracle
4330
1 0 11:38 ?
00:00:00 asm_diag_+ASM
oracle
4334
1 0 11:38 ?
00:00:01 asm_dia0_+ASM
oracle
4338
1 0 11:38 ?
00:00:00 asm_dbw0_+ASM
oracle
4342
1 0 11:38 ?
00:00:00 asm_lgwr_+ASM
oracle
4346
1 0 11:38 ?
00:00:00 asm_ckpt_+ASM
oracle
4350
1 0 11:38 ?
00:00:00 asm_smon_+ASM
oracle
4354
1 0 11:38 ?
00:00:00 asm_lreg_+ASM
oracle
4358
1 0 11:38 ?
00:00:00 asm_rbal_+ASM
oracle
4362
1 0 11:38 ?
00:00:01 asm_gmon_+ASM
oracle
4366
1 0 11:38 ?
00:00:00 asm_mmon_+ASM
oracle
4370
1 0 11:38 ?
00:00:01 asm_mmnl_+ASM
oracle
4397
1 0 11:38 ?
00:00:00 oracle+ASM
(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle
5355 4106 0 12:21 pts/1
00:00:00 grep ASM
$
And obviously, the GI services are running as well.

$ ps -ef |grep grid


oracle
3281
1 0 11:34 ?
00:00:06 /u03/app/oracle/grid/12.1.0/bin/ohasd.bin reboot
oracle
4192
1 1 11:37 ?
00:00:28 /u03/app/oracle/grid/12.1.0/bin/oraagent.bin
oracle
4209
1 0 11:37 ?
00:00:00 /u03/app/oracle/grid/12.1.0/bin/evmd.bin
oracle
4215
1 0 11:37 ?
00:00:00 /u03/app/oracle/grid/12.1.0/bin/tnslsnr LISTENERASM
-no_crs_notify -inherit
oracle
4234 4209 0 11:38 ?
00:00:00 /u03/app/oracle/grid/12.1.0/bin/evmlogger.bin -o
/u03/app/oracle/grid/12.1.0/log/[HOSTNAME]/evmd/evmlogger.info -l
/u03/app/oracle/grid/12.1.0/log/[HOSTNAME]/evmd/evmlogger.log
oracle
4245
1 0 11:38 ?
00:00:02 /u03/app/oracle/grid/12.1.0/bin/cssdagent
oracle
4271
1 0 11:38 ?
00:00:00 /u03/app/oracle/grid/12.1.0/bin/ocssd.bin

Install and Upgrade 12.1.0.2 Grid Infrastructure


The 12.1.0.2 grid infrastructure software is downloaded from OTN and unzipped (grid directory).

You also see that I have the database software downloaded, as well as few patches (1979135 is PSU patch, 6880880 is
latest OPatch).

Start the installation by invoking OUI from the 12.1.0.2 media, grid directory.

Following are OUI screenshots and options chosen. Nothing specific to explain here
Yes, Oracle install is that easy as click click click!

Had some space warnings, ignored the errors as the current space is sufficient for what I use this VirtualBox for (only for
practicing and demo).

Ignore warnings only when you are sure of what you are ignoring.

Click Install to begin the installation. After sometime, the popup to run rootupgrade.sh appears.

Ooops!! rootupgrade.sh failed. Fortunately it is a known issue.


Upgrading ASM Failed With ORA-32002: cannot create SPFILE (Doc ID 1912581.1)

SQL> show parameter spfile


NAME
TYPE
VALUE
------------------------------------ ----------- -----------------------------spfile
string
/u03/app/oracle/grid/12.1.0/db
s/spfile+ASM.ora
SQL>
SQL> create pfile='/tmp/pfileASM.ora' from spfile;
File created.
SQL>
SQL> select name from v$asm_diskgroup;
NAME
-----------------------------ORADATA
SQL>

SQL> create spfile='+ORADATA' from pfile='/tmp/pfileASM.ora';


File created.
SQL>
$ srvctl config asm
ASM home: /u03/app/oracle/grid/12.1.0
Password file: /u03/app/oracle/grid/12.1.0/dbs/orapwASM
ASM listener: LISTENERASM
Spfile: +ORADATA/ASM/ASMPARAMETERFILE/registry.253.867764075
ASM diskgroup discovery string:
$
$ srvctl stop asm -f
$
$ srvctl start asm
$
SQL> show parameter spfile
NAME
TYPE
VALUE
------------------------------------ ----------- -----------------------------spfile
string
+ORADATA/ASM/ASMPARAMETERFILE/
registry.253.867764075
SQL>
Try the rootupgrade.sh again

Success!! Now click OK in the popup window.

Remember to adjust the environment configuration file (if you have one) with new Oracle home value.

Grid Infrastructure services are running from the new home


$ ps -ef |grep grid
oracle
10491
1 1 13:41 ?
00:00:10 /d01/grid/12.1.0.2/bin/ohasd.bin reboot
oracle
10528
1 1 13:41 ?
00:00:10 /d01/grid/12.1.0.2/bin/oraagent.bin
oracle
10579
1 0 13:42 ?
00:00:05 /d01/grid/12.1.0.2/bin/evmd.bin
oracle
10592
1 0 13:42 ?
00:00:00 /d01/grid/12.1.0.2/bin/tnslsnr LISTENERASM no_crs_notify -inherit
oracle
10612 10579 0 13:42 ?
00:00:05 /d01/grid/12.1.0.2/bin/evmlogger.bin -o
/d01/grid/12.1.0.2/log/[HOSTNAME]/evmd/evmlogger.info -l
/d01/grid/12.1.0.2/log/[HOSTNAME]/evmd/evmlogger.log
oracle
10620
1 0 13:42 ?
00:00:05 /d01/grid/12.1.0.2/bin/cssdagent
oracle
10645
1 1 13:42 ?
00:00:05 /d01/grid/12.1.0.2/bin/ocssd.bin

ASM Instance is also running

$ ps -ef |grep ASM


oracle
10592
1 0 13:42 ?
00:00:00 /d01/grid/12.1.0.2/bin/tnslsnr
LISTENERASM -no_crs_notify -inherit
oracle
10680
1 0 13:42 ?
00:00:00 asm_pmon_+ASM
oracle
10684
1 0 13:42 ?
00:00:00 asm_psp0_+ASM
oracle
10688
1 4 13:42 ?
00:00:27 asm_vktm_+ASM
oracle
10694
1 0 13:42 ?
00:00:01 asm_gen0_+ASM
oracle
10698
1 0 13:42 ?
00:00:00 asm_mman_+ASM
oracle
10706
1 0 13:42 ?
00:00:00 asm_diag_+ASM
oracle
10710
1 0 13:42 ?
00:00:00 asm_dia0_+ASM
oracle
10714
1 0 13:42 ?
00:00:00 asm_dbw0_+ASM
oracle
10718
1 0 13:42 ?
00:00:00 asm_lgwr_+ASM
oracle
10722
1 0 13:42 ?
00:00:00 asm_ckpt_+ASM
oracle
10726
1 0 13:42 ?
00:00:00 asm_smon_+ASM
oracle
10730
1 0 13:42 ?
00:00:00 asm_lreg_+ASM
oracle
10734
1 0 13:42 ?
00:00:00 asm_pxmn_+ASM
oracle
10738
1 0 13:42 ?
00:00:00 asm_rbal_+ASM
oracle
10742
1 0 13:42 ?
00:00:00 asm_gmon_+ASM
oracle
10746
1 0 13:42 ?
00:00:00 asm_mmon_+ASM
oracle
10750
1 0 13:42 ?
00:00:00 asm_mmnl_+ASM
oracle
10776
1 0 13:42 ?
00:00:00 oracle+ASM
(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle
11660 7822 0 13:52 pts/3
00:00:00 grep ASM
$

Apply PSU Oct 2014


Patch 19791375 - Combo of OJVM Component 12.1.0.2.1 DB PSU + GI PSU 12.1.0.2.1 (Oct2014)
Platform: Linux x86-64, Solaris SPARC, Solaris x86-64
Released: October 14, 2014
In this document Oracle Database Home refers to Enterprise Edition or Standard Edition Database software. GI refers to
Grid Infrastructure and PSU refers to Patch Set Update.
The GI System patch includes updates for both the Clusterware home and Database home.
This patch is not Oracle RAC Rolling installable.
Patch 6880880: OPatch patch of version 12.1.0.1.5 for Oracle software releases 12.1.0.x (OCT 2014)
First update OPatch with the latest version, download from MOS and unzip to GI Oracle Home.

Validate the Oracle Inventory for GI home.


$ cd OPatch
$ ./opatch lsinventory
Oracle Interim Patch Installer version 12.1.0.1.5
Copyright (c) 2014, Oracle Corporation. All rights reserved.
Oracle Home
Central Inventory
from
OPatch version
OUI version
Log file location
42PM_1.log

:
:
:
:
:
:

/d01/grid/12.1.0.2
/u03/app/oraInventory
/d01/grid/12.1.0.2/oraInst.loc
12.1.0.1.5
12.1.0.2.0
/d01/grid/12.1.0.2/cfgtoollogs/opatch/opatch2014-12-31_14-01-

Lsinventory Output file location :


/d01/grid/12.1.0.2/cfgtoollogs/opatch/lsinv/lsinventory2014-12-31_14-01-42PM.txt
-------------------------------------------------------------------------------Installed Top-level Products (1):
Oracle Grid Infrastructure 12c
There are 1 products installed in this Oracle Home.

12.1.0.2.0

There are no Interim patches installed in this Oracle Home.


-------------------------------------------------------------------------------OPatch succeeded.
$

Before applying the PSU, need to have the OCM response file created.

Now, apply the GI as root user.


[root@emcc ~]# export PATH=$PATH:/d01/grid/12.1.0.2/OPatch
[root@emcc ~]# opatchauto apply /media/sf_Orac12csw/19791375/19392646 -oh
/d01/grid/12.1.0.2 -ocmrf /tmp/ocm.rsp

Patch succeeded, and services brought up automatically by the opatchauto.

Hope this helps!