Thursday, August 13, 2009

Removing disks from an ASM disk group

1 select group_number,name from v$asm_disk
2* order by group_number,name
SQL> /

GROUP_NUMBER NAME
------------ ------------------------------
1 ASM_ORADATA31_0000
1 ASM_ORADATA31_0001
1 ASM_ORADATA31_0002
1 ASM_ORADATA31_0003
1 ASM_ORADATA31_0004
1 ASM_ORADATA31_0005
2 ASM_ORADATA32_0000
2 ASM_ORADATA32_0001
2 ASM_ORADATA32_0002
2 ASM_ORADATA32_0003
2 ASM_ORADATA32_0004
2 ASM_ORADATA32_0005

12 rows selected.

SQL> ALTER DISKGROUP ASM_ORADATA31 DROP DISK ASM_ORADATA31_0005;

Diskgroup altered.

SQL> ALTER DISKGROUP ASM_ORADATA32 DROP DISK ASM_ORADATA32_0005;

Diskgroup altered.

SQL> select est_minutes from V$ASM_OPERATION;

EST_MINUTES
-----------
6