I have a VS c# app using a local sqlexpress 2012 database. If I login to SQL Server Management Studio, then disconnect or logout, the app won't work until I restart the SQL Server(sqlexpress) Services. This same scenario also occurs if I access the database using sqlcmd. Apparently the whole database gets locked and doesn't release.
I am about to write a ServiceControl method to handle this problem by restarting the sqlexpress Service. And I don't like using sp_attach_db/sp_detach_db.
This communication problem with VS and sqlExpress can't be normal. Does anyone have a solution to this?
Is there a configuration in sqlexpress that I am missing where both applications can share nicely?