Killing User Session

what is your understanding of idle sessions?

One way can do Is promon dbname & option 8, then enter user session nbr you intend to disconnect. yo can use mfgpro to view connections 36.16.12
 
As Kishor says, your understanding of what "idle" is is very important. It is very hard to write a script which can accurately identify "idle" sessions that are safe to kill. Many such scripts cause more trouble than they are worth and using them can seriously destabilize a system.

After all, if a session is truly idle then what's the big deal? It isn't hurting anything so let it be.

If you still feel like you must do something first make very, very sure that you know how to identify your target sessions. I'd start with a manual process, such as the PROMON process described, before trying to automate anything.

You might also find this: Traps, Kills, "Hung" Users, "Runaways" And Other Psychos helpful.
 
We have more than 15 users in the organization (purchased only 10 concurrent users). Sometimes, i found that the users like to keep (with the login screen) under their desktop but not using it. It's kinda wasted if others wanna use it while unable to login.
Therefore, I thought of killing the user off!
 
/* EXIT THE APPLICATION IF PASSWORD ENTERED IS INVALID */
if not passwd-matched then quit.
/*MSS01*/ DEF VAR ctr AS i.
/*MSS01*/ FOR EACH mon_mstr NO-LOCK WHERE mon_userid = global_userid :
/*MSS01*/ ctr = ctr + 1.
/*MSS01*/ END.
/*MSS01*/ IF ctr GT 0 THEN DO:
/*MSS01*/ MESSAGE "ERROR: User " + global_userid + " Already Logged In." VIEW-AS ALERT-BOX.
/*MSS01*/ QUIT.
/*MSS01*/ END.
 
You need to include this in your ver of mf1a.p. then compile it and replace the original program & .r with this. Ensure you have backed up the original mf1a.p
 
Back
Top