Created
November 28, 2012 16:29
-
-
Save rofr/4162362 to your computer and use it in GitHub Desktop.
Sql Server Object Explorer in VS12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* The Sql Server Object Explorer Window of Visual Studio 2012 | |
* doesn't release connections properly. Here is a workaround | |
* | |
*/ | |
-- 1. Open a query window, either VS or SSMS will do | |
-- 2. Run the following select, replacing 'MyDB' with the name of your DB | |
select session_id from sys.dm_exec_sessions | |
where program_name = 'Microsoft SQL Server Data Tools, Online Properties' | |
and database_id = db_id('MyDB') | |
/* Results | |
session_id | |
---------- | |
54 | |
(1 row(s) affected) | |
*/ | |
-- 3. Kill the session id! | |
KILL 54 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment