
You want to attach a database but ended with below error message. Below error message is captured as in Microsoft SQL Studio and Microsoft SQL Server 2012.
Msg 3415, Level 16, State 5, Line 3
Database 'DDDD' cannot be upgraded because it is read-only,
has read-only files or the user does not have permissions
to modify some of the files. Make the database or files writeable, and rerun recovery.
Msg 1813, Level 16, State 2, Line 3
Could not open new database 'DDDD'. CREATE DATABASE is aborted.
Solution
There are few workarounds can be follow toward the issue resolution. You must ensure the following criteria are met.
- Launch the Microsoft SQL Management Studio as “Run as administrator”.
- Locate the database files (mdf, ndf, ldf) and ensure that your logged user has access to theses files / folders.
- Do not use SA user
- Login with Windows authentication. Do not use SQL Server authentication



Thank you!