As a DBA, when I have to do an emergency restart of a SQL Server instance or the host itself, the first thing I do is to check who is connected so that I can notify them (at least the ACTIVE users). We do have a system where we keep the app/database/owner information but notifying … Continue reading PowerShell – Email All Users Connected (Logged In) To A SQL Server Instance
I am a strong proponent and a believer of using AD groups (not even AD users) to manage your SQL Server permissions end to end. Restated, you would not have any individual AD users as logins in your SQL Server instance, all instance logins with be AD groups. If you are dealing with plain SQL … Continue reading SQL Server – Drop An User In All Databases & Drop The Login Too!
Our Windows security setup is completely (well, mostly 🙂 ) AD groups based. When new employees are hired, we ask for an existing employee after whom the new employees permissions should be mirrored. In other words, if we added the new employee to the same AD groups (that are related to SQL Server of course), … Continue reading Compare AD group membership of two users
I cannot imagine a life without PowerShell now. You would agreee after you find out why. This is what I had to do today. The very real problem: I have a list of about 30 servers. I need to add an AD group name to the local adminstrators group on all 30 servers Create a … Continue reading Using PowerShell – Add user or group to local Administrators group in Windows + Create SQL Server Login