由于恢复数据库时需要对数据库进行独占的访问,在恢复之前你必须中止其他用户与数据库的连接。
网上的解决方法:
在恢复数据库前:
方法一.打开Management Studio.
a). 右键点击你的数据库,Task ->Take Offline.
b). 右键点击你的数据库,Task ->Bring Online.
方法二.执行如下的Query:
Use Master
Alter Database [YOURDB]
SET SINGLE_USER With ROLLBACK IMMEDIATE
在恢复数据库后如果需要恢复会普通多用户模式:
Use master;
Go
Alter Database [YOURDB]
SET MULTI_USER
Go
说下自己的总结:
直接执行:Alter Database [YOURDB]
SET SINGLE_USER With ROLLBACK IMMEDIATE
在还原bak文件即可
相关推荐
1.1You may use the SOFTWARE PRODUCT pursuant to the license grant above and subject to the following terms and the proprietary notices in the SOFTWARE PRODUCT or on the media upon which the SOFTWARE ...
For example, if the clustered index is on (lastname, firstname) and a nonclustered index is on firstname, the firstname value will not be duplicated in the nonclustered index leaf rows. Note The ...
In our example, if one transaction (T1) holds an exclusive lock at the table level, and another transaction (T2) holds an exclusive lock at the row level, each of the transactions believe they have ...
Duplication of this publication or parts thereof is permitted only under the provisions of the Copyright Law of the Publisher’s location, in its current version, and permission for use must always be...
1.9 "Authorized End User" means every individual who is not registered by Licensor but who is allowed to use the Registered Software in accordance with the terms and conditions set forth in this ...
Duplication of this publication or parts thereof is permitted only under the provisions of the Copyright Law of the Publisher’s location, in its current version, and permission for use must always be...
在IT领域,数据库的安全性是至关重要的,尤其是对于存储敏感信息的Access数据库。Access是由微软开发的一款关系型数据库管理系统,广泛应用于小型企业及个人用户,用于管理数据和创建应用程序。在处理诸如康明斯公司...
1. The Licensee shall be granted a single, non-exclusive right of use of the software freeware version unlimited in time, as well as, after complete and unconditional payment of the license fee, a ...
Publisher’s location, in its current version, and permission for use must always be obtained from Springer. Permissions for use may be obtained through RightsLink at the Copyright Clearance Center. ...
exclusive use by the purchaser of the work. Duplication of this publication or parts thereof is permitted only under the provisions of the Copyright Law of the Publisher's location, in its current ...
not install or use the SOFTWARE on a computer that is a network server or a computer at which the SOFTWARE is used by more than one Developer. You may not network the SOFTWARE or any component part ...
在IT行业中,数据库的安全性是至关重要的,尤其是对于个人或小型企业使用的关系型数据库管理系统(RDBMS)如Microsoft Access。Access数据库加密码是确保数据安全的重要步骤,它能防止未经授权的用户访问或修改敏感...
not install or use the SOFTWARE on a computer that is a network server or a computer at which the SOFTWARE is used by more than one Developer. You may not network the SOFTWARE or any component part ...
在软件开发过程中,特别是使用Delphi XE3进行Windows应用程序开发时,经常需要与Microsoft Access数据库进行交互。为了简化这一过程,本篇文章将介绍一个实用的函数——`CreateODBC`,该函数用于自动创建ODBC数据源...
of being entered and executed on a computer system, for exclusive use by the purchaser of the work. Duplication of this publication or parts thereof is permitted only under the provisions of the ...
Allround Automations warrants that it is the owner of the software product, and that it has the right and authority to convey and grant the license(s) herein and to perform this LA, and that the use ...