Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9279099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T17:32:51+00:00 2026-06-18T17:32:51+00:00

Are there any good open source or otherwise free MS SQL Server transaction blocking

  • 0

Are there any good open source or otherwise free MS SQL Server transaction blocking monitor tools?
One that would detect a blocking transaction that lasts longer than X and then email an alert somewhere would be ideal.

Simple for one server.
For MS SQL Express 2008 specifically but should apply to all really, or all recent.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T17:32:52+00:00Added an answer on June 18, 2026 at 5:32 pm

    Yes, actually SQL Server comes with such an option out-of-the box, but very few know about it and even fewer know how to use it. It is called the blocked process threshold:

    Use the blocked process threshold option to specify the threshold, in seconds, at which blocked process reports are generated. The threshold can be set from 0 to 86,400. By default, no blocked process reports are produced. This event is not generated for system tasks or for tasks that are waiting on resources that do not generate detectable deadlocks.

    You can define an alert to be executed when this event is generated. So for example, you can choose to page the administrator to take appropriate action to handle the blocking situation.

    Once this option is enabled the system will generate a profiler event of the Blocked Process Report Event Class. The next piece of the puzzle is that this (as well as many more) Profiler event can be captured using DDL Event Notifications. Here is a practical example:

    use msdb;
    go
    
    create queue events;
    go
    
    create service events on queue [events] (
        [http://schemas.microsoft.com/SQL/Notifications/PostEventNotification]);
    go
    
    create event notification [blocked_threshold_exceeded]
        on server for BLOCKED_PROCESS_REPORT
        to service N'events', N'current database';
    go
    
    exec sp_configure 'show advanced options', 1;
    reconfigure
    go
    
    
    exec sp_configure 'blocked process threshold', 10;
    reconfigure
    go
    
    -- simulate blocking
    use tempdb;
    go
    
    begin transaction;
    create table x (a int);
    go
    

    now, on a different session, runa query that blocks on the uncommitted transaction started above:

    select * from tempdb..x
    

    And sure enough, in 10 seconds (our configured threshold) we get a notification:

    use msdb;
    receive cast(message_body as xml) from [events];
    
    <EVENT_INSTANCE>
      <EventType>BLOCKED_PROCESS_REPORT</EventType>
      <PostTime>2013-02-12T16:19:55.610</PostTime>
      <SPID>5</SPID>
      <TextData>
        <blocked-process-report monitorLoop="104441">
          <blocked-process>
            <process id="process47b946cf8" 
                 waitresource="OBJECT: 2:373576369:0 " 
                 waittime="18952" ...>
              <executionStack>
                <frame line="1" stmtstart="-1" ... />
              </executionStack>
              <inputbuf>
    select * from x   </inputbuf>
            </process>
          </blocked-process>
          <blocking-process>
            <process status="sleeping" ....>
              <executionStack />
              <inputbuf>
    create table x (a int)   </inputbuf>
            </process>
          </blocking-process>
        </blocked-process-report>
      </TextData>
    ...
    </EVENT_INSTANCE>
    

    You can see the last executed statement by the blocker, the current executing statement from the blocked, along with wait times and a lot more.

    Wiring up the event notification to activate a procedure that sends mail using sp_send_db_mail is left as an exercise to the reader. And yes, everything mentioned above is available in Express Edition.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there any good open source Silverlight projects that deal with a control gallery?
Is there any good open source web-based front end analytics tool that can talk
What good open source tools are available for monitoring SQL Server 2005? Tools available
Are there any good alternatives to Oracle partitioning in free/open source databases? I'm interested
Are there any good open source frameworks for developing computer system emulators? I am
Are there any good open source php test suites? So far I found only
Are there any good, open source engines out there for detecting what language a
Other than AWT, Swing, SWT (Java) - are there any good open source Java
Are there any open-source examples of ASP.NET MVC applications that use the Entity Framework?
Is there any good open-source Java library for HTML5 validation? It would be great

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.