This question is combination of super user and DBadmins.
It happened before that I ran some transaction on Database and was called out to meeting. This transaction then caused locks for other developers.
Even worse case scenarios, locked computer over weekend.
1) Is there a way to run a script on Windows lock screen? 2) Is there a script that would check if I have any locks in database in any Microsoft SQL server studio tab?