数据百科

您现在的位置是:首页 > 数据库 > oracle

oracle

oracle 11g asm 磁盘组兼容属性及设置

2020-09-03 18:09:19数据百科
从oracle 11g版本开始,asm磁盘组会有两个新属性来兼容asm版本和数据库版本 COMPATIBLE.ASM - The minimum version of the ASM software that can access the disk group. I

从oracle 11g版本开始,asm磁盘组会有两个新属性来兼容asm版本和数据库版本

  • COMPATIBLE.ASM - The minimum version of the ASM software that can access the disk group. In 11g, the default setting is 10.1.
  • COMPATIBLE.RDBMS - The minimum COMPATIBLE database initialization parameter setting for any database instance that uses the disk group. In 11g, the default setting is 10.1.
磁盘组的兼容性参数:
-compatible.asm:最低版本的asm软件,这也会影响asm元数据在磁盘中的结构
-compatible.rdbms:最低版本的rdbms软件,决定了rdbms是否能够mount上asm磁盘
 

1.创建asm磁盘组时可以指定对应版本

CREATE DISKGROUP data DISK '/dev/raw/*' ATTRIBUTE 'compatible.asm' = '11.1';

CREATE DISKGROUP data DISK '/dev/raw/*' ATTRIBUTE 'compatible.rdbms' = '11.1', 'compatible.asm' = '11.1';

2.如果没加属性数据库和asm版本均默认为10.1

SQL>  SELECT group_number, name, compatibility, database_compatibility FROM v$asm_diskgroup;

GROUP_NUMBER NAME       COMPATIBILITY        DATABASE_COMPATIBILI
------------ ---------- -------------------- --------------------
           1 ASM_DG                         10.1.0.0.0           10.1.0.0.0
  
3.对已有的磁盘组进行属性修改

ALTER DISKGROUP asm_dg SET ATTRIBUTE 'compatible.asm' = '11.1';
ALTER DISKGROUP asm_dg SET ATTRIBUTE 'compatible.rdbms' = '11.1';

也可以通过asmcmd命令修改
asmcmd setattr -G ASM_DG compatible.asm 11.2.0.2.0
asmcmd setattr -G ASM_DG compatible.rdbms 11.2.0.2.0
 

4.检查结果

COLUMN name FORMAT A10
COLUMN compatibility FORMAT A20
COLUMN database_compatibility FORMAT A20

SELECT group_number, name, compatibility, database_compatibility FROM v$asm_diskgroup;

GROUP_NUMBER NAME       COMPATIBILITY        DATABASE_COMPATIBILI
------------ ---------- -------------------- --------------------
           1 ASM_DG       11.1.0.0.0           11.1.0.0.0

1 row selected.

SQL>

COLUMN name FORMAT A20
COLUMN value FORMAT A20

SELECT group_number, name, value FROM v$asm_attribute ORDER BY group_number, name;

GROUP_NUMBER NAME                 VALUE
------------ -------------------- --------------------
           1 au_size              1048576
           1 compatible.asm       11.1.0.0.0
           1 compatible.rdbms     11.1
           1 disk_repair_time     3.6h

4 rows selected.

SQL>