session holding locks & not getting killed..
Posted in 1998
--IMA.Boundary.774505009
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Description: cc:Mail note part
Hi,
We are facing following problem in ISQL.
The problem comes when we run a query in ISQL( for e.g. update
statistics) and it is interrupted during it's operation or abnormally
exited from isql mode.Though we have exited from the process,still the
session keeps locks with session id logged into the database.This
session can be checked by onmonitor.
When we try to kill this session id with onmode -z or onmode -Z, it
doesn't clear the session & doesn't give any error or output.
SCOPE: Here,if some other process tries to use the resources of
blocked session then that process keeps on waiting and so we have to
kill this also.Again, session id corresponding to this is still there
with locks held.
Is there any way to kill the session using any other tools ?
One possible way is by restarting the informixserver, which is not
feasible always.
Regards,
Basaiah & Sanjeev
--IMA.Boundary.774505009
Content-Type: text/plain; charset=US-ASCII; name="Message Body"
Content-Transfer-Encoding: 7bit
Content-Description: cc:Mail note part
Content-Disposition: inline; filename="Message Body"
CONWAY Graham wrote:
Hi,
>
> Please excuse me if this is obvious.
>
> Does anyone have a simple way (sysmaster query or onstat option) of listing
> the sessions on a server and the database they are currently connected to.
>
> I have a script that does it by going through the onstat -u output and
> calling onstat -g sess <sessid> for each session, but there must be a
> quicker way.
>
> Thanks,
>
> Graham Conway
> OAMI Alicante
>
Graham,
If all you want is session-id and database, just use "onstat -g sql". Its
output looks like:
$ onstat -g sql
INFORMIX-OnLine Version 7.14.UD2X7 -- On-Line -- Up 03:06:34 -- 413336 Kbytes
Sess SQL Current Iso Lock SQL ISAM F.E.
Id Stmt type Database Lvl Mode ERR ERR Vers
109 UPDATE mdss CR Wait 0 0 7.12
108 SELECT INTO mdss DR Wait 0 0 6.02
107 SELECT mdss CR Wait 0 0 6.02
87 - mdss CR Not Wait 0 0 7.14
65 INSERT mdss CR Wait 0 0 7.12
64 - mdss CR Not Wait 0 0 6.02
55 - mdss CR Wait 0 0 7.12
11 - - - Not Wait 0 0 7.14
Hope that helps
RET
+------------------------------------------+
| Richard Thomas |
| DBA - Marketing Information Systems |
| Optus IT |
| email: richard_thomas@yes.optus.com.au |
| Ph: +61 2 9342 7188 |
| "My opinions are my opinions" |
+------------------------------------------+
--IMA.Boundary.774505009--