CREATE FUNCTION [dbo].[GetCurrentIP] () ) AS BEGIN ); SELECT @IP_Address = client_net_address FROM sys.dm_exec_connections WHERE Session_id = @@SPID; Return @IP_Address; END GO -- RUN SELECT dbo.GetCurrentIP () SELECT CONNECTIONPROPERTY('local_net_ad…