阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

Oracle ASM 常用命令

211次阅读
没有评论

共计 1710 个字符,预计需要花费 5 分钟才能阅读完成。

一些 Oracle ASM 常用命令整理。

01, 查看磁盘路径

select name,path,group_number from v$asm_disk_stat;

02, 查看磁盘组信息

select state,name,type,total_mb, free_mb from v$asm_diskgroup_stat ;

磁盘组状态为 Mounted 说明磁盘组状态正常;

磁盘组的 total_mb,free_mb 为非 0 说明可以读取磁盘信息, 获取磁盘大小。

Oracle ASM 常用命令

03, 查看磁盘组操作

select * from v$asm_operation;

 04, 查看磁盘组属性

SELECT dg.name AS diskgroup,SUBSTR(a.name,1,18) AS name,SUBSTR(a.value,1,24) AS value, read_only FROM v$ASM_DISKGROUP_STAT dg,
v$ASM_ATTRIBUTE a WHERE dg.name = ‘DATA’ AND dg.group_number = a.group_number;

 05, 查看磁盘组的兼容属性

SELECT name,COMPATIBILITY,DATABASE_COMPATIBILITY FROM V$ASM_DISKGROUP_STAT;

 06, 查看磁盘状态

SELECT SUBSTR(d.name,1,16) AS asmdisk,d.mount_status,HEADER_STATUS, d.state,dg.name AS diskgroup FROM V$ASM_DISKGROUP_STAT  dg,V$ASM_DISK_STAT d WHERE dg.group_number = d.group_number;

07, 查看磁盘客户端信息

SELECT dg.name AS diskgroup,SUBSTR(c.instance_name,1,12) AS instance,SUBSTR(c.db_name,1,12) AS dbname,SUBSTR(c.SOFTWARE_VERSION,1,12) AS software, SUBSTR(c.COMPATIBLE_VERSION,1,12) AS compatible FROM V$ASM_DISKGROUP_STAT  dg, V$ASM_CLIENT c WHERE dg.group_number = c.group_number;

 08, 查看磁盘访问控制用户信息

SELECT dg.name AS diskgroup, u.group_number,u.user_number, u.os_id, u.os_name FROM V$ASM_DISKGROUP_STAT  dg, V$ASM_USER u WHERE dg.group_number = u.group_number AND dg.name =’DATA’;

09, 查看磁盘访问控制组信息

SELECT dg.name AS diskgroup, ug.group_number,ug.owner_number, u.os_name,ug.usergroup_number, ug.name FROM V$ASM_DISKGROUP_STAT dg,V$ASM_USER u, V$ASM_USERGROUP ug WHERE dg.group_number = ug.group_number AND dg.name =’DATA’ AND ug.owner_number = u.user_number;

10, 查看智能数据分布信息

SELECT dg.name AS diskgroup, f.file_number, f.primary_region,f.mirror_region,f.hot_reads,f.hot_writes, f.cold_reads, f.cold_writes FROM V$ASM_DISKGROUP_STAT  dg, V$ASM_FILE f WHERE dg.group_number = f.group_number and dg.name =’DATA’;

更多 Oracle 相关信息见 Oracle 专题页面 https://www.linuxidc.com/topicnews.aspx?tid=12

正文完
星哥玩云-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-22发表,共计1710字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中