操作步骤:
1、打开本地Microsoft SQL Server Management Studio(SSMS)客户端。
2、执行以下SQL语句,获取所有连接ip
SELECT SY.SPID, SY.LOGINAME, SY.LOGIN_TIME, SY.HOSTNAME, SY.PROGRAM_NAME, DM.CLIENT_TCP_PORT, DM.CLIENT_NET_ADDRESS
FROM SYS.SYSPROCESSES AS SY
INNER JOIN SYS.DM_EXEC_CONNECTIONS AS DM
ON SY.SPID = DM.SESSION_ID
WHERE SY.SPID > 50 AND DM.AUTH_SCHEME='SQL'