Tuesday, 8 July 2014

Get server IP Address in sql server

BEGIN
   DECLARE @IP_Address varchar(255);

   SELECT @IP_Address = client_net_address
   FROM sys.dm_exec_connections
   WHERE Session_id = @@SPID;

  print @IP_Address;
  END

1 comment:

  1. It was so nice article and useful to Informatica learners. we also provide Dotnet Course online training our Cubtraining is leader in providing Software Training

    ReplyDelete