Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Track user resource usage
In past what I have done is ... in the logon trigger, I do
insert into stats_collection as select * from v$sesstat ;
in the logoff trigger ... you would again do the same thing, but this time update the values in stats_collection with the _difference_ between (v$sesstat.value - stats_collection.value) for the sid. There you have it .... you could of course restrict number of rows that you need by using specific stat names .... You get the idea?? YMMV
Works like a charm.
Raj
Received on Sat Feb 28 2004 - 10:22:09 CST