情景:
1.执行
alter database channel_management
modify name = testtt
时,报错:The database could not be exclusively locked to perform the operation.(无法以独占方式锁定数据库以执行该操作。)
2.右键---重命名
报错:
![](https://img.haomeiwen.com/i2290944/05d73634b4e74658.png)
原因:数据库的文件被占用了。
解决方法:首先需要从开始菜单中找到【SQL Server 配置管理器】,然后打开
![](https://img.haomeiwen.com/i2290944/379faebcb1524ff7.jpg)
然后会看到【SQL Server(MSSQLSERVER)】正处于运行的状态
![](https://img.haomeiwen.com/i2290944/0cf2db96e3b475c2.jpg)
右击它然后【重新启动】任务进程
![](https://img.haomeiwen.com/i2290944/c4748e6917d31552.jpg)
网友评论