Stored Client IP address or hostname
Posted in 2012
Topics: General Discussion
Hi I'm creating the user idle time out script via store procedure. I knew there was provided in IDS 11.7 but it is not really suitable with our application. Actually I just need to know where does Informix store the client PC IP address / hostname. I searched sysmaster, sysusers and syadmin but couldnt find anywhere where it stored. I'm using latest Informix 11.7 UC3. If somebody know, appreciate can share it here please. REgards -NAJMI-
I have used the below query to get the DB session level information.
I hope it will be helpful to you and it will resolve your issue as well.
SELECT s.sid,s.username,q.odb_dbname,
dbinfo('UTC_TO_DATETIME',s.connected) connection_time,
dbinfo('UTC_TO_DATETIME',t.last_run_time) last_query_time,
current - dbinfo('UTC_TO_DATETIME',t.last_run_time) idle_time ,hostname
FROM sysmaster:syssessions s,sysmaster:systcblst t,
sysmaster:sysrstcb r,sysmaster:sysopendb q
WHERE t.tid=r.tid
AND s.sid=r.sid
AND s.sid=q.odb_sessionid
and dbinfo('UTC_TO_DATETIME',t.last_run_time)< CURRENT
Regards,
OSK
Should be in syssessions under hostname, the IP is stored as a hex number AFAIR Cheers Paul -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of SYED AHMAD NAJMI SYED MD NASIR Sent: Monday, February 27, 2012 1:37 AM To: ids@iiug.org Subject: Stored Client IP address or hostname [26373] Hi I'm creating the user idle time out script via store procedure. I knew there was provided in IDS 11.7 but it is not really suitable with our application. Actually I just need to know where does Informix store the client PC IP address / hostname. I searched sysmaster, sysusers and syadmin but couldnt find anywhere where it stored. I'm using latest Informix 11.7 UC3. If somebody know, appreciate can share it here please. REgards -NAJMI- **************************************************************************** *** Forum Note: Use "Reply" to post a response in the discussion forum.