My MVP Profile

Monday, April 17, 2006

SQL Server Management Pack Script Execution Issue

Out of the box, there are a couple of SQL scripts that step on each other, causing contention and some script failures which generate alerts, as was mentioned briefly by John Hann in a recent post, and I wanted to take a moment to elaborate on the issue he alluded to.

The scripts at the center of the issue are (you'll find the paths to the rules they run under at the end of this article):

  • SQL Server Block Analysis script runs every 5 minutes and is synchronized at 00:03
  • SQL Server Service Availability script runs every 5 minutes synchronized at 00:02

This means the SQL ServerService Availability will overlap SQL Server Block Analysis script every time it runs longer than 1 minute.

This could be resolved several ways but, changing the synchronization delta as follows would likely resolve the problem.

  • SQL Server Block Analysis script runs every 5 minutes and is synchronized at 00:04
  • SQL Server Service Availability script runs every 5 minutes synchronized at 00:01

If there is still some overlap, we could decrease frequency they run as follows, allowing a 5 minute gap between the two:

  • SQL Server Block Analysis script runs every 10 minutes synchronized at 00:06
  • SQL Server Service Availability script runs every 10 minutes synchronized at 00:01

And while these two are the main offenders, there are a couple of other scripts that run less frequently, but may still show up in the mix:

  • The SQL Server Space Analysis script runs every 15 minutes synchronized at 00:12, and could then potentially overlap depending on your synchronization delta on how you resolve the issue with the first two scripts mentioned. Taking 2nd option to decrease frequency to every 10 minutes with the synchronization deltas listed, the 3 should never overlap.
  • Much less a concern, the SQL Server Service Discovery script runs every 8 hours synchronized at 00:20. As with the SQL Server Space Analysis script, taking 2nd option to decrease frequency to every 10 minutes with the synchronization deltas listed, the 3 should never overlap.
And while the above will lighten server load through reduction in retention and script run frequency, it will increase the time it takes to flag an issues related to blocks and/or service availability, although in this case I think it's warranted.

Rule\Script Paths:
Microsoft SQL Server\SQL Server 2000\SQL Server 2000 Health and Availability Monitoring\SQL Server Block Analysis
Microsoft SQL Server\SQL Server 2000\State Monitoring and Service Discovery\SQL Server Service Availability
Microsoft SQL Server\SQL Server 2000\State Monitoring and Service Discovery\SQL Server Space Analysis
Microsoft SQL Server\SQL Server 2000\State Monitoring and Service Discovery\SQL Server Service Discovery

Labels: ,

Comments on "SQL Server Management Pack Script Execution Issue"

 

Anonymous said ... (11:49 AM) : 

Are these for the SQL 2000 scripts or also for SQL 2005?

 

Poornima said ... (5:07 AM) : 

I have been working on MOM 2005 for sometime now. I have a question on how we could send a consolidated email on occurances of blocks on the SQL server. As of now MOM seems to be sending 1 email for each blocked SPID and because there are huge number of blocks at one time on the SQL server it seems to send out multiple emails. I checked on Alert suppression which was not much of a help. I checked if we could use a Consolidation rule to send emails but unable to give the event criteria to the Consolidation rule. Can one of you please help me on this.Am really confused .its really annoying getting multiple emails for an instance of blocking on the servers

 

Poornima said ... (5:08 AM) : 

I have been working on MOM 2005 for sometime now. I have a question on how we could send a consolidated email on occurances of blocks on the SQL server. As of now MOM seems to be sending 1 email for each blocked SPID and because there are huge number of blocks at one time on the SQL server it seems to send out multiple emails. I checked on Alert suppression which was not much of a help. I checked if we could use a Consolidation rule to send emails but unable to give the event criteria to the Consolidation rule. Can one of you help me on this..its really annoying getting multiple emails for an instance of blocking on the servers...........
Could you please fwd comments to my email ID: poornima.ashwin@gmail.com

 

Poornima said ... (11:43 AM) : 

Its the same for both SQL 2000 and 2005

 

Poornima said ... (11:44 AM) : 

Its the same for both SQL 2000 and 2005

 

post a comment links to this post