Solved

client ip address connected to sql server

Posted on 2009-03-31
4
631 Views
Last Modified: 2012-05-06
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
Comment
Question by:help_me_programming
  • 2
4 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 24032947
please provider the table structure, and the input value/field...
0
 

Author Comment

by:help_me_programming
ID: 24032983
this is a generic question about client ip connection
0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 24033207
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

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now