Re: Need a way to know SessionID
Posted in 1997
MarkDenham@aol.com — — source: Informix-list mailing list archive (1991-1998)
Peter
You could start from sysrstcb in the sysmaster database (assuming you are
using V7.x and are willing to have your code tied to that version.
select username, sid
from sysrstcb -- or sysscblst
where username = USER
This gives a list of sids for that user. Not much use if the user is logged
on
more than once!
To get the dbname from this, you can join to sysopendb using odb_sessionid.
This will give you the name of the database the user is connected to
(odb_dbname).
Mark
MarkDenham@aol.com (home)
Denham.M@amstr.com (work)