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

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
thaapavuoriAsked:
Who is Participating?
 
mcv22Connect With a Mentor Commented:
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
 
thaapavuoriAuthor Commented:
I forget the pics
sql.png
sql2.png
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
thaapavuoriAuthor Commented:
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
 
thaapavuoriAuthor Commented:
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
 
thaapavuoriAuthor Commented:
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
All Courses

From novice to tech pro — start learning today.