Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in August and this forum will be retired.

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: 20%

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: 938 times

last updated: 28 Oct '14, 11:56