另一个进程使用的当前实例 [英] Current instance used by another process

查看:92
本文介绍了另一个进程使用的当前实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好..
我已经在2008年版本中创建了一个vb.net应用程序.现在,我想在运行时复制附加到此应用程序的数据库.
我想在运行时将数据库复制到另一个位置,但是它会生成类似当前实例被另一个进程使用.."的错误..
请帮助我....

Hello..
I have created an vb.net application in 2008 version .Now i want to copy the database which is attached to this application at runtime.
I want to copy the databse at runtime to another location but ,it generates the error like "current instance is used by another process..".
Please help me....

推荐答案

不要为同一问题发布乘法线程.
您不能复制正在访问/使用的文件.我猜您的程序已打开与数据库的连接,而您尚未关闭该数据库,然后再尝试复制数据库文件.
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.


这篇关于另一个进程使用的当前实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