Azure Synapes lock_timeout not working as expected

DonRoter 1 Reputation point
2021-08-24T13:12:09.643+00:00

Hello,

I have a table named 'dbo.actor2' which is locked with an ExclusiveUpdate in Azure Synapse.
I have verified the lock by querying the sys.dm_pdw_lock_waits table.

125995-lock-wait.png

I am setting a LOCK_TIMEOUT to 10 seconds and trying to run a rename command on the locked table in one go.

    SET LOCK_TIMEOUT 10000;    
    RENAME OBJECT [dbo].[actor2] to [actor22];  

I'm expecting the query to fail after the 10 seconds period due to the lock.
In practice the query just hangs indefinitely, no error is raised.

Am I missing something?

Would apricate your help on this one.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,057 questions
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA 90,261 Reputation points
    2021-09-01T11:45:25.643+00:00

    Hello @DonRoter ,

    Unfortunately there is no alternative method to Set the lock timeout in Azure Synapse Analytics.

    As per this document - Microsoft Azure Synapse Analytics will parse the statement successfully, but will ignore the value 1800 and continue to use the default behavior.

    Hope this helps. Do let us know if you any further queries.

    ---------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.