Wednesday, January 7, 2015

EF CodeFirst With Visual Studio Cannot drop database because it is in use error.

Execute the following script from the master database catalog:


USE MASTER
ALTER DATABASE MyDBName
   SET SINGLE_USER WITH ROLLBACK IMMEDIATE 
ALTER DATABASE MyDBName SET MULTI_USER

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More