Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12345»»»

Monitoring Database Blocking Through SCOM 2007 Custom Rules and Alerts Expand / Collapse
Author
Message
Posted Friday, November 7, 2008 4:12 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, November 20, 2014 10:24 AM
Points: 1,865, Visits: 3,620
Harold Buckner (11/7/2008)
Hi Marios

I like the way you handled this task and the great information it provides. However, I had some errors on the 2000 script thats making me do a lot of head scratching. These our all older 2000 instances on either Windows Server 2000 or 2003

Does any of these make any since to you:

Event Type: Warning
Event Source: Health Service Modules
Event Category: None
Event ID: 21413
Date: 11/7/2008
Time: 1:03:57 PM
User: N/A
Computer: GIS
Description:
The Event Policy for the process started at 1:03:56 PM has detected errors in the output. The 'StdErr' policy expression:
\a+
matched the following output:
C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 1\55987\Custom_SQL2000_Blocking.vbs(153, 9) ADODB.Command: Item cannot be found in the collection corresponding to the requested name or ordinal.



Command executed: "C:\WINDOWS\system32\cscript.exe" /nologo "Custom_SQL2000_Blocking.vbs" gis
Working Directory: C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 1\55987\

One or more workflows were affected by this.

Workflow name: MomUIGeneratedRule81b439253e464a408ab1d0402a91aad1
Instance name: MSSQLSERVER
Instance ID: {6BEBE62A-DEE0-BEB3-8822-FD9B7941FD43}
Management group: SCOM

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


Event Type: Warning
Event Source: Health Service Modules
Event Category: None
Event ID: 21413
Date: 11/7/2008
Time: 3:43:07 PM
User: N/A
Computer: GIS
Description:
The Event Policy for the process started at 3:43:06 PM has detected errors in the output. The 'StdErr' policy expression:
\a+
matched the following output:
C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 1\56373\SQL2000Blocking.vbs(100, 1) Microsoft OLE DB Provider for SQL Server: String or binary data would be truncated.



Command executed: "C:\WINDOWS\system32\cscript.exe" /nologo "SQL2000Blocking.vbs" gis
Working Directory: C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 1\56373\

One or more workflows were affected by this.

Workflow name: MomUIGeneratedRule624f6f0c92d14efc8c6798ca7787892d
Instance name: MSSQLSERVER
Instance ID: {6BEBE62A-DEE0-BEB3-8822-FD9B7941FD43}
Management group: SCOM

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


Harold, are you using the scripts I had posted earlier in this discussion thread (post 585470) or the original scripts that came with the article?


__________________________________________________________________________________

Turbocharge Your Database Maintenance With Service Broker: Part 2
Turbocharge Your Database Maintenance With Service Broker: Part 1
Real-Time Tracking of Tempdb Utilization Through Reporting Services
Monitoring Database Blocking Through SCOM 2007 Custom Rules and Alerts
Preparing for the Unthinkable - a Disaster/Recovery Implementation
Post #599331
Posted Friday, November 7, 2008 4:37 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 11:37 AM
Points: 311, Visits: 397
I used the zipped files link from the article. Are the one posted here different?
Post #599339
Posted Friday, November 7, 2008 4:53 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, November 20, 2014 10:24 AM
Points: 1,865, Visits: 3,620
Harold Buckner (11/7/2008)
I used the zipped files link from the article. Are the one posted here different?


Actually, they should be the same, my bad, it's been a while since I looked at this.

It's possible the script is trying to access an instance that is not currently running. I have made modifications to the original script to detect whether the SQL instance is down and run only if the instance is still up.

How pervasive are these errors? Do they occur only sporadically or all across your environment? Have you been able to detect any blocking successfully using this methodology?


__________________________________________________________________________________

Turbocharge Your Database Maintenance With Service Broker: Part 2
Turbocharge Your Database Maintenance With Service Broker: Part 1
Real-Time Tracking of Tempdb Utilization Through Reporting Services
Monitoring Database Blocking Through SCOM 2007 Custom Rules and Alerts
Preparing for the Unthinkable - a Disaster/Recovery Implementation
Post #599343
Posted Friday, November 7, 2008 5:09 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 11:37 AM
Points: 311, Visits: 397
I've been testing on the 2000 script and can not get the script to raise the event. I tried running in in the cmd line and it returned the error on line 153 again. ( see below)It is the same error that was in the console. When I first created the rule, it throw several errors across the environment. It slowed down now. I'm still going to test several servers to see if they create the event.


