How to get IP Address of SQL Server and Client IP Address
SELECT SERVERNAME = CONVERT(NVARCHAR(128),SERVERPROPERTY('SERVERNAME'))
,LOCAL_NET_ADDRESS AS 'IPAddressOfSQLServer'
,CLIENT_NET_ADDRESS AS 'ClientIPAddress'
, NETBIOS = CONVERT(NVARCHAR(128),SERVERPROPERTY('COMPUTERNAMEPHYSICALNETBIOS'))
, [MAXDOP] = (SELECT VALUE_IN_USE FROM SYS.CONFIGURATIONS WHERE NAME='MAX DEGREE OF PARALLELISM')
, SQLMEMORY = (SELECT VALUE_IN_USE FROM SYS.CONFIGURATIONS WHERE NAME='MAX SERVER MEMORY (MB)')
, EDITION = CONVERT(NVARCHAR(128),SERVERPROPERTY('EDITION'))
, COLLATION = CONVERT(NVARCHAR(128),SERVERPROPERTY('COLLATION'))
, ISCLUSTERED = CONVERT(BIT,SERVERPROPERTY('ISCLUSTERED'))
, ISFULLTEXTINSTALLED = CONVERT(BIT,SERVERPROPERTY('ISFULLTEXTINSTALLED'))
, ISINTEGRATEDSECURITYONLY = CONVERT(BIT,SERVERPROPERTY('ISINTEGRATEDSECURITYONLY'))
, FILESTREAMCONFIGUREDLEVEL = CONVERT(TINYINT,SERVERPROPERTY('FILESTREAMCONFIGUREDLEVEL'))
, FILESTREAMEFFECTIVELEVEL = CONVERT(TINYINT,SERVERPROPERTY('FILESTREAMEFFECTIVELEVEL'))
, PRODUCTVERSION = CONVERT(NVARCHAR(128),SERVERPROPERTY('PRODUCTVERSION'))
, SQLCHARSETNAME = CONVERT(NVARCHAR(128),SERVERPROPERTY('SQLCHARSETNAME'))
, SQLSORTORDERNAME = CONVERT(NVARCHAR(128),SERVERPROPERTY('SQLSORTORDERNAME'))
FROM SYS.DM_EXEC_CONNECTIONS WHERE SESSION_ID = @@SPID
Thanks for your feedback
ReplyDeleteNice information
ReplyDeleteThanks that really help
ReplyDeleteThanks for your feedback
Delete