Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 ReAttach (fire is out)

Author  Topic 

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2005-06-10 : 08:59:16
I am trying to move a database from one server drive to another drive on the same server.

My initial thought was to detach, copy the files (data & log) and then reattach.

When I did this I ended up with a read-only db that I could not set to read-write.



Corey

Secret Service Agent: Mr. President, you're urinating on me.
President Lyndon Johnson: I know I am. It's my prerogative.

coolerbob
Aged Yak Warrior

841 Posts

Posted - 2005-06-10 : 09:43:34
How odd. I've never had that happen when using detach/attach.
As this link shows http://www.sqlteam.com/item.asp?ItemID=127
if it is read only now, it must have become RO after you atached it - otherwise the mdf could not have been altered to accomodate a succesfull attach.
And I presume it's not marked suspect...
Go to Top of Page

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2005-06-10 : 09:45:28
correct - its not suspect.

Oddly enough attaching the orig files on E results in usable db
and attaching the copied files on G results in ReadOnly db

Current solution is to backup and restore with move, but this takes significantly longer.


Corey

Secret Service Agent: Mr. President, you're urinating on me.
President Lyndon Johnson: I know I am. It's my prerogative.
Go to Top of Page

dineshasanka
Yak Posting Veteran

72 Posts

Posted - 2005-06-10 : 09:55:17
yes this is really odd
I have done this frequently with no troubles
Go to Top of Page

mr_mist
Grunnio

1870 Posts

Posted - 2005-06-10 : 09:58:40
Are the copied mdf files read only in the operating system?

-------
Moo. :)
Go to Top of Page

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2005-06-10 : 10:06:44
quote:
Originally posted by mr_mist

Are the copied mdf files read only in the operating system?

-------
Moo. :)



No, I already checked that .

Corey

Secret Service Agent: Mr. President, you're urinating on me.
President Lyndon Johnson: I know I am. It's my prerogative.
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-06-10 : 10:23:57
Did you check to make sure the the SQL Server service account has read and write access to the folder where you moved the file?





CODO ERGO SUM
Go to Top of Page

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2005-06-10 : 10:27:52
I am logged on to the server as local\Administrator
I am using the sa account in SQL.

Could I still have the readwrite access issue?

Corey

Secret Service Agent: Mr. President, you're urinating on me.
President Lyndon Johnson: I know I am. It's my prerogative.
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-06-10 : 10:51:00
I don't mean the account you are logged on with, I mean the account that the SQL Server service runs under. If it has only read access to that folder, it will not be able to update the databasse.


quote:
Originally posted by Seventhnight

I am logged on to the server as local\Administrator
I am using the sa account in SQL.

Could I still have the readwrite access issue?

Corey



CODO ERGO SUM
Go to Top of Page

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2005-06-10 : 11:27:50
solved... it was proxy account folder permissions...

Thanks a ton Michael!!

Corey

Secret Service Agent: Mr. President, you're urinating on me.
President Lyndon Johnson: I know I am. It's my prerogative.
Go to Top of Page
   

- Advertisement -