Skip to content

Instantly share code, notes, and snippets.

@AshFlaw
Created September 20, 2017 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AshFlaw/09681d65a01529e72b660fe0204637bb to your computer and use it in GitHub Desktop.
Save AshFlaw/09681d65a01529e72b660fe0204637bb to your computer and use it in GitHub Desktop.
Set a given DB back to multi user mode when locked by a given SPID
kill <SPID>
USE [master]
ALTER DATABASE <DBName>
SET MULTI_USER
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment