Home  >  Article  >  Database  >  通过进程id号知道一个Oracle会话所占用的内存

通过进程id号知道一个Oracle会话所占用的内存

WBOY
WBOYOriginal
2016-06-07 16:52:421210browse

我们如何知道一个Oracle会话占用的内存呢? session占用的pga内存: SELECT server, s.username, osuser, NAME, VALUE / 1024 / 1

我们如何知道一个Oracle会话占用的内存呢?
 
session占用的pga内存:

SELECT server, s.username, oSUSEr, NAME, VALUE / 1024 / 1024 MB, s.SID, s.serial#, spid
FROM v$session s, v$sesstat st, v$statname sn, v$process p
WHERE st.SID = s.SID
AND st.statistic# = sn.statistic#
AND sn.NAME LIKE 'session pga memory'
AND p.addr = s.paddr
ORDER BY VALUE DESC

其中,,spid是操作系统的进程id号,可以从unix上面查看其对应的会话。 

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn