Monitoring Database Blocking Through SCOM 2007 Custom Rules and Alerts

  • Marios Philippopoulos

    SSC Guru

    Points: 57030

    Comments posted to this topic are about the item Monitoring Database Blocking Through SCOM 2007 Custom Rules and Alerts

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • Anipaul

    SSC-Insane

    Points: 24681

    Nice one..

  • SQLEngine

    SSCommitted

    Points: 1633

    Marios,

    Very useful article, thanks. This opens up other posibilities with SCOM.

  • Marios Philippopoulos

    SSC Guru

    Points: 57030

    SQLEngine (10/13/2008)


    Marios,

    Very useful article, thanks. This opens up other posibilities with SCOM.

    Thanks!

    I will post the .vbs as a .txt file in the next day or so.

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • Grant Fritchey

    SSC Guru

    Points: 396618

    Excellent. Well done. I'll have to see if we can use this one on our servers.

    ----------------------------------------------------
    The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
    Theodore Roosevelt

    The Scary DBA
    Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
    Product Evangelist for Red Gate Software

  • Marios Philippopoulos

    SSC Guru

    Points: 57030

    Grant Fritchey (10/14/2008)


    Excellent. Well done. I'll have to see if we can use this one on our servers.

    Thanks!

    I'm attaching the 2 .vbs scripts here with .txt extensions to make it easier for people to download them.

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • Raj Deep Alapati

    Ten Centuries

    Points: 1118

    Hi,

    I want to use this SCOM. i just want to know where can i find it .where is this application residing in vista. do i need to install it

    Thanks

    Raj Deep.A

  • Grant Fritchey

    SSC Guru

    Points: 396618

    Operations Manager is a completely seperate product sold by Microsoft. It's intention is for large scale enterprise level monitoring, reporting and alerting. Here's a place to learn a bit more about it (http://technet.microsoft.com/en-us/library/bb310604.aspx?ppud=4)

    ----------------------------------------------------
    The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
    Theodore Roosevelt

    The Scary DBA
    Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
    Product Evangelist for Red Gate Software

  • Harold Buckner

    SSCarpal Tunnel

    Points: 4008

    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.

  • Marios Philippopoulos

    SSC Guru

    Points: 57030

    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.%5B/quote%5D

    The SQL-2000 vbs script seems to be failing at lines 100 and 153.

    If possible, try running the vbs script from the cmd prompt on the server on which you are getting the errors. Do you still get the same errors?

    I will have a look at the code and will send out an update soon.

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • Marios Philippopoulos

    SSC Guru

    Points: 57030

    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.%5B/quote%5D

    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?

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • Harold Buckner

    SSCarpal Tunnel

    Points: 4008

    I used the zipped files link from the article. Are the one posted here different?

  • Marios Philippopoulos

    SSC Guru

    Points: 57030

    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?

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • Harold Buckner

    SSCarpal Tunnel

    Points: 4008

    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.

  • Harold Buckner

    SSCarpal Tunnel

    Points: 4008

    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.

Viewing 15 posts - 1 through 15 (of 74 total)

You must be logged in to reply to this topic. Login to reply