oracle asm实例信息查询与收集
oracle收集asm实例信息
以下这个脚本用于方便收集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