Oracle的sql监控

前端之家收集整理的这篇文章主要介绍了Oracle的sql监控前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
<!--StartFragment -->
线上sql抓取分析: 依照硬盘IO排列 SELECT*FROM(SELECTsql_ID,PARSING_USER_ID,EXECUTIONS,SORTS,COMMAND_TYPE,DISK_READSFROMV$sqlAREAWHEREPARSING_USER_ID!=0ORDERBYDISK_READSDESC)WHEREROWNUM<11 依照cpu使用排列 SELECT*FROM(SELECTsql_ID,DISK_READS,cpu_TIMEFROMV$sqlAREAWHEREPARSING_USER_ID!=0ORDERBYcpu_TIMEDESC)WHEREROWNUM<11 依照sqlID查询实际的sql SELECTsql_TEXTFROMV$sqlTEXTWHEREsql_ID='9brygt3kuuz7k'ORDERBYPIECEASC 根据SPID查询sql SELECTa.username,a.machine,a.program,a.sid,a.serial#,a.status,c.piece,c.sql_textFROMv$sessiona,v$processb,v$sqltextcWHEREb.spid='&spid'ANDb.addr=a.paddrANDa.sql_address=c.address(+)ORDERBYc.piece; 根据SPID查询连接信息 SELECTPID,SPID,USERNAME,SERIAL#,PROGRAMFROMV$PROCESSWHEREspid=

猜你在找的Oracle相关文章