Ryan Adams Blog

SQL, Active Directory, Scripting

Browsing Posts in PowerShell

In this post I’ll point you to some options to sync SQL logins and then I’ll demo my favorite option in a video.  If you are using Availability Groups or Mirroring you know you need to sync SQL logins and jobs among replicas.  What are your options to sync SQL Logins and maybe even jobs?  […]

The syspolicy_purge_history SQLAgent job is used by Policy Based Management in SQL server to clear out the policy evaluation history kept by PBM. The job consists of the following three steps. First to check to see if PBM is enabled and exit if it is not. Run the msdb.dbo.sp_syspolicy_purge_history system stored procedure to clear the history Use […]