Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 648
  • Last Modified:

client ip address connected to sql server

I have problem to find Current IP address for client computer that have a connection to Specific DataBase Server .I need to find out current client user IP address that I am seeking to find it
,How can I do this by using T-SQL command?
Please write full T-SQL code .
0
help_me_programming
Asked:
help_me_programming
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
please provider the table structure, and the input value/field...
0
 
help_me_programmingAuthor Commented:
this is a generic question about client ip connection
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
i see.
you want to look in the master.sys.sessions table (sql 2005+) resp: master.dbo.syssessions (sql 2000), the field hostname will give the computer name (or eventually the ip address).

to resolve the name into a ip address is "not possible" built-in in sql server.
for the current session, the function hostname() returns the info also.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now