SQL Server – Databases are Read-Only After Reattaching

I was moving some files around today and ran into this confusing issue. I had moved a Sitecore instance to a new folder but originally left the database in it’s old location, so I went and detached them in SQL Server Management Studio (SSMS) and then moved the files from on folder to another. After that I reattached them in SQL Server and found that they were all listed as Read Only.

No problem, I thought. I checked the folder and sure enough it was marked as Read Only, so I unchecked that and hit Ok. Same problem. I went back to the folder properties and it still said Read Only. From there I tried setting several inner folders and files individually but all of them had the same problem. How odd.

After a quick search and a few min on Stack Overflow I went and tried unsetting the Read Only property in SQL Server Management Studio and once again, no dice.

Eventually what worked for me was I went and gave my windows user full write access to the folder, since that’s who I was logging into SSMS as. At that point I still couldn’t unset the option in the Windows properties but I was able to go in and reattach it through SSMS and at that point it no longer listed them as read only.


Tags: , ,

  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

Leave a Reply