Lokeshaggarwal's DBA

Live the life you love. Love the life you live

Deleting an OCR in 11gR2


[root@rac2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2768
Available space (kbytes) : 259352
ID : 15574406
Device/File Name : +CRS
Device/File integrity check succeeded
Device/File Name : +DATA
Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

[root@rac2 bin]# ./ocrconfig -delete +DATA
[root@rac2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2768
Available space (kbytes) : 259352
ID : 15574406
Device/File Name : +CRS
Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

[root@rac2 bin]#

Advertisements

December 13, 2012 Posted by | ASM | Leave a comment

Adding an OCR on a separate Diskgroup 11gR2


[root@rac2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2768
Available space (kbytes) : 259352
ID : 15574406
Device/File Name : +CRS
Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

[root@rac2 bin]# /usr/sbin/oracleasm listdisks
DATA1
FRA
VOTE1

[root@rac2 bin]# ./ocrconfig -add +Data

PROT-30: The Oracle Cluster Registry location to be added is not accessible

What does this error mean?

By default when you create a diskgroup in 11gR2 RAC from the command prompt using SQL plus, the default compatibility attribute of the diskgroup is set to 10.1. This issue does not occur if you create it through ASMCA.

[oracle@rac2 bin]$ . oraenv

ORACLE_SID = [+ASM1] ?
The Oracle base for ORACLE_HOME=/raczone/grid_home1 is /raczone/11.2.0.1
[oracle@rac2 bin]$ ./sqlplus “/as sysdba”

SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 13 15:27:42 2012

Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – Production
With the Real Application Clusters and Automatic Storage Management options

SQL> desc v$asm_diskgroup
Name Null? Type
—————————————– ——– —————————-
GROUP_NUMBER NUMBER
NAME VARCHAR2(30)
SECTOR_SIZE NUMBER
BLOCK_SIZE NUMBER
ALLOCATION_UNIT_SIZE NUMBER
STATE VARCHAR2(11)
TYPE VARCHAR2(6)
TOTAL_MB NUMBER
FREE_MB NUMBER
HOT_USED_MB NUMBER
COLD_USED_MB NUMBER
REQUIRED_MIRROR_FREE_MB NUMBER
USABLE_FILE_MB NUMBER
OFFLINE_DISKS NUMBER
COMPATIBILITY VARCHAR2(60)
DATABASE_COMPATIBILITY VARCHAR2(60)
VOTING_FILES VARCHAR2(1)

SQL> select TOTAL_MB,FREE_MB,VOTING_FILES,ALLOCATION_UNIT_SIZE,BLOCK_SIZE from v$asm_diskgroup;

TOTAL_MB FREE_MB V ALLOCATION_UNIT_SIZE BLOCK_SIZE
———- ———- – ——————– ———-
1953 1557 N 1048576 4096
11445 8947 N 1048576 4096
7814 7484 N 1048576 4096

SQL> COL NAME FORMAT A12
SQL> COL COMPATIBILITY FORMAT A20
SQL> COL DATABASE_COMPATIBILITY FORMAT A20
SQL> SELECT NAME,COMPATIBILITY,DATABASE_COMPATIBILITY from v$asm_diskgroup;

NAME COMPATIBILITY DATABASE_COMPATIBILI
———— ——————– ——————–
CRS 11.2.0.0.0 10.1.0.0.0
DATA 11.2.0.0.0 10.1.0.0.0
FRA 11.2.0.0.0 10.1.0.0.0

[grid@rac2 bin]$ ./sqlplus “/as sysasm”

SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 13 15:38:42 2012

Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – Production
With the Real Application Clusters and Automatic Storage Management options

SQL> alter diskgroup data set ATTRIBUTE ‘COMPATIBILITY.ASM’=’11.2’;
alter diskgroup data set ATTRIBUTE ‘COMPATIBILITY.ASM’=’11.2’
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15242: could not set attribute COMPATIBILITY.ASM
ORA-15240: attribute name COMPATIBILITY.ASM is invalid
SQL> COL NAME FORMAT A12
SQL> COL COMPATIBILITY FORMAT A20
SQL> COL DATABASE_COMPATIBILITY FORMAT A20
SQL> SELECT NAME,COMPATIBILITY,DATABASE_COMPATIBILITY from v$asm_diskgroup;

NAME COMPATIBILITY DATABASE_COMPATIBILI
———— ——————– ——————–
CRS 11.2.0.0.0 10.1.0.0.0
DATA 11.2.0.0.0 10.1.0.0.0
FRA 11.2.0.0.0 10.1.0.0.0

SQL> alter diskgroup data set ATTRIBUTE ‘COMPATIBLE.RDBMS’=’11.2’;

Diskgroup altered.

SQL> alter diskgroup data set ATTRIBUTE ‘COMPATIBLE.ASM’=’11.2’;

Diskgroup altered.

SQL> SELECT NAME,COMPATIBILITY,DATABASE_COMPATIBILITY from v$asm_diskgroup;

NAME COMPATIBILITY DATABASE_COMPATIBILI
———— ——————– ——————–
CRS 11.2.0.0.0 10.1.0.0.0
DATA 11.2.0.0.0 11.2.0.0.0
FRA 11.2.0.0.0 10.1.0.0.0

SQL> host
[grid@rac2 bin]$

[root@rac2 bin]# cd /raczone/grid_home1/bin/
[root@rac2 bin]# ./ocrconfig -add +DATA
[root@rac2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2768
Available space (kbytes) : 259352
ID : 15574406
Device/File Name : +CRS
Device/File integrity check succeeded
Device/File Name : +DATA
Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

[root@rac2 bin]#

December 13, 2012 Posted by | ASM | Leave a comment