v-jh
v-jh

Reputation: 76

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

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

Upvotes: 0

Views: 1922

Answers (1)

jch
jch

Reputation: 187

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

Upvotes: 3

Related Questions