By default SQL Server don't log who logged-in in when, nor logged-out. You have to implement your own logging.
query for report of user logins in MSSQL
Iraj Akbari Sohi
0
Reputation points
Hello Good time everyone Does anyone know how to get a report of user logins in MSSQL that will display the days and number of user logins and logouts in the output?
2 answers
Sort by: Most helpful
-
-
PercyTang-MSFT 12,426 Reputation points Microsoft Vendor
2023-04-19T02:28:49.64+00:00 As far as I know, you can get process information through sys.sysprocesses.
But you need to get login and logout information, and there doesn't seem to be an existing query to do it.
Best regards,
Percy Tang