oracle 11g asm diskgroup compatibility-凯发app官方网站

凯发app官方网站-凯发k8官网下载客户端中心 | | 凯发app官方网站-凯发k8官网下载客户端中心
  • 博客访问: 3977059
  • 博文数量: 536
  • 博客积分: 10470
  • 博客等级: 上将
  • 技术积分: 4825
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-26 14:08
文章分类

全部博文(536)

文章存档

2024年(3)

2021年(1)

2019年(1)

2017年(1)

2016年(2)

2013年(2)

2012年(10)

2011年(43)

2010年(10)

2009年(17)

2008年(121)

2007年(252)

2006年(73)

相关博文
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·

分类: oracle

2009-09-30 11:02:56

by: alex gorbachev

back in april i was at and delivered a presentation on 11g — , including oracle 11g asm features. the first asm slide was about diskgroup compatibility, and i have a bit more to share than i said back then.

every diskgroup in asm has two compatibility attributes — compatible.asm and compatible.rdbms. in 10.2, the v$asm_diskgroup view has a couple new columns added — compatibility and database_compatibility, but only in 11g did oracle introduce the concept of diskgroup attributes and the v$asm_attribute view. thus, there are two ways to check the diskgroup attributes in 11g:

sql> col compatibility form a10
sql> col database_compatibility form a10
sql> col name form a20
sql> select group_number, name,
compatibility, database_compatibility from v$asm_diskgroup;

group_number name compatibil database_c
------------ -------------------- ---------- ----------
1 dg1 11.1.0.0.0 11.1.0.0.0
2 dg2 10.1.0.0.0 10.1.0.0.0

sql> col value form a10
sql> select group_number, name, value from v$asm_attribute;

group_number name value
------------ -------------------- ----------
1 disk_repair_time 3.6h
1 au_size 1048576
1 compatible.asm 11.1.0.0.0
1 compatible.rdbms 11.1

note that v$asm_attributes is filled only when compatible.asm is set to 11.1. what’s important is that you can only change compatibility level upwards; there is no way to reset it back to the lower value. compatibility attributes can be changed online one at a time:

sql> alter diskgroup dg2 set attribute 'compatible.asm'='11.1';

diskgroup altered.

sql> alter diskgroup dg2 set attribute 'compatible.rdbms'='11.1';

diskgroup altered.

sql> select group_number, name, compatibility, database_compatibility from v$asm_diskgroup;

group_number name compatibil database_c
------------ -------------------- ---------- ----------
1 dg1 11.1.0.0.0 11.1.0.0.0
2 dg2 11.1.0.0.0 11.1.0.0.0

what are compatibility attributes are useful for? they are very handy for upgrades and migrations when asm diskgroups need to be available for asm instances and database instances of different versions. depending on the migration path, you might need to be able to access some diskgroups from different versions of asm and different database instances. it might also be useful for transportable tablespaces between 10g and 11g databases.

the compatible.asm diskgroup attribute controls the format of the asm diskgroup metadata. only asm instances with a software version equal to or greater than compatible.asm can mount the diskgroup.

the compatible.rdbms diskgroup attribute determines the format of asm files themselves. the diskgroup can be accessed by any database instance with a compatible init.ora parameter set equal to or higher than the compatible.rdbms attribute. note that the compatible.rdbms attribute can be set to 10.2 as well, but i couldn’t see if there were any differences in the feature set except that the compatible.rdbms=10.2 setting requires a database instance with the compatible parameter set to 10.2 or higher. compatible.asm cannot be set below 11.1 except when it’s already 10.1 by default.

the compatible.rdbms attribute can be changed only if compatible.asm is advanced to 11.1. otherwise, you get the following error message:

sql> alter diskgroup dg2 set attribute 'compatible.rdbms'='11.1';
alter diskgroup dg2 set attribute 'compatible.rdbms'='11.1'
*
error at line 1:
ora-15032: not all alterations performed
ora-15242: could not set attribute compatible.rdbms
ora-15221: asm operation requires compatible.asm of 11.1.0.0.0 or higher

when creating a new diskgroup, compatibility attributes can be explicitly specified. it is interesting that the default is still 10.1 for both attributes even when the diskgroup is created from an asm 10g instance and all connected databases are of 11g version. oracle is conservative here.

during the collaborate presentation, jeremy schneider asked me if there is a way to control the default compatibility version and, at that time, i didn’t know how to set the default compatibility to 11.1. now that i have had a bit of time to look into it, i found couple hidden underscore parameters: _asm_compatibility and _rdbms_compatibility:

sql> select i.ksppinm, v.ksppstvl from x$ksppi i, x$ksppcv v
2 where i.ksppinm in ('_rdbms_compatibility','_asm_compatibility')
3 and i.indx=v.indx;

ksppinm ksppstvl
------------------------------ ----------
_asm_compatibility 10.1
_rdbms_compatibility 10.1

let’s test.

sql> alter system set "_asm_compatibility"='11.1' scope=spfile;

system altered.

sql> alter system set "_rdbms_compatibility"='11.1' scope=spfile;

system altered.

sql> shutdown immediate
asm diskgroups dismounted
asm instance shutdown
sql> startup
asm instance started

total system global area 284565504 bytes
fixed size 1299428 bytes
variable size 258100252 bytes
asm cache 25165824 bytes
asm diskgroups mounted
sql> select i.ksppinm, v.ksppstvl from x$ksppi i, x$ksppcv v
2 where i.ksppinm in ('_rdbms_compatibility','_asm_compatibility')
3 and i.indx=v.indx;

ksppinm ksppstvl
------------------------------ ----------
_asm_compatibility 11.1
_rdbms_compatibility 11.1

sql> create diskgroup dg3 external redundancy disk '/asm1/dg2-50mb-1.asm';

diskgroup created.

sql> select name, compatibility, database_compatibility
2 from v$asm_diskgroup where name='dg3';

name compatibil database_c
-------------------- ---------- ----------
dg3 11.1.0.0.0 11.1.0.0.0

now what features are available with different compatibility settings?

diskgroup attributes

compatible.asm — 11.1
compatible.rdbms — any

non-default allocation unit size

for au sizes 1-8 mb, both compatibility attributes can be 10.1.

sql> select group_number, allocation_unit_size, compatibility, database_compatibility
2 from v$asm_diskgroup where name='dg4';

group_number allocation_unit_size compatibil database_c
------------ -------------------- ---------- ----------
3 2097152 10.1.0.0.0 10.1.0.0.0

sql> select group_number, name, value from v$asm_attribute
2 where group_number=3;

no rows selected

the absence of the attribute au_size in v$asm_attribute is confusing, but recall that attributes are displayed only when compatible.asm is set to 11.1.

sql> select group_number, name, value from v$asm_attribute
2 where group_number=3;

group_number name value
------------ -------------------- --------------------
3 disk_repair_time 3.6h
3 au_size 2097152
3 compatible.asm 11.1.0.0.0
3 compatible.rdbms 10.1.0.0.0

for au sizes 16-64 mb both compatibility attributes must be 11.1.

the rest of 11g’s asm new features — fast mirror resync, variable size extents, preferred read failure groups

both compatible.asm and compatible.rdbms must be set to 11.1.

it looks like one of our customers is going to production with the new 11g rac cluster on asm using some of these new asm features, so i’m looking forward to see how well it works in real life.

阅读(5161) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
")); function link(t){ var href= $(t).attr('href'); href ="?url=" encodeuricomponent(location.href); $(t).attr('href',href); //setcookie("returnouturl", location.href, 60, "/"); }
网站地图