RE: who are currently accessing my table?
Posted in 2000
Bingo!!.
onstat -g opn is not documented by Informix. That shows sessions currentlyaccessing a specifc table (what I want), BUT doesnt show all of them. This
is obnoxious when you are looking for the only session accessing your table
and you cant find it in that output. I guess that is why Informix doesnt
document this onstat option.
I think onstat takes information for this option from sysmaster:sysrstcb but
I am not sure. The probable field would be opentab.
Does anyone knows how to "decrypt" this field? Maybe with a DBINFO option ?
Thanks Rick. I hope you have the answer.
Carlos
> -----Mensaje original-----
> De: Bernstein, Rick [SMTP:rbernste@alarismed.com]
> Enviado el: S'bado 18 de Noviembre de 2000 09:03 PM
> Para: 'Carlos Kobashikawa C. '
> CC: informix-list@iiug.org
> Asunto: RE: who are currently accessing my table?
>
> Carlos,
>
> "onstat -g opn" will show what sessions are accessing tables.
> You can parse the output for your partition numbers.
>
> If you need a script, which does something similar on an IDS 7.x instance,
> let me know. I can send one it to you.
>
> Rick
>
> -----Original Message-----
> From: Carlos Kobashikawa C.
> To: 'Cliff Burton'; 'informix-list@iiug.org'
> Sent: 11/18/00 3:04 PM
> Subject: RE: who are currently accessing my table?
>
> Thanks Cliff, but that isnt the answer too (Why does it sound like a
> "guess
> the answer" show?)
>
> onstat -k gives you the currently locked tables. Well, you can tell me> that
> a select statement share-locks my table, but a session doing a simple
> select
> doesnt place an entry with the tblsnum of my table in "onstat -k" output
> (try it). So, I cant find the session by looking at the locks..
>
> another idea?
>
> > -----Mensaje original-----
> > De: Cliff Burton [SMTP:cburton@bigpond.net.au]
> > Enviado el: Viernes 17 de Noviembre de 2000 10:05 PM
> > Para: ckobashi@luzdelsur.com.pe
> > Asunto: Re: who are currently accessing my table?
> >
> > Carlos,
> >
> > You need to look at the locks!
> >
> > Bare with me this is from memory, as I am at home...
> >
> > I'd like to go into detail for you but I'll have to just
> > point you in the right direction as my memory isn't what
> > it was.
> >
> > onstat -k will list all of the locks, you can from the> > report identify what is actually locked and how.
> >
> > This is the quickest and simplest of all methods, all you need to
> > do is identify your table.
> >
> > Good Luck
> > Cliff.
> > ----- Original Message -----
> > From: <ckobashi@luzdelsur.com.pe>
> > Newsgroups: comp.databases.informix
> > Sent: Saturday, November 18, 2000 11:40 AM
> > Subject: Re: who are currently accessing my table?
> >
> >
> > > Steve, this isnt so simple as you think.
> > > "onstat -g ses" (or -g sql) gives you the current query, but my
> table
> > > may have been opened within a transaction.
> > > I've tried that, searching every session in my server and I couldnt
> > > find the specific one, even when there were many threads connected
> to
> > > my table.
> > > That isnt the answer.
> > >
> > > In article <LeiR5.256846$3E6.2805316@news1.alsv1.occa.home.com>,
> > > "Steve Waggoner" <steve.dot.waggoner@integtech.dot.com> wrote:
> > > > onstat -g ses> > > >
> > > > "Carlos Kobashikawa C." <ckobashi@luzdelsur.com.pe> wrote in
> message
> > > > news:8v48t0$8mt$1@news.xmission.com...
> > > > >
> > > > > How can I know who are currently accessing a table?.
> > > > > I need to create an index or alter it but I cant because I dont
> have
> > > > > exclusive access. I know how many threads are connected, by
> using
> > > > onstat -t,> > > > > but I want to know which sessions they are. (my users dont close
> the
> > > > > applications at nigth)
> > > > >
> > > > > Thanks in advance
> > > > >
> > > > > Carlos
> > > >
> > > >
> > >
> > >
> > > Sent via Deja.com http://www.deja.com/
> > > Before you buy.
> >