Oracle 11gR2 ASM磁盘组管理与新特性实践(2)

SQL> col name format a30
SQL> col value format a30
SQL> set linesize 200
SQL> select name,value from v$asm_attribute where name like 'compatible.%' and group_number=(
  2  select group_number from v$asm_diskgroup where);

NAME                          VALUE
------------------------------ ------------------------------
compatible.asm                11.2.0.0.0
compatible.rdbms              11.2.0.0.0
compatible.advm                11.2.0.0.0

磁盘默认的可脱机时间为3.6小时,可以通过修改磁盘组的disk_repair_time属性来调整这个值(H或者h表示小时,M或者m表示分钟):
SQL> select name,value from v$asm_attribute where and group_number=(
  2  select group_number from v$asm_diskgroup where);

NAME                          VALUE
------------------------------ ------------------------------
disk_repair_time              3.6h

SQL> alter diskgroup data set attribute 'disk_repair_time'='4.5h';

Diskgroup altered.

SQL> select name,value from v$asm_attribute where and group_number=(
  2  select group_number from v$asm_diskgroup where);

NAME                          VALUE
------------------------------ ------------------------------
disk_repair_time              4.5h

另外还可以使用ALTER DISKGROUP的DROP AFTER子句来覆盖磁盘组的disk_repair_time属性:
SQL> select name,group_number from v$asm_diskgroup where;

NAME                          GROUP_NUMBER
------------------------------ ------------
DATA                                      2

SQL>
SQL> select group_number,name,state from v$asm_disk where group_number=2;

GROUP_NUMBER NAME                          STATE
------------ ------------------------------ ----------------
          2 DATA02                        NORMAL
          2 DATA01                        NORMAL

SQL> alter diskgroup data offline disk data02;

Diskgroup altered.

SQL> alter diskgroup data online disk data02;

Diskgroup altered.

SQL> alter diskgroup data offline disk data02 drop after 20m;

Diskgroup altered.

SQL> alter diskgroup data online disk data02;

Diskgroup altered.

四.SYSASM权限和OSASM(asmadmin)系统组。

为了使管理更加有针对性,Oracle 11gR2将管理权限进行细化,管理ASM的操作系统组叫做OSASM(asmadmin),凡是属于该组的用户都可以以sysasm的身份登录ASM实例。sysasm权限是管理ASM的最高权限,可以执行所有的ASM实例管理操作;另外还保留了sysdba权限,被赋予该权限的ASM用户只能执行普通的管理操作。SYSASM、SYSDBA是ASM实例用户具有的权限,asmadmin是操作系统组。
  [grid@rhel2 ~]$ id grid
uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1100(asmadmin),1300(asmdba),1301(asmoper)
[grid@rhel2 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.2.0 Production on Wed Jul 10 06:24:31 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> create user asm_check identified by asm_check;

User created.

SQL> grant sysasm to asm_check;

Grant succeeded.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
[grid@rhel2 ~]$ sqlplus asm_check/asm_check as sysasm

SQL*Plus: Release 11.2.0.2.0 Production on Wed Jul 10 06:25:34 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> show user
USER is "SYS"

五.AU_SIZE大小设置。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/69d7ef81cdde232e9117d3b3fff43c4b.html