Friday, February 18, 2011

HOW TO UPGRADE AN ASM INSTANCE TO RELEASE 11GR2 (11.2.0.2.0)

Reason: The database is using ASM as storage. Before you upgrade database, you need to upgrade ASM using Automatic Storage Management Configuration (ASMCA) from grid infrastructure home. Starting with 11gR2, ASM should be running from grid infrastructure home.



1) Download Oracle Grid Infrastructure installation.

2) Install the Oracle Grid Infrastructure as described in the manual

My installation environment
[oracle@lv-rms-test ~]$ cat .bash_profile.grid
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export ORACLE_BASE=/opt/oracle/112/grid/asm
unset ORACLE_HOME
export PATH=$PATH:/opt/oracle/install/cpujan2010/OPatch
export PATH=$PATH:/sbin
export PATH=$PATH:/usr/ccs/bin
export ORACLE_HOME=/opt/oracle/112/grid/app
export ORACLE_SID=+ASM # Each RAC node must have a unique Oracle SID! E.g. orcl1, orcl2,...
export ORACLE_TERM=xterm
export NLS_LANG=AMERICAN_AMERICA.NEE8ISO8859P4
#export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH

3) After the Oracle Grid Infrastructure installation is completed, please verify that the
ASM instance is running under the old ASM Oracle Home Release (11gR1, 10gR2 or
10gR1). ASMCA will try to start it if it is not running.

check if you have old ASM instance
 [oracle@lv-rms-test ~]$ cat /etc/oratab
+ASM:/opt/oracle/102:N


4) Since the Oracle Grid Infrastructure 11gR2 (11.2.0.2.0) was installed, please make
sure the CSS service is running:


Run script after grid installation(with your path, if it is different)

[root@lv-rms-test grid]# /opt/oracle/112/grid/app/perl/bin/perl -I/opt/oracle/112/grid/app/perl/lib -I/opt/oracle/112/grid/app/crs/install /opt/oracle/112/grid/app/crs/install/roothas.pl

Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'oracle', privgrp 'oinstall'..
Operation successful.
CSS appears healthy
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons should exit soon.
CRS-4664: Node lv-rms-test successfully pinned.
Adding daemon to inittab
ACFS-9300: ADVM/ACFS distribution files found.
ACFS-9307: Installing requested ADVM/ACFS software.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9321: Creating udev for ADVM/ACFS.
ACFS-9323: Creating module dependencies - this may take some time.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9309: ADVM/ACFS installation correctness verified.

lv-rms-test     2011/02/17 17:26:45     /opt/oracle/112/grid/app/cdata/lv-rms-test/backup_20110217_172645.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server

5) run listener under ORACLE HOME 11gR2 (11.2.0.2.0)
[oracle@lv-rms-test ~]$ cd
[oracle@lv-rms-test ~]$ . .bash_profile.11g
[oracle@lv-rms-test ~]$ env | grep ORA
ORACLE_UNQNAME=MAN2
ORACLE_SID=RMS
ORACLE_BASE=/opt/oracle/112
ORACLE_TERM=xterm
ORA_NLS33=/opt/oracle/112/product/11.2.0/dbhome_1/ocommon/nls/admin/data
ORACLE_HOME=/opt/oracle/112/product/11.2.0/dbhome_1

[oracle@lv-rms-test ~]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 18-FEB-2011 11:52:58

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Starting /opt/oracle/112/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Log messages written to /opt/oracle/112/diag/tnslsnr/lv-rms-test/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=lv-rms-test)(PORT=1521)))

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                18-FEB-2011 11:52:58
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /opt/oracle/112/diag/tnslsnr/lv-rms-test/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=lv-rms-test)(PORT=1521)))
The listener supports no services
The command completed successfully



6) Then run the ASMCA from the new Oracle Grid Infrastructure 11gR2 (11.2.0.2.0)
Oracle Home:
[oracle@lv-rms-test ~]$ . .bash_profile.grid
[oracle@lv-rms-test ~]$ env | grep ORA
ORACLE_UNQNAME=MAN2
ORACLE_SID=+ASM
ORACLE_BASE=/opt/oracle/112/grid/asm
ORACLE_TERM=xterm
ORA_NLS33=/opt/oracle/112/grid/app/ocommon/nls/admin/data
ORACLE_HOME=/opt/oracle/112/grid/app

[oracle@lv-rms-test ~]$ asmca

  • ASMCA will show the ASM Oracle Home Path from the previous and new release (see screenshot below).
  •  Please provide the ASMSNMP password (see screenshot below).And then press the [Upgrade ASM] button; ASMCA will start with the ASM instance upgrade (see screenshot below).
  •  After the ASM instance is upgraded, please validate that the diskgroups are mounted.
     Then press the [Exit] button.



7) Verify that the ASM instance is now running under new 11gR2 Grid Infrastructure
Oracle Home:

[oracle@lv-rms-test ~]$ . .bash_profile.grid
[oracle@lv-rms-test ~]$ sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Fri Feb 18 11:59:44 2011

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Automatic Storage Management option

SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE    11.2.0.2.0      Production
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production


SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /opt/oracle/112/grid/app/dbs/spfile+ASM.ora

SQL> exit


[oracle@lv-rms-test ~]$ cat /etc/oratab
+ASM:/opt/oracle/112/grid/app:N


Finaly you can upgrade your 10.2.0.5 database on ASM to 11.2.0.2. I used dbua (database upgrade assistant).
Run dbua from ORACLE HOME 11g (not from GRID home)



Last check
[oracle@lv-rms-test ~]$ cat /etc/oratab
+ASM:/opt/oracle/112/grid/app:N
RMS:/opt/oracle/112/product/11.2.0/dbhome_1:N           # line added by Agent

Good luck

25 comments:

  1. can u plz tel me frm where to Download Oracle Grid Infrastructure installation.

    ReplyDelete
  2. Hello, just wanted to mention, I liked this blog post.
    It was helpful. Keep on posting!

    my site :: juice recipes for weight loss (http://Www.Crp-01.Org.br/psiweb/index.Php?Title=Usu%C3%A1rio:LavadaVbwy)

    ReplyDelete
  3. Do you have a spam issue on this blog; I also am a blogger, and I was wanting to know your situation; many of us have developed some nice practices and we are looking to exchange strategies with other folks,
    be sure to shoot me an email if interested.

    my web site - lemonade diet recipe

    ReplyDelete
  4. Entire life Replacement is an element that you rarely find, when you Buy facebook reviews. Exclusively a few excellent service providers give this. buying facebook reviews

    ReplyDelete