DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: How to check Current Session Memory

  1. #1
    Join Date
    Dec 2001
    Location
    USA
    Posts
    620

    How to check Current Session Memory

    Hi all,

    On Windows based Oracle 8i, is there any way to check how much physical memory of the server is being utilized by each database session/connection?

    Thanks in Adv.
    Sam
    ------------------------
    To handle yourself, use your head. To handle others, use your heart

  2. #2
    Join Date
    Feb 2001
    Location
    Bombay,India
    Posts
    530

    Re: How to check Current Session Memory

    Hi,
    select n.name,s.valuefrom
    v$statname n,V$sesstat swhere n.statistic# = s.statistic#and
    value > 0 and
    s.sid = (select a.sid from v$process p,v$session a where p.addr =a.paddr and a.audsid = userenv('sessionid'))order by n.class,n.name



    Regards,
    Rohit Nirkhe,Oracle/Apps DBA,OCP 8i,9i
    oracle-support@indiatimes.com
    Thanks and Regards
    Rohit S Nirkhe
    rohitsnirkhe@rediffmail.com

  3. #3
    Join Date
    Dec 2001
    Location
    USA
    Posts
    620

    Re: Re: How to check Current Session Memory

    Hi rohitsn,

    This query errors out with ORA-01427 Single-row subquery returns more than one row error.

    Thanks,
    Sam
    ------------------------
    To handle yourself, use your head. To handle others, use your heart

  4. #4
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Hi Rohit,

    why do you refer to v$process ? isn't this enough?
    Code:
    select n.name, s.value
    from  v$statname n, v$sesstat s, v$session a
    where n.statistic# = s.statistic#
    and   value > 0 
    and   s.sid = a.sid
    and   a.audsid = userenv('sessionid')
    order by n.class, n.name
    /

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width