Disconnecting from engine does not closes database

I connect Managment Studio to MSDE 2000SP4.

Open database, open some object, then disconnect from engine (not simple collapse DB objects). In other programm try to drop database. Until you don't close MSSQL MStudio, database is in use.

In older version collapsing DB objects in tree closes DB.



Answer this question

Disconnecting from engine does not closes database

  • annag

    I have "Drop connections" checkbox for that case. It works in SQL2000 and I see it in SQL2005.

  • John Hennesey

    Please, read my first post and try to reproduce it. After disconnecting, try to drop database you used in SSMS. Open new query in SSMS and try. "Cannot drop..."

    It's not strange, IT IS A BUG.


  • Marsha4830

    I have it in window that appears after "Detach" command. Also I remember there was switch "Auto close" in SQL2000 Enterprise Manager (last tab in DB properties).

    Perhabs this is MSDE behavior I run on SQL Server and don't use MSDE for a long time.



  • Runningdog

    Please, describe steps to reproduce, I will try it.

  • John.Padilla

    Hi!

    I don't have access to MS from 2000SP4, but I can tell you that MS in SQL2005 have Disconnect command in context menu of the server node. I think this is what you need.



  • sopi20

    I don't need detach database.

    Autoclose is a DB property (must NOT overrides by SSMS) and it's "TRUE". And Autoclose have another purpose - it closes DB after all users disconnects.

    I had try with Autoclose = True and AC = false. Result: Cannot drop database.

    There is no difference between MSSQL and MSDE for such things.

    May be you'll try


  • StevenFowler

    Does not matter what engine you use. I wrote, that when I DISCONNECT (using this command from menu - this is one way) from engine, database is in use while MS running. So, MS does not disconnect from DB, only delete engine from list.
  • Akhraden

    Where did you see this checkbox in SSMS

    May be this checkbox exists (I don't find it, but when I DISCONNECT from server all objects incl DB MUST be CLOSED.

    I had no this problem in SQL2000 cause database was auto closed after collapsing it's objects in tree and when it wasn't selected in tree.


  • Roger Cheng - MSFT

    Strange, when you Disconnect from server, it must lost connection and must release locks on any DB that was locked.

  • Disconnecting from engine does not closes database