Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2006
    Posts
    1

    Unanswered: how to Select current client IP Address using T-SQL command ?

    I have problem to find Current IP address for client computer that have a connection to Specific DataBase Server .I can only know the IP Address of DataBase Server but not 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 .
    Last edited by ramiside80; 07-04-06 at 07:19.

  2. #2
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    506
    well, u can use xp_cmdshell 'netstat -an' .Thats a way to see the client ip address.But I would like to hear better answer than this one.
    To find server ipaddress see this link
    and to store ip address in tables see this link
    Success is the ability to go from one failure to another with no loss of enthusiasm.
    - Sir Winston Churchill
    Joydeep

  3. #3
    Join Date
    Jan 2006
    Location
    USA
    Posts
    115
    You can get host name using TSQL....

    declare @host as varchar(20)
    SET @host = (select host_name())
    select @host

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •