Solved

Trying to attach SQL Server databases: database cannot be upgraded because it is read-only or has read-only files

Posted on 2011-02-18
6
1,748 Views
Last Modified: 2012-08-13
Hello,

I took a copy of mdf and ldf files from SQL Express 2008 instance. SQL Service was in stopped mode. Now I'm trying to attach them to SQL Server 2008 Enterprise Instance. I get error message: database cannot be upgraded because it is read-only or has read-only files.

I have checked file properties and there is not read only checkbox checked. How I should go forward to get these DBs to be attached. I dont have access to this 2008 Express instance anymore (it's in different city and I should make this change during weekend).

Any help is appreciated
0
Comment
Question by:thaapavuori
  • 4
  • 2
6 Comments
 

Author Comment

by:thaapavuori
Comment Utility
I forget the pics
sql.png
sql2.png
0
 
LVL 12

Expert Comment

by:mcv22
Comment Utility
0
 

Author Comment

by:thaapavuori
Comment Utility
My SQL service is running on local system account. My local system account has full controll to these files. I also tried to change SQL service to run on my admin account but same results... Still looking solution...
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:thaapavuori
Comment Utility
I have copied my MDF and LDF files to SQL default data directory (in my case E:\Program Files\Microsoft SQL Server\MSSQL10.INSTANCENAME\MSSQL\DATA). When I try to attach them I get that error.

I just tried to copy one mdf and ldf file to c:\temp folder. From there I was able to attach databases. So this has something to do with permissions but I dont really understand where is the mistake.
0
 
LVL 12

Accepted Solution

by:
mcv22 earned 500 total points
Comment Utility
Under security options, give full control to the SQL Service login to the E:\Program Files\Microsoft SQL Server\MSSQL10.INSTANCENAME folder and any sub-folders.
0
 

Author Comment

by:thaapavuori
Comment Utility
Thanks. It was because of UAC. I was opened SQL manager with windows authentication. Because of UAC my domain admin account couldnt use these admin level rights. I didnt finally change my folder security settings. I just basically logged in to SQL manager wih SA credentials and I was able to attach my DBs.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now