C:\Program Files\System Center Operations Manager 2007\Health Service State\Moni
toring Host Temporary Files 1\57531>"C:\WINDOWS\system32\cscript.exe" /nologo "S
QL2000Blocking.vbs" gis
C:\Program Files\System Center Operations Manager 2007\Health Service State\Moni
toring Host Temporary Files 1\57531\SQL2000Blocking.vbs(153, 9) ADODB.Command: I
tem cannot be found in the collection corresponding to the requested name or ord
inal.
Post #599349
Posted Friday, November 7, 2008 5:34 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 11:37 AM
Points: 311, Visits: 397
how stupid of me. I kept going though the script and finally hit me to check the permission on the procedure. I grant execute on my db role but something must have happened and I did not read the message or something. When I went back to check it, it was missing the permissions. Once I fix it, I'm getting the event now.

I'm really sorry to wast your time.
Post #599354
Posted Friday, November 7, 2008 6:48 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, November 20, 2014 10:24 AM
Points: 1,865, Visits: 3,620
Harold Buckner (11/7/2008)
how stupid of me. I kept going though the script and finally hit me to check the permission on the procedure. I grant execute on my db role but something must have happened and I did not read the message or something. When I went back to check it, it was missing the permissions. Once I fix it, I'm getting the event now.

I'm really sorry to wast your time.


No problem at all, I'm relieved there was a simple explanation. :)


__________________________________________________________________________________

Turbocharge Your Database Maintenance With Service Broker: Part 2
Turbocharge Your Database Maintenance With Service Broker: Part 1
Real-Time Tracking of Tempdb Utilization Through Reporting Services
Monitoring Database Blocking Through SCOM 2007 Custom Rules and Alerts
Preparing for the Unthinkable - a Disaster/Recovery Implementation
Post #599366
Posted Thursday, November 13, 2008 1:01 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, June 9, 2014 8:52 AM
Points: 5, Visits: 95
I'm not convinced how truly practical or useful this really is...

I haven't used SCOM in anger yet, but have been thrown it by my manager to take a look at for SQL Monitoring. Truth is we have a wealth of monitoring tools and scripts that do the job perfectly well, without having to spend time learning to "program" a new system that, in all likelihood, will morph or disappear as Microsoft chooses...

Like many a DBA out there, I have enough on my plate without spending hours working out how to customise a tool to play nicely with SQL Server...

I'm not saying "No" here, just waving the flag of cynicism...

If SCOM 2007 is so SQL Server 2000/2005/2008 compatible, I don't expect to have to jump through hoops to get it to detect blocks and send emails... that seems like a basic task for a monitoring tool...



Post #602338
Posted Friday, November 14, 2008 8:18 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, November 20, 2014 10:24 AM
Points: 1,865, Visits: 3,620
HarryH (11/13/2008)
I'm not convinced how truly practical or useful this really is...

I haven't used SCOM in anger yet, but have been thrown it by my manager to take a look at for SQL Monitoring. Truth is we have a wealth of monitoring tools and scripts that do the job perfectly well, without having to spend time learning to "program" a new system that, in all likelihood, will morph or disappear as Microsoft chooses...

Like many a DBA out there, I have enough on my plate without spending hours working out how to customise a tool to play nicely with SQL Server...

I'm not saying "No" here, just waving the flag of cynicism...

If SCOM 2007 is so SQL Server 2000/2005/2008 compatible, I don't expect to have to jump through hoops to get it to detect blocks and send emails... that seems like a basic task for a monitoring tool...





It's true that SCOM in its current version still leaves much to be desired, at least as far as I am concerned.

Having said that, SCOM 2007 it is a big improvement over its previous version, MOM 2005, and that's encouraging for the future. There are a lot of SQL monitoring features that come out-of-the-box, and database blocking is one of them.

So the issue is not that monitoring of database blocking is not available, but that the standard functionality out-of-the-box is not sufficient if one wants detailed information on the blocking event plus the ability to archive the blocking-event info in a table for later analysis.

That's where customization comes in. Arguably, one doesn't need SCOM, or any other monitoring tool for that matter, to monitor blocking and archive the information. This can be done simply through SQL scripting in every single instance that one needs to monitor. But think of the situation where one needs to monitor 50 or 100 SQL instances. Think of the effort involved in deploying the script 100 times (once on every instance), and the effort required to make changes and maintenance on that script during its lifecycle. Or, if one does it in a smarter way, think of the effort required to keep a lookup table, containing info of all SQL instances that need to be monitored, up-to-date so as to use it with a tool like Integration Services to loop through the instances and apply the monitoring script in one go.

