oracle 11g asm 介绍,oracle 11g asm 基本操作

oracle 11g asm 基本操作

相关视图:

v$asm_diskgroup

v$asm_disk

v$asm_operation

----添加,删除磁盘

ALTER DISKGROUP diskgroup_name

{ ADD ... }

{ DROP ... }

[ REBALANCE [POWER integer] [WAIT | NOWAIT] ]

;

eg:(避免多次 rebalance 操作)

ALTER DISKGROUP FRA

ADD DISK 'ORCL:SDE7' NAME 'FRA_DISK5' SIZE 977 M ,

'ORCL:SDE8' NAME 'FRA_DISK6' SIZE 977 M

DROP DISK FRA_DISK1, FRA_DISK2;

----添加,删除故障组

ALTER DISKGROUP FRA

DROP DISKS IN FAILGROUP FAIL2

REBALANCE POWER 1;

ALTER DISKGROUP FRA

ADD FAILGROUP FAIL2

DISK 'ORCL:SDE11' SIZE 977 M ,'ORCL:SDE12' SIZE 977 M

DROP DISKS IN FAILGROUP FAIL1

REBALANCE POWER 11 WAIT;

ALTER DISKGROUP FRA

ADD FAILGROUP FAIL1

DISK 'ORCL:SDE9' SIZE 977 M ,'ORCL:SDE10' SIZE 977 M

REBALANCE POWER 0;

----取消磁盘删除操作:

ALTER DISKGROUP

{ diskgroup_name [, diskgroup_name ] ...

| ALL

}

UNDROP DISKS

;

eg:

ALTER DISKGROUP DATA UNDROP DISKS;

ALTER DISKGROUP DATA2, DATA3 UNDROP DISKS;

ALTER DISKGROUP ALL UNDROP DISKS;

注意:This statement cannot be used to restore disks that are bei ng dropped as the result of a  DROP DISKGROUP statement, or for disks that are being dropped using the FORCEclause.

----挂载,卸载磁盘组

ALTER DISKGROUP

{ diskgroup_name [, diskgroup_name ] ...

| ALL

}

{ MOUNT [ RESTRICTED | NORMAL ]

[ FORCE | NOFORCE ]

| DISMOUNT [ FORCE | NOFORCE ]

}

;

eg:

ALTER DISKGROUP DATA MOUNT;

ALTER DISKGROUP DATA2, DATA3 MOUNT;

ALTER DISKGROUP ALL DISMOUNT;

注意:If you try to dismount a disk group that contains  open files, the statement will fail, unless you also specify the  FORCEclause. If you  DISMOUNT FORCE, the files in the disk group become immediately inaccessible to your databases, and  any operations involving

those files will fail. In extreme cases, your database instance will abort if a disk group that it uses is forcibly dismounted.

-----查看链接客户端

V$ASM_CLIENT

asmcmd>lsct

----删除磁盘组

DROP DISKGROUP diskgroup_name

[  FORCE INCLUDING CONTENTS

| { INCLUDING | EXCLUDING } CONTENTS

]

;

eg:

DROP DISKGROUP DATA;

DROP DISKGROUP DATA2 INCLUDING CONTENTS;

DROP DISKGROUP DATA3 FORCE INCLUDING CONTENTS;

注意:

If you cannot mount a disk group but need to drop it, you can use the  FORCE INCLUDING CONTENTS option. This enables you to remove the headers on disks that belong to a disk group that cannot be mounted by a ny ASM instances. When you use the FORCE INCLUDING

CONTENTS option, the ASM instance does not atte mpt to verify that the disk group is being used by another ASM instance.

----检查磁盘组元数据的一致性

ALTER DISKGROUP diskgroup_name CHECK [ REPAIR | NOREPAIR ];

--REPAIR option to resolve inconsistencies.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值