In this Document
Applies to:
Oracle Database - Enterprise Edition - Version 11.2.0.1 to 11.2.0.2 [Release 11.2]
Oracle Database - Enterprise Edition - Version 12.1.0.2 to 12.1.0.2 [Release 12.1]
Generic UNIX
Generic Linux
Symptoms
The diskgroups can not be shown when ASM was selected to store the database during create database with dbca. The dbca trace file shows the following:
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.333 CST ] [DiskGroupsPanel.initialize:221] Loading Data in the Table..
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.334 CST ] [DiskGroupDataSource.loadData:308] Load the data from the datasource
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.334 CST ] [ASMUtils.loadDiskGroups:633] sql to be executed:=select NAME||'|'||round(TOTAL_MB)||'|'||round(USABLE_FILE_MB)||'|'||nvl(TYPE, 'DBCA_NULL')||'|'||STATE from v$asm_diskgroup order by NAME using sqlengine <============== this is the query to get diskgroup informaiton.
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.334 CST ] [OracleHome.getVersion:877] OracleHome.getVersion called. Current Version: null
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.339 CST ] [InventoryUtil.getOUIInvSession:347] setting OUI READ level to ACCESSLEVEL_READ_LOCKLESS
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.339 CST ] [OracleHome.getVersion:896] Homeinfo /app/11.2.0/grid,1
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.339 CST ] [Version.isPre:274] version to be checked 11.2.0.1.0 major version to check against10
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.339 CST ] [Version.isPre:285] isPre.java: Returning FALSE
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.340 CST ] [OCR.loadLibrary:308]
......
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.540 CST ] [SQLEngine.done:2148] Done called
[AWT-EventQueue-0] [ 2010-11-22 19:11:51.540 CST ] [ASMUtils.loadDiskGroups:713] ORA-01034: ORACLE not available <== error reported.
Changes
Fresh installation of 11.2 database using ASM.
Cause
The root cause can be anyone of the following:
1. Incorrect permission setting for oracle user
2. ASM instance was not started or diskgroups are not mounted.
3. The diskgroup resources are not online.
4. The permission setting for the asm devices are incorrect.
5. The oracle executable under /bin has incorrect permission settings.
6. the file system for grid home was mounted with option 'nosuid'.
7. incorrect crs_home setting in file olr.loc.
8. "DIAG_ADR_ENABLED" is set to OFF (non-default) but environment variable "ORA_CLIENTTRACE_DIR" is not set. This only apply to version 12c.
Solution
Make sure all the above factors are met:
1. Correct permission setting for oracle user
e.g:[root@db01 ~]# id oracle
uid=502(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),506(asmdba)<== the oracle user is a member of asmdba group
2. ASM instance has been started and diskgroups has been mounted.
e.g:SQL> select name,state,type from v$asm_diskgroup; <== the asm diskgroups have been mounted and the query on v$asm_diskgroup can return rows with grid user
NAME STATE TYPE
------------------------------ ----------- ------
OCR_VOTE MOUNTED NORMAL
ORADATA MOUNTED NORMAL
ORAFLASH MOUNTED NORMAL
......
3. The diskgroup resources are online.
e.g:[grid@db01 cfgtoollogs]$ crsctl stat resource -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
......
ora.OCR_VOTE.dg
ONLINE ONLINE db01
ONLINE ONLINE db02
ora.ORADATA.dg
ONLINE ONLINE db01
ONLINE ONLINE db02 <=== diskgroup resources are online.
4. The permission setting for the asm devices are correct.
[grid@db01 cfgtoollogs]$ ls -l /dev/oracleasm/disks
total 0
brw-rw---- 1 grid asmdba 8, 33 Nov 4 15:35 DATA
brw-rw---- 1 grid asmdba 8, 49 Nov 4 15:35 OCR_VOTE
brw-rw---- 1 grid asmdba 8, 17 Nov 4 15:35 RECO
......
5. Ownership and permission of the oracle executable under /bin are correct.
e.g: -rwsr-s--x 1 grid oinstall 152400480 Feb 3 2010 oracle
6. Do not mount grid home with option 'nosuid', because this will disable set-user-identifier or set-group-identifier bits and this is the way user 'oracle' access asm instance.
#mount -o nosuid,rw -t ext3 /dev/sdb1 /opt/grid
7. The ASM's owner has correct permission on GI_BASE and GI_HOME (ie,755)
e.g: drwxr-xr-x 8 grid oinstall 4096 Oct 10 01:42 /u01/app/grid
drwxr-xr-x 66 root oinstall 4096 Oct 3 09:40 /u01/app/11.2.0/grid
make sure the option of crs_home set to correct GI home in file olr.loc(e.g: /etc/oracle/olr.loc).
8.The fix is to either set sqlnet.ora parameter "DIAG_ADR_ENABLED" to ON (the default value), or set sqlnet.ora parameter "DIAG_ADR_ENABLED" to OFF and set environment variable "ORA_CLIENTTRACE_DIR" to a valid directory.