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




Comments

Popular posts from this blog

Always On FailOver Events

The transaction log for database is full due to 'OLDEST_PAGE'

SSAS Cube or Database backup with Powershell command "Backup-AsDatabase"