Skip to Content
avatar image
Former Member

SAP HANA : How to determine how much memory a user is using ?


We are using SAP HANA 1.0 SPS12. We have created one dedicated user for each application. Some of our applications are very memory consumming.

We would like to know how to check which user are using more memory ?

How to determine how much memory a user is using ?

I have found a SQL query for Oracle Database : and I have also checked "SQL Statement Collection for SAP HANA" but "HANA_Memory_TopConsumers_1.00.85+" query didn't provided the username.

Is there a SQL query to do that ?

I would like to avoid traces for the moment.

Thank you !

Add comment
10|10000 characters needed characters exceeded

  • Former Member


    I would prefer to have SQL query instead traces.

    Is it someone can provided a SQL query ?

    I have tried to translate the following Oracle query in an HANA compatible...

    SELECT to_char(ssn.sid, '9999') || ' - ' || nvl(ssn.username, nvl(, 'background')) ||
    nvl(lower(ssn.machine), ins.host_name) "SESSION",
    to_char(prc.spid, '999999999') "PID/THREAD",
    to_char((se1.value/1024)/1024, '999G999G990D00') || ' MB' " CURRENT SIZE",
    to_char((se2.value/1024)/1024, '999G999G990D00') || ' MB' " MAXIMUM SIZE"
    FROM v$sesstat se1, v$sesstat se2, v$session ssn, v$bgprocess bgp, v$process prc,
    v$instance ins, v$statname stat1, v$statname stat2
    WHERE se1.statistic# = stat1.statistic# and = 'session pga memory'
    AND se2.statistic# = stat2.statistic# and = 'session pga memory max'
    AND se1.sid = ssn.sid
    AND se2.sid = ssn.sid
    AND ssn.paddr = bgp.paddr (+)
    AND ssn.paddr = prc.addr (+);

  • Get RSS Feed

1 Answer

  • Oct 11, 2017 at 09:47 PM

    besides a query your admin can set up traces per user to see what is causing these issues if you want to identify per DB user.

    i am not sure of the query but traces could also work as for what you need

    Add comment
    10|10000 characters needed characters exceeded