您的位置:首页 > 博客中心 > 数据库 >

关闭数据库当前链接,数据库脚本

时间:2022-03-13 22:42

在进行数据库操作时,如还原数据库,有时候显示如下错误Exclusive access could not be obtained because the database is in use

可以使用下面语句,关闭当前链接以便继续操作。

use Master

ALTER DATABASE yourdatabasename SET MULTI_USER WITH ROLLBACK IMMEDIATE;

关闭数据库当前链接,数据库脚本,布布扣,bubuko.com

热门排行

今日推荐

热门手游