plsql dev

访问v$session,v$sesstat and v$statname视图的权限

grant create session,resource to chf;

grantselectonv_$session tochf;

grantselectonv_$sesstat tochf;

grant select on v_$statname to chf;

SELECT TABLE_NAME FROM USER_TAB_PRIVS;

SELECT C.NAME, B.STATISTIC#, B.VALUE
  FROM V$SESSION A, V$SESSTAT B, V$STATNAME C
 WHERE A.SID = B.SID
   AND A.AUDSID = USERENV('SESSIONID')
   AND B.STATISTIC# = C.STATISTIC#
   ORDER BY C.STATISTIC#;

原文地址:https://www.cnblogs.com/klxll/p/3434996.html