Oracle DB Express 11 - 如何显示SGA PGA信息?

时间:2012-03-06 17:47:40

标签: database oracle

如何显示有关SGA / PGA使用情况的信息?

使用sql命令行或sql developer(?)

1 个答案:

答案 0 :(得分:4)

SGA在sqlplus(命令行工具)中只是show sga,对于PGA,你应该在这里找到一个查询:

http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4269591917792

这是查询:

 SELECT name, sum(value/1024) "Value - KB"
   FROM v$statname n,
        v$session s,
        v$sesstat t
  WHERE s.sid=t.sid
    AND n.statistic# = t.statistic#
    AND s.type = 'USER'
    AND s.username is not NULL
    AND n.name in ('session pga memory', 'session pga memory max', 
        'session uga memory', 'session uga memory max')
  GROUP BY name
 /