Tuesday, January 11, 2011

How to upgrade ASM after Install Grid Infrastructure Software Only?

I posted "struggle to Upgrade Oracle Database 11.2.0.1 to 11.2.0.2" topic, and someone comment me "Upgrade Grid Infrastructure to ASM after Installed Grid Infrastructure Software Only"
but I have ASM on 10.2 and need to test:
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
+ASM

SQL> select name, state from v$asm_diskgroup;
NAME STATE
------------------------------ -----------
ASM_DG01 MOUNTED

SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0
PL/SQL Release 10.2.0.5.0 - Production
CORE 10.2.0.5.0 Production
TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
then installed Grid Infrastructure(runInstaller) and chose "Installed Grid Infrastructure Software Only"!!! after that - need to run "root.sh" script.
$ su - root
# /u01/app/oracle/product/11.2.0/grid/root.sh
Running Oracle 11g root script...

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

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.

To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user:
/u01/app/oracle/product/11.2.0/grid/perl/bin/perl -I/u01/app/oracle/product/11.2.0/grid/perl/lib -I/u01/app/oracle/product/11.2.0/grid/crs/install /u01/app/oracle/product/11.2.0/grid/crs/install/roothas.pl

To configure Grid Infrastructure for a Cluster execute the following command:
/u01/app/oracle/product/11.2.0/grid/crs/config/config.sh
This command launches the Grid Infrastructure Configuration Wizard. The wizard also supports silent operation, and the parameters can be passed through the response file that is available in the installation media.
My some answer for question "Upgrade Grid Infrastructure to ASM after Installed Grid Infrastructure Software Only", that show above!!!
My Test is "Grid Infrastructure for a Stand-Alone Server", then
# /u01/app/oracle/product/11.2.0/grid/perl/bin/perl -I/u01/app/oracle/product/11.2.0/grid/perl/lib -I/u01/app/oracle/product/11.2.0/grid/crs/install /u01/app/oracle/product/11.2.0/grid/crs/install/roothas.pl

Using configuration parameter file: /u01/app/oracle/product/11.2.0/grid/crs/install/crsconfig_params
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 mytest successfully pinned.
Adding daemon to inittab
ACFS-9459: ADVM/ACFS is not supported on this OS version: '2.6.32-100.0.19.el5'
mytest 2011/01/12 00:49:30 /u01/app/oracle/product/11.2.0/grid/cdata/mytest/backup_20110112_004930.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
then check and upgrade ASM (reference)
$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid
$ export PATH=$ORACLE_HOME/bin:$PATH
$ crsctl query has releaseversion
Oracle High Availability Services release version on the local node is [11.2.0.2.0]

$ crsctl query has softwareversion
Oracle High Availability Services version on the local node is [11.2.0.2.0]

$ export ASMCA_ROLLING_UPGRADE=true
$ asmca
but found error:
So, start LISTENER and then "asmca" again but found
try "asmca" again
ASM upgraded, then check from "sqlplus":
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
+ASM

SQL> select name, state from v$asm_diskgroup;
NAME STATE
------------------------------ -----------
ASM_DG01 MOUNTED

SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0
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
However, ASM Disk Groups compatibility not change:
NAME COMPATIBILITY DATABASE_COMPATIBILITY
------------------------------ ------------------------------ ------------------------------
ASM_DG01 10.1.0.0.0 10.1.0.0.0
OK... this only shows answer, what we should do after "Installed Grid Infrastructure Software Only"

To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user:
/u01/app/oracle/product/11.2.0/grid/perl/bin/perl -I/u01/app/oracle/product/11.2.0/grid/perl/lib -I/u01/app/oracle/product/11.2.0/grid/crs/install /u01/app/oracle/product/11.2.0/grid/crs/install/roothas.pl

To configure Grid Infrastructure for a Cluster execute the following command:
/u01/app/oracle/product/11.2.0/grid/crs/config/config.sh

!!!

2 comments:

Anonymous said...

Good Job , this is very helpful . Many thanks for sharing

Anonymous said...

Thanks alot !