Re: table accesing

From: ddf <oratune_at_msn.com>
Date: Wed, 17 Dec 2008 06:16:01 -0800 (PST)
Message-ID: <d3fbed00-e128-45c2-b7fb-94fe67e95238@z28g2000prd.googlegroups.com>


On Dec 17, 7:14 am, Noons <wizofo..._at_yahoo.com.au> wrote:
> gazzag wrote,on my timestamp of 17/12/2008 11:29 PM:
>
> > On 17 Dec, 12:30, Noons <wizofo..._at_yahoo.com.au> wrote:
> >> mehraj hussain wrote,on my timestamp of 17/12/2008 7:37 PM:
>
> >>> hi, i have table called employees..
> >>> many users are accescing this table at a time .. how can i find which
> >>> users is accesing that table presently...
> >> back in the old days, v$access had that info.
> >> Dunno if it's still usable
>
> > According to this,http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynvie...
>
> > "V$ACCESS displays information about locks that are currently imposed
> > on library cache objects."
>
> Exactly.  Check its definition.  Use it to fish out
> which tables are in use. It shows the SID, owner,
> name and type of object, which is what the OP asked for.
> With the SID the session can be found, and then the user.

For example:

SQL> select sid, serial#, username
  2 from v$session
  3 where sid in
  4 (select sid from v$access where object = 'EMP')   5 /

       SID SERIAL# USERNAME

---------- ---------- ------------------------------
       127       1150 BING

SQL> David Fitzjarrell Received on Wed Dec 17 2008 - 08:16:01 CST

Original text of this message