RE: transaction begin time stamp
Posted in 2005
Thanks for the responses. What I'm trying to accomplish is identify
users who are holding locks for too long a period of time(5 - 10 minutes
max) and kill the session. So, the log fill time really doesn't work.
Instead I'll use min(grtime) column from syslcktab. The query looks
like this:
echo "unload to $TMPFILE delimiter \\" \\" select
unique(r.sid),r.address,l.owner,min(l.grtime),s.pid,s.hostname from
systxptab t, sysrstcb r,syslcktab l,flags_text
f,sysscblst s where l.grtime < $START_UNIX_TIME and t.address = l.owner
and r.address = t.owner and f.tabname = \\"syslcktab\\" and l.type =
f.flags and f.txt in (\\"
X\\",\\"IX\\") and s.sid = r.sid group by 1,2,3,5,6" | dbaccess sysmaster
>$ERRFILE 2>&1
Long term, I think I'll take Art's suggestion and implement a timer
function using SIGALRM that our programmers can call before they BEGIN
WORK setting the timer to whatever they think is appropriate for that
transaction. If the alarm goes off then call sqlbreak().
Bill
> -----Original Message-----
> From: owner-informix-list@iiug.org [SMTP:owner-informix-list@iiug.org]
> On Behalf Of Jose Luis Matute
> Sent: Thursday, April 14, 2005 1:09 AM
> To: Bill Dare
> Cc: informix-list@iiug.org
> Subject: Re: transaction begin time stamp
>
> Another idea: you have the log the transaction began and the time that
>
> log filled from syslogfil (if it's not the current one, of course),
> and
> even the one before. If it's enough for your purposes you can get the
> syslogfil.filltime field for those two logs, and your tx began between
>
> those time stamps (and now it's supposed it contains real time ;) ).
>
> Hope it helps.
>
> Bill Dare wrote:
>
> > Does anyone know how to calculate the begin work timestamp of a
> > transaction?
> >
> > The value stored in systxptab.begstamp is not a unix time. The
> begstamp
> > column seems to be the same timestamp found in the online log
> recorded
> > with each checkpoint. Anyone know what this value represents?
> >
> > Bill
> >
> >
> > sending to informix-list
> >
>
> sending to informix-list
sending to informix-list