tags:

views:

53

answers:

1

My boss would like to find a way for a running executable to ask Oracle, the size of the resources that the program is used. The purpose behind this is so that we can add to the user documentation/capacity planning documentation information on the size of the resources needed for each program.

My Google-Fu is weak today, and I really haven't been able to find anything in the docs or online that point toward an API that would help me accomplish this.

Does anyone have any experiences they can share? Or suggest leads for me to follow?

All on topic answers get +1, as a thank you.

Evil.

+1  A: 

This query will show you session statistics by their description.

select v$statname.name, v$mystat.value
from
    v$mystat,
    v$statname
where
    v$mystat.statistic# = v$statname.statistic#

Descriptions of the various statistics (for 10g) are here:

http://download.oracle.com/docs/cd/B19306%5F01/server.102/b14237/stats002.htm

There's other useful information in v$session:

select *
from v$session
where sid = ( select distinct sid from v$mystat )
Rob F