Solved

client ip address connected to sql server

Posted on 2009-03-31
4
633 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

772 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