今天在利用sp_attach_db 'dbname', 'dataFileFullName', 'logFileFullName' 命令附加一个数据库文件到SqlServer2008时遇到了以下的错误:

Msg 3415, Level 16, State 3, Line 1

Database [dbname] cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery.
Msg 1813, Level 16, State 2, Line 1
Could not open new database [dbname]. CREATE DATABASE is aborted.
Google之后得到解决方案是将mdf和ldf所在的目录的只读属性去掉并设置everyone用户的权限为FullControl,特此记录。

相关文章:

  • 2021-07-01
  • 2022-12-23
  • 2021-06-15
  • 2021-04-05
  • 2021-04-25
  • 2022-12-23
  • 2022-12-23
  • 2021-10-01
猜你喜欢
  • 2021-08-18
  • 2022-02-05
  • 2021-10-16
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2021-04-26
相关资源
相似解决方案