With SCOM, discovery of which SQL instances to run monitoring scripts to is simple and is done once; when a new Windows computer is added to the network. As long as the SCOM Agent has been deployed on the managed computer and the Microsoft SQL management packs have been imported, SQL instances installed on a SCOM-managed computer WILL BE MONITORED from then onwards. Of course, as with any tool, SCOM can fail too, and one needs to be proactive and monitor SCOM failures and fix them promptly. There are ways for automating that as well. But the automatic discovery and monitoring of SQL instances and databases by SCOM removes a lot of the manual work involved in making sure SQL scripts run on all instances all the time.

Regarding the effort required to learn how to customize and work with SCOM: it's true that it is a steep learning curve. Having worked it out for a few case scenarios already though, it is now child's play. I have created monitoring scripts for a variety of situations, such as monitoring configurational changes, database-mail failures, backup file sizes, long-running processes etc., and for every new scenario I just take one of my existing scripts and mould it to the new requirements within the day. I have worked with several other monitoring tools, such as IDERA and SQL Sentry, and none that I've seen provide the flexibility SCOM does to mould existing out-of-the-box functionality to fit one's needs quickly and efficiently.

The scalability, maintenability and customization SCOM provides are huge advantages in my opinion.


__________________________________________________________________________________

Turbocharge Your Database Maintenance With Service Broker: Part 2
Turbocharge Your Database Maintenance With Service Broker: Part 1
Real-Time Tracking of Tempdb Utilization Through Reporting Services
Monitoring Database Blocking Through SCOM 2007 Custom Rules and Alerts
Preparing for the Unthinkable - a Disaster/Recovery Implementation
Post #602803
Posted Friday, November 14, 2008 2:08 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, June 9, 2014 8:52 AM
Points: 5, Visits: 95
I appreciate the detailed reply, Marios. You certainly seem to understand the position I am in - looking at SCOM with a view to using it for some useful SQL monitoring and thinking,

"What the #$@^!???" etc...

SCOM 2007 seems like a beast... but from what you are saying -- and your article backs this up -- it is a beast that can be tamed, if approached with the right attitude.

I too have used Idera and SQL Sentry plus a number of other tools, which tend to have nice GUIs, but I have often resorted to writing my own scripts for monitoring. And yes, trying to deploy scripts to multiple database servers is a complete pain - especially when every deployment seems to require some kind of customization... so perhaps, as you are saying, the pain of the SCOM 2007 learning curve is worth it for the ability to centrally monitor multiple database servers...

Again thanks for the follow up - I have a better feel for what I am facing now and, perhaps more importantly, appreciate why I should bother... :)

Post #603098
Posted Saturday, November 15, 2008 8:24 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, November 20, 2014 10:24 AM
Points: 1,865, Visits: 3,620
HarryH (11/14/2008)
I appreciate the detailed reply, Marios. You certainly seem to understand the position I am in - looking at SCOM with a view to using it for some useful SQL monitoring and thinking,

"What the #$@^!???" etc...

SCOM 2007 seems like a beast... but from what you are saying -- and your article backs this up -- it is a beast that can be tamed, if approached with the right attitude.

I too have used Idera and SQL Sentry plus a number of other tools, which tend to have nice GUIs, but I have often resorted to writing my own scripts for monitoring. And yes, trying to deploy scripts to multiple database servers is a complete pain - especially when every deployment seems to require some kind of customization... so perhaps, as you are saying, the pain of the SCOM 2007 learning curve is worth it for the ability to centrally monitor multiple database servers...

Again thanks for the follow up - I have a better feel for what I am facing now and, perhaps more importantly, appreciate why I should bother... :)



I was in your position just a few short months ago, and, believe me, a lot of cursing was involved getting SCOM to work the way I wanted... ;)

Articles like mine and others' before are meant as a roadmap for someone who is just getting into SCOM, so that their learning curve is hopefully shorter and less painful than mine.

Experimentation with various SCOM features is key, as MS has done a deplorable job documenting SCOM as a tool. It really is to their disadvantage, because had they better promoted it to the DBA community, I bet you their revenues from the product would rise drastically. Hell, they should be paying me commission, for doing the job their sales and marketing people should be doing and are not!!

Feel free to post any SCOM-related questions to this site (and this thread), and if I or one of several others here know the answer, we will respond promptly.


__________________________________________________________________________________

Turbocharge Your Database Maintenance With Service Broker: Part 2
Turbocharge Your Database Maintenance With Service Broker: Part 1
Real-Time Tracking of Tempdb Utilization Through Reporting Services
Monitoring Database Blocking Through SCOM 2007 Custom Rules and Alerts
Preparing for the Unthinkable - a Disaster/Recovery Implementation
Post #603225
« Prev Topic | Next Topic »

Add to briefcase ««12345»»»

Permissions Expand / Collapse