вторник, 2 ноября 2010 г.

Использование сессиями ресурсов

# SID - Session ID
# Username - Name of the user
# Statistic - Name of the statistic
# Value - Current value

    select     ses.SID,
        nvl(ses.USERNAME,'ORACLE PROC') username,
        sn.NAME statistic,
        sest.VALUE
    from     v$session ses,
        v$statname sn,
        v$sesstat sest
    where     ses.SID = sest.SID
    and     sn.STATISTIC# = sest.STATISTIC#
    and     sest.VALUE is not null
    and     sest.VALUE != 0           
    order     by ses.USERNAME, ses.SID, sn.NAME

Комментариев нет:

Отправить комментарий