Error 3101
Severity Level 16
Message Text
Exclusive access could not be obtained because the database is in use.
Explanation
This error occurs when you attempt to load a backup while users are accessing the database. This error can occur with RESTORE DATABASE or RESTORE LOG. You cannot use the RESTORE DATABASE statement while the database is in use by any user, including yourself.
Action
Use the ALTER DATABASE SET SINGLE_USER to remove users from the database.
Or, wait until all users have finished using the database, and then use the RESTORE DATABASE statement. Make sure that you are not using the database being loaded when you issue the RESTORE DATABASE statement. Although not required, it is best to run the RESTORE DATABASE statement from the master database.
MAKE USE THAT YOU ARE RUNNING THE QUERY FROM THE MASTER DATABASE!
- If you invoke the query under the database you are trying to restore, you will continue to receive the Error 3101.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10640532/viewspace-598213/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10640532/viewspace-598213/
本文介绍了Error3101错误的原因及解决方法。此错误通常发生在尝试加载备份时数据库正被使用。文章建议使用ALTER DATABASE SET SINGLE_USER命令移除所有用户或等待所有用户结束使用后再进行操作。
2050

被折叠的 条评论
为什么被折叠?



