How to remove a lock from a table in a Synapse Dedicated Pool?

1.2k views Asked by At

There has been a lock on 2 different tables since last night. What is the query to remove a lock from a table in a Synapse Dedicated Pool? enter image description here

Thanks in advance

1

There are 1 answers

0
jch On BEST ANSWER

Run this query to find the session_id of any locks on your tables:

SELECT * FROM sys.dm_pdw_lock_waits
WHERE object_name in ('table_name')

In your screenshot, it is SID52295

To kill it, run:

KILL 'SID52295'
GO