Link to home
Start Free TrialLog in
Avatar of acampoma
acampoma

asked on

Getting Ip address from a SQL user

Scenario

A user that is behind a Firewall connects to a SQL Server and does an UPDATE or an INSERT to a table.  Is there a way from the SQL database (a stored proc or user defined function or something) to get that users Internet IP Address on any UPDATE or INSERT that the they do and fill a CurrentIPAddress field in the same record that the user is updating or inserting?
ASKER CERTIFIED SOLUTION
Avatar of jchopde
jchopde

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CleanupPing
CleanupPing

acampoma:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
Avatar of acampoma

ASKER

Answers my question however, Not what I wanted to hear.
Thank you.
I did find a way to get network information about a host that could be noteworthy. This might only work from within the domain.

declare @Hostname Varchar(100)
Set @HostName='TheHostNameOfTheConnection'
exec xp_CmdShell 'nbtstat -a @hostname                                         '