The forum will be unavailable for maintenance at some point from Friday, April 13 at 19:00 EDT until Sunday, April 15 at 23:59 EDT. Downtime will be minimized but the exact timing is unknown.

Yesterday was the first anniversary of this unanswered question. It still applies, to Version 16 as well as 12... if one was impolite, one might ask "What is the point of CONNECTION_PROPERTY ( 'LockCount' ) if it returns zero for a connection that is holding a schema lock that is actually blocking another connection?" :)

Here is a query run in that shows one schema lock exists but DB_PROPERTY ( 'LockCount' ) returns zero. The same is true for CONNECTION_PROPERTY ( 'LockCount' ).

select DB_PROPERTY ( 'LockCount' ), * from sa_locks();


If there are a million locks, will the following workaround be optimized or will it be slowwwwww?

SELECT COUNT(*) FROM sa_locks();


asked 27 Oct '13, 17:56

Breck%20Carter's gravatar image

Breck Carter
accept rate: 21%

edited 28 Oct '14, 11:56

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 27 Oct '13, 17:56

question was seen: 486 times

last updated: 28 Oct '14, 11:56