Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to kill an Informix session? 1

Status
Not open for further replies.

CALYAN

Programmer
Apr 23, 2001
39
US
How to kill an informix session I need a script for this.
Pls help
 
Hi,

First identify a problematic session by using:
onstat -g ses
onstat -g sql
onstat -u

make not of session id and use onmode to kill the session:
onmode -z <session_id>

This is similar to Unix kill -9 <pid> interrupt signalling. Onmode takes care about the trasactions in progress condition too, if so it will judge the stage of the transaction, and tries to commit, if possible. But in most of the cases it rolls back the transactions. Such cases it may take a longer period to terminate a session.

Regards,
Shriyan
 
Awesome. Thanks Shriyan. I was just browsing and learned something new and very cool. I usually use kill -15 or kill -9 but will now use Onmode like you suggest.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top