当我尝试将mdf附加到sql server db时,出现以下错误 [英] when i am trying to attach the mdf to the sql server db it is getting the following error

查看:140
本文介绍了当我尝试将mdf附加到sql server db时,出现以下错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无法打开物理文件"D:\ Matrimonial_Project \ App_Data \ Lifepatner.mdf".操作系统错误32:"32(该进程无法访问该文件,因为它正在被另一个进程使用.)".

尝试为文件D:\ Matrimonial_Project \ App_Data \ Lifepatner.mdf附加自动命名的数据库失败.存在具有相同名称的数据库,或者无法打开指定的文件,或者该数据库位于UNC共享上.

mdf文件已经添加到

Unable to open the physical file "D:\Matrimonial_Project\App_Data\Lifepatner.mdf". Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".

An attempt to attach an auto-named database for file D:\Matrimonial_Project\App_Data\Lifepatner.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

The mdf file is already added to the

推荐答案

以管理员身份运行"SQL Server Management Studio". 应该可以解决问题
Run "SQL Server Management Studio" as administrator.
It should solve the problem


看看是否有帮助:
尝试为文件附加自动命名的数据库.-可能的解决方法 [问题排查错误:尝试附加自动n ... [尝试附加自动命名的数据库. .connection字符串刷新 [
See if these help:
An attempt to attach an auto-named database for file.. - possible workarounds[^]
Troubleshoot Error: An attempt to attach an auto-n...[^]
An attempt to attach an auto-named databa...connection string refresh[^]


此错误表明您已将文件附加到计算机上的Sql服务器,这可能是Sql服务器的另一个实例;所以它给出了错误

尝试连接到计算机上的其他Sql实例.

您可能会从Sql Server配置管理器中了解在计算机上运行的实例


希望能有所帮助........

祝你好运
This error specifies that you have already attached the file to Sql server on the machine may be another instance of Sql server; so it is giving the error

Try connection to other Sql instances on the computer.

You may get an idea of instances runnning on the computer from Sql Server Configuration Manager


Hope it helps........

Best of luck


这篇关于当我尝试将mdf附加到sql server db时,出现以下错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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