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

前端 未结 3 1160
渐次进展
渐次进展 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:45

    I was having the same issue when trying to restore a database from a backup. The solution for me was to ensure that I checked "Overrite the existing database(WITH REPLACE)" and "Close existing connections to destination database" in the Options page BEFORE doing the restore. Here is a screenshot below.

提交回复
热议问题