SQL Server tells me database is in use but it isn't

前端 未结 3 1034
渐次进展
渐次进展 2021-02-05 06:25

SQL Server keeps telling me a database is in use when I try to drop it or restore it, but when I run this metadata query:

select * from sys.sysprocesses 
where d         


        
3条回答
  •  囚心锁ツ
    2021-02-05 06:36

    There could be lots of things blocking your database. For example, if you have a query window opened on that database, it would be locked by you. Not counting external accesses, like a web application on IIS.

    If you really wanna force the drop on it, check the close existing connections option or try to manually stop SQL Server's service.

提交回复
热议问题