[dba-SQLServer] What a mess (otherwise knbown as "who owns things")

jwcolby jwcolby at colbyconsulting.com
Sun May 31 22:07:12 CDT 2009

I rebuilt a server from C:\ format on up.  New Windows Server 2003 X64, New SQL Server 2005 etc.

Now the current administrator (apparently) does not own the files on the raid arrays which of course 
survive quite nicely.  When I tried to attach a database it gave me an "insufficient rights" kind of 
error which I Googled and that tells me that I do not own the files.  I took ownership which worked 
(I can now attach),  but then I tried to attach and it said it couldn't because the files were read 

Only it DID the attach, and now I have a database in read only mode, which I cannot detach 
because... it is read only.


So... this invites MANY questions...

1) How do I take ownership of a disk drive on down and all the files on that disk drive?
2) Why are the files read only?
3) Now that I have one of the databases mounted (read only) how do I detach it so that I can make it 
read / write and reattach it?  Or how do I make it non-readonly?

4)Why did all of this happen?
5) Is there an easy way to prevent all this in the future?  I have a second server which I will be 
rebuilding when new parts get here mid week.  New motherboard / processor and 5 new terabyte drives 
for the server I rebuilt this weekend and 5 new drives for the one to be rebuilt next.  Obviously if 
there is something I can do in advance to prevent this mess I am all for that.

In fact the new motherboard is the same motherboard as I have in the current rebuild, and my plan is 
to clone the boot drive and just use that clone in the new system.  I have gone to much trouble to 
get all the multitude of software installed etc so when I am done I HOPE to end up with two 
literally identical machines, other than the second machine having some additional storage (and a 
next generation processor).

Any words of wisdom out there?

John W. Colby

More information about the dba-SQLServer mailing list