简体   繁体   English

如何解决此数据库问题?

[英]How to fix this database issue?

how to fix this issue? 如何解决这个问题?

An attempt to attach an auto-named database for file C:\\Users\\Rozky\\Desktop\\PayrollSystem - Copy\\PayrollSystem\\Payroll.mdf failed. 尝试为文件C:\\ Users \\ Rozky \\ Desktop \\ PayrollSystem-Copy \\ PayrollSystem \\ Payroll.mdf附加自动命名的数据库失败。 A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. 存在具有相同名称的数据库,或者无法打开指定的文件,或者该数据库位于UNC共享上。

You are attemting to insert the database with the same name, if u want to attach the database there are two ways u can do that 您打算插入具有相同名称的数据库,如果您要附加数据库,可以通过两种方法

  1. You can simple detach the database and attach it again 您可以简单地分离数据库并再次附加它
  2. Change the name of databse something different, for example if your databse name is abc you can change it to abcold or oldabc or whtever, then it will attach easily, and be sure to open sql server as administrator 将数据库的名称更改为其他名称,例如,如果您的数据库名称为abc,则可以将其更改为abcold或oldabc或whtever,那么它将容易附加,并确保以管理员身份打开sql server

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM