Category Archives for "Helpful Scripts"

Jan 19

Find Currently Executing Jobs Running Longer Than 30 Day Average

By Lori Brown | Helpful Scripts , Intermediate , SQL Administration , SQL Server

–By Lori Brown   @SQLSupahStah I needed to update some of our long running job monitoring code to improve it from the version that we have right now. I like this version because it uses msdb.dbo.syssessions (https://msdn.microsoft.com/en-us/library/ms175016.aspx) to validate that a job is actually running. I also wanted to know the percent difference between the current […]

Continue reading
Oct 08

AlwaysOn Availability Groups – Enable or Disable Jobs on Failover

By Lori Brown | Helpful Scripts , Intermediate , SQL Administration , SQL Server

— By Lori Brown  @SQLSupahStah After reading up on AlwaysOn Monitoring and Alerting (http://blog.sqlrx.com/2015/08/27/alwayson-monitoring-and-alerting/), I was asked to come up with a way to automatically enable jobs that may only need to run on the primary replica of an availability group. Requirements were that on failover of an AlwaysOn Availability Group some jobs should be […]

Continue reading
>