October 6, 2021 at 7:53 pm
Is it anyway to find out when is the last time login user or account was used? I am trying to clean up my logins
October 7, 2021 at 2:58 am
Setup a "Login Trigger". Be REALLY careful because, if you do it wrong", even you won't be able to login.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 7, 2021 at 9:18 am
I used to use Notification services for this, but recently we had major down time due to an overload of connections and SSB-queues not getting processed on time.
We are now using Extended Events to capture logins and record them, so we know which accounts are currently still using our databases.
Asynchrone by design, (role over) files maintained by SQLServer, a local sqlagent job processing it all and recording the data in a dba database.
btw: article has been posted. Let's hope it is available soon ..
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
October 7, 2021 at 11:45 am
Another vote for Extended Events. Safe, as light weight as you can get while still monitoring behaviors on the system.
However, yes, you'll have to set something up in order to capture this. No, you won't be able to know stuff that happened before you set up a system to capture the information.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
October 7, 2021 at 3:29 pm
Also, if you're only allowing for Windows logins by users and apps (and I do recommend that), you can use sp_ValidateLogins to find any logins on SQL Server that have been disabled or dropped on the Windows Active Directory side.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply