1.Monitor Current SQL Running(10g)
如下是Oracle10g Monitor Current SQL Running Script:
select vs.LAST_CALL_ET elapsed_time,vs.SID,vs.SERIAL#,vp.SPID,vs.USERNAME,vs.OSUSER,vs.MACHINE,
vs.EVENT,vs.PROGRAM,vs.MODULE,vs.SQL_ID,vsql.SQL_TEXT,vsql.SQL_FULLTEXT,vs.SCHEMANAME,vs.STATUS,vsql.EXECUTIONS,
(select value from v$sesstat where sid=vs.SID and statistic#=10 and rownum=1) "logical reads", --session logical reads
(select value from v$sesstat where sid=vs.SID and statistic#=59 and rownum=1) "physical reads", --physical reads
(select value from v$sesstat where sid=vs.SID and statistic#=64 and rownum=1) "block changes", --db block changes
(select value from v$sesstat where sid=vs.SID and statistic#=3 and rownum=1) "opened cursors current", --opened cursors current
(select value from v$sesstat where sid=vs.SID and statistic#=26 and rownum=1) "session pga memory", --session pga memory
vsql.COMMAND_TYPE,vsql.PLAN_HASH_VALUE,vs.ACTION,vs.LOGON_TIME,vs.TYPE,vs.SQL_HASH_VALUE,
vs.SADDR,vs.P1,vs.P2,vs.P3
from v$session vs,v$sqlarea vsql,v$process vp
where vs.SQL_ID=vsql.SQL_ID and vs.PADDR=vp.ADDR and vs.status='ACTIVE' order by 1 desc
select vs.LAST_CALL_ET elapsed_time,vs.SID,vs.SERIAL#,vp.SPID,vs.USERNAME,vs.OSUSER,vs.MACHINE,
vs.EVENT,vs.PROGRAM,vs.MODULE,vs.SQL_ID,vsql.SQL_TEXT,vsql.SQL_FULLTEXT,vs.SCHEMANAME,vs.STATUS,vsql.EXECUTIONS,
(select value from v$sesstat where sid=vs.SID and statistic#=10 and rownum=1) "logical reads", --session logical reads
(select value from v$sesstat where sid=vs.SID and statistic#=59 and rownum=1) "physical reads", --physical reads
(select value from v$sesstat where sid=vs.SID and statistic#=64 and rownum=1) "block changes", --db block changes
(select value from v$sesstat where sid=vs.SID and statistic#=3 and rownum=1) "opened cursors current", --opened cursors current
(select value from v$sesstat where sid=vs.SID and statistic#=26 and rownum=1) "session pga memory", --session pga memory
vsql.COMMAND_TYPE,vsql.PLAN_HASH_VALUE,vs.ACTION,vs.LOGON_TIME,vs.TYPE,vs.SQL_HASH_VALUE,
vs.SADDR,vs.P1,vs.P2,vs.P3
from v$session vs,v$sqlarea vsql,v$process vp
where vs.SQL_ID=vsql.SQL_ID and vs.PADDR=vp.ADDR and vs.status='ACTIVE' order by 1 desc
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24237320/viewspace-1982597/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Monitor Current SQL Running(10g)SQL
- [pl sql] where current ofSQL
- Slave_SQL_Running:Nomysql同步故障解決方法MySql
- Running Workload Repository Reports Using SQL ScriptsSQL
- pl/sql原始碼掃描sql(10g)SQL原始碼
- 【MySql】複製出現Slave_SQL_Running: No 錯誤解決MySql
- makes the current sessionSession
- 【Mysql】Slave_SQL_Running: No:Last_Error: Error :1032/1062MySqlASTError
- Oracle 10g glogin.sqlOracle 10gSQL
- [PL/SQL]10g PL/SQL學習筆記(一)SQL筆記
- [PL/SQL]10g PL/SQL學習筆記(二)SQL筆記
- [PL/SQL]10g PL/SQL學習筆記(三)SQL筆記
- gc current block pin time gc current block flush time 疑惑GCBloC
- mysql CURRENT_TIMESTAMP 和ON UPDATE CURRENT_TIMESTAMPMySql
- MySQL案例01:Last_SQL_Errno: 1755 Cannot execute the current event group in the parallel modeMySqlASTParallel
- SQL*Plus Enhancements in Oracle Database 10g(一)SQLOracleDatabase
- Migrate from SQL SERVER to Oracle 10GSQLServerOracle 10g
- Running the app on your deviceAPPdev
- Check the transaction running in oracleOracle
- Long running Operations in OracleOracle
- 【10g SQL新特性】q-quote使用SQL
- sql*menu5 sql*form3 使用10g客戶端SQLORM客戶端
- 遊標current of cur特性
- AUTHID DEFINER\authid current_user與alter session set current_schemaSession
- Laravel: Up and Running (1):介紹Laravel
- How to CANCEL a query running in another session?Session
- let definitions are not supported by current javascript versionJavaScript
- 【SQLSERVER】How to check current pool sizeSQLServer
- AUDIT IN SESSION CURRENT無法NOAUDITSession
- How to find Current open Cursors in OracleOracle
- alter system archive log current noswitch!!Hive
- 榮耀手環4 Running版評測 榮耀手環4 Running版值得買嗎?
- 使用alter session set current_schema=scott用explain plan for檢視scott使用者的sqlSessionAISQL
- 10g,11g sql auto tuning 測試SQL
- running-a-command-prompt-as-nt-authoritysystem
- squid!Your cache is running out of fileUI
- Scheduled Process Chain is not Running in SAP BW 7AI
- SAPOSCOL not running (Shared memory not available)AI