How many Users are connected to the Server
----To findout how many users are connected to server
USE master
GO
SELECT DISTINCT SYSLOGINS.LoginName,SYSLOGINS.DBName,@@SERVERNAME AS 'ServerName'
FROM SYSPROTECTS,SYSLOGINS WHERE SYSADMIN=1
----To findout how many users are connected to server
USE master
GO
SELECT DISTINCT SYSLOGINS.LoginName,SYSLOGINS.DBName,@@SERVERNAME AS 'ServerName'
FROM SYSPROTECTS,SYSLOGINS WHERE SYSADMIN=1
Comments