SQL-Server: Error - Exclusive access could not be obtained because the database is in use

后端 未结 14 2659
隐瞒了意图╮
隐瞒了意图╮ 2020-12-12 17:45

I am actually trying to make a script (in Sql Server 2008) to restore one database from one backup file. I made the following code and I am getting an error -



        
14条回答
  •  一生所求
    2020-12-12 18:13

    Setting the DB to single-user mode didn't work for me, but taking it offline, and then bringing it back online did work. It's in the right-click menu of the DB, under Tasks.

    Be sure to check the 'Drop All Active Connections' option in the dialog.

提交回复
热议问题