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,794 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 

Author Comment

by:thaapavuori
ID: 34930230
I forget the pics
sql.png
sql2.png
0
 
LVL 12

Expert Comment

by:mcv22
ID: 34930272
0
 

Author Comment

by:thaapavuori
ID: 34930362
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 Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 

Author Comment

by:thaapavuori
ID: 34930380
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
ID: 34930391
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
ID: 34930493
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
LAG_ROWID - how do I get the right order using this query? 2 22
Index and Stats Management-Specific tables 8 39
Database maintenance 36 108
Database Owner 3 21
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

733 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