Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: 'user commits' statistic for one user
select v$sesstat.value
from v$sesstat ,v$session
where v$sesstat.sid= v$session.sid
and v$session.username='SYS'
and v$sesstat.STATISTIC# =9
Rem 9 = session logical reads or 4 = user commits
Will this give me all the 'user commits' (transactions) for user SYS?
Thanks
"Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message
news:tg5g9r7qc2vk87_at_beta-news.demon.nl...
>
> "Jack" <No_at_Mail.Please> wrote in message
> news:jkyM6.31453$662.165155_at_news1-hme0...
> > Hi
> > Is there a way of finding the number of 'user commits' (or number of
> > transactions) for one user only?
> >
> > Thanks
> >
> >
>
> If you need the sid of the session
> you can use v$sesstat where sid = <yoursid>
>
> You can know the sid by
> running
> select sid
> from v$session
> where audsid = userenv('sessionid')
> /
>
> in your program.
>
> Hth,
>
> Sybrand Bakker, Oracle DBA
>
>
>
Received on Thu May 17 2001 - 04:52:20 CDT