microsoft/vscode-mssql

drop database fails most of the time because the db is in used

llali opened this issue · 3 comments

llali commented
  • MSSQL Extension Version:
  • VSCode Version:
  • OS Version: RHEL

Steps to Reproduce:

  1. Create a new database
  2. Close mssl extension
  3. Open the extension, open new sql query and connect
  4. Execute "Drop database [db name]

Expected: the database should get dropped successfully since there's not any other open window accessing the database

Actual: The query failed: Cannot drop database "[db name]" because it is currently in use.

We can look at this for the next release - we should better handle our open connections and try to ensure this works as well as it does in SSMS

llali commented

A change Karl made in sqltoolsservice should be related to this issue. I'll verify to make sure it's really fixed