且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

另一个进程使用的当前实例

更新时间:2023-12-03 23:32:40

不要为同一问题发布乘法线程.
您不能复制正在访问/使用的文件.我猜您的程序已打开与数据库的连接,而您尚未关闭该数据库,然后再尝试复制数据库文件.
Don''t post multiply threads for the same question.
You cannot copy a file that is being accessed/used. I am guessing your program has openned a connection to the database that you have not closed before you try to copy the database file.


该数据库正在使用中,因此该文件已被锁定.在所有正在使用该数据库的应用程序都关闭它们的连接之前,您无法复制它.
The database is in use and, hence, the file is locked. You cannot copy it until all application that are using the database close their connections to it.


是的!它将给出错误当前实例正在被另一个进程使用..",因为在SQL Server Service停止之前您无法复制.mdf或.ldf文件,因为在启动SQL Server Service时会使用它们.您必须先停止SQL Server服务,才能复制所需的.mdf和.ldf文件.
yeah! it will give the error "current instance is used by another process.." because You can''t copy .mdf or .ldf files until SQL Server Service is stopped because they are used while SQL Server Service is started. You must first stop the SQL Server Service in order to copy the desired .mdf and .ldf files.