Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I had to replace my hard drive, XP pro sp3, and all my applications - including SQL Server 2008 R2 developer edition. My databases are all on a separate physical drive. I find I cannot move or copy them to a different folder, I cannot flip the read-only flag, and I cannot attach them to the database server.

I am logged in as administrator and accessing management studio as sa. None of the other user files are write protected on that drive.

share|improve this question

migrated from Apr 17 '12 at 21:18

This question came from our site for professional and enthusiast programmers.

Is it possible they are already attached to another instance of SQL Server? What SQL Server services are running in your services applet? – Aaron Bertrand Apr 16 '12 at 19:09
I only had SQL Server 2008 R2 installed. I just removed it and I still cannot copy or move the files even though none of them have the read-only flag checked. Again, these are the only files on the drive that are behaving this way – timMulherin Apr 17 '12 at 14:16

Might be OS-level access rights--every now and then I hit something like this. In Windows Explorer, right click on the file and select properties. Go to the Security tab. Are there any entries in the "Group or usernames:" box? These are the entities that can manipulate the file. Yes, even if you are local and domain admin, you can be blocked from accessing a file.

However, you can't be blocked from managing access rights over the file. Click on "Add...", grant yourself (or whoever) "Full Control", and you should be good. (If, of course, this is the actual problem.)

share|improve this answer
Well - there is no "Group or usernames box" on the security tab. Funny thing is the file property does not have read only checked off. – timMulherin Apr 17 '12 at 14:14
Can it be possible that the files are locked by some process? If you open the computer management and go to shared folder under system tools and check if the files are listed there. – Zinx Apr 18 '12 at 3:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.