Bo's Oracle Station

查看: 1321|回复: 0

2014-06-23-asm1.sql

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2014-6-25 22:39:04 | 显示全部楼层 |阅读模式
select  * from v$asm_disk;

select  * from v$asm_diskgroup;

select   d.path, g.name ,g.total_mb, g.free_mb,g.usable_file_mb
from v$asm_disk d , v$asm_diskgroup g
where d.group_number=g.group_number;



[oracle@station90 ~]$ . oraenv
ORACLE_SID = [orcl] ? +ASM
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid is /u01/app/oracle
[oracle@station90 ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 23 19:36:00 2014

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

SQL> conn / as sysasm
Connected.
SQL> create diskgroup mygroup  normal redundancy
  2  failgroup  myfailgroup1 disk
  3   '/dev/raw/raw20' name mydisk1,
  4  failgroup  myfailgroup2 disk
  5   '/dev/raw/raw21' name mydisk2;
failgroup  myfailgroup2 disk
*
ERROR at line 4:
ORA-15106: missing or invalid operating system disk locator string


SQL> ed
Wrote file afiedt.buf

  1  create diskgroup mygroup  normal redundancy
  2  failgroup        myfailgroup1 disk
  3   '/dev/raw/raw20' name mydisk1,
  4  failgroup        myfailgroup2 disk
  5*  '/dev/raw/raw21' name mydisk2
SQL> /
failgroup  myfailgroup2 disk
*
ERROR at line 4:
ORA-15106: missing or invalid operating system disk locator string


SQL> ed
Wrote file afiedt.buf

  1  create diskgroup mygroup  normal redundancy
  2  failgroup        myfailgroup1 disk
  3   '/dev/raw/raw20' name mydisk1
  4  failgroup        myfailgroup2 disk
  5*  '/dev/raw/raw21' name mydisk2
SQL> /

Diskgroup created.

SQL> drop diskgroup  mygroup;

Diskgroup dropped.

SQL> show parameter asm_power

NAME                                     TYPE
------------------------------------ ---------------------------------
VALUE
------------------------------
asm_power_limit                      integer
1
SQL> alter system set asm_power_limit=11;

System altered.

SQL> alter diskgroup data add disk
  2   '/dev/raw/raw20' name DATA_0005 size 964M,
  3   '/dev/raw/raw21' name DATA_0006 size 964M;

SQL> alter diskgroup data add disk
  2   '/dev/raw/raw20' name DATA_0006 size 964M,
  3   '/dev/raw/raw21' name DATA_0007 size 964M;

Diskgroup altered.

SQL> ed
Wrote file afiedt.buf

  1  alter diskgroup data drop disk
  2    DATA_0006 ,
  3*   DATA_0007
SQL> /

Diskgroup altered.

SQL>
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-12-5 09:46 , Processed in 0.047809 second(s), 24 queries .

快速回复 返回顶部 返回列表