0

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

v-jh
  • 66
  • 3

1 Answers1

3

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
jch
  • 187
  • 3
  • 17