ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle 收集asm实例信息

oracle 收集asm实例信息

原创 Linux操作系统 作者:paulyibinyi 时间:2011-05-05 15:59:43 0 删除 编辑
  以下这个脚本用于方便收集asm实例信息,以便出故障后,能够快速解决问题:
生成的是html文件
 
spool dbcollect_$ORACLE_SID.html
!date >> dbcollect_$ORACLE_SID.html
SET MARKUP HTML ON
set echo on
set pagesize 200
alter session set nls_date_format='YYYY-MM-DD HH24:MI:SS';
select 'THIS ASM REPORT WAS GENERATED AT: ==)> ' , sysdate " " from dual;
select 'HOSTNAME ASSOCIATED WITH THIS ASM INSTANCE: ==)> ' , MACHINE " " from v$session where program like '%SMON%';
select * from v$asm_diskgroup;
SELECT * FROM V$ASM_DISK ORDER BY GROUP_NUMBER,DISK_NUMBER;
SELECT * FROM V$ASM_CLIENT;
select * from V$ASM_ATTRIBUTE;
select * from v$asm_operation;
select * from gv$asm_operation;
select * from v$version;
SELECT * FROM  V$ASM_CLIENT; 
SELECT * FROM  V$ASM_DISK_STAT ORDER BY GROUP_NUMBER,DISK_NUMBER; 
SELECT * FROM  V$ASM_DISKGROUP_STAT ORDER BY GROUP_NUMBER; 
SELECT * FROM  V$ASM_FILE ORDER BY GROUP_NUMBER,FILE_NUMBER; 
SELECT * FROM  V$ASM_ALIAS ORDER BY GROUP_NUMBER,FILE_NUMBER; 
SELECT * FROM  V$ASM_TEMPLATE ORDER BY GROUP_NUMBER,ENTRY_NUMBER; 
show parameter asm
show parameter cluster
show parameter instance_type
show parameter instance_name
show parameter spfile
show sga
spool off
exit

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7199859/viewspace-694523/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
学习数据库

注册时间:2007-12-11

  • 博文量
    902
  • 访问量
    6596207