Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL2008 RC won't attach 2005 mdf - sees it as read only
Message
From
23/06/2008 09:14:46
 
General information
Forum:
Microsoft SQL Server
Category:
Database management
Miscellaneous
Thread ID:
01326060
Message ID:
01326093
Views:
17
Sergey -

My problem is not in changing the read-only once the DB is attached. In the SQL Express 2005 server, MS 2008 will attach the DB and then in the properties I can just flip the property to Read Only = False.

The problem is that on the 2008 server the MS 2008 will not attach the DB at all so I don't think I can use ALTER on it, but rather must attach it programmatically with some clause that indicates it should be attached even though it is seen as read only.

I wonder if anyone who is running SQL 2008 RC can reproduce this.



>Charles,
>
>Try Alter database set read_write. See http://bhaidar.net/cs/archive/2007/05/24/sql-server-express-and-read-only-databases.aspx
>If it doesn't work then it's access rights issue.
>
>>New Vista Ultimate box. Clean install of latest SQL 2008 RC. Then installed VS 2008 and SQL Express2005.
>>
>>From my XP box I detached two databases from an instance of SQL Express 2005. Copied the mdf and log files to the data folders of the two SQLs on the Vista box.
>>
>>SQL 2008 MS will attach the databases to the SQL Express 2005 server, but sees them as read only. I can then change them to readable. OK. Never saw that on XP boxes but ok.
>>
>>But the SQL 2008 will not allow the attach, saying the databases are read only or contain files that are read only.
>>
>>Both databases re-attach on the xp sql 2005 box with no problem.
>>
>>I assume I need to attach the database in 2008 with a T-sql CREATE DATABASE ... TO ATTACH TRUSTWORTHY ON but can't seem to get the syntax right.
>>
>>Guidance appreciated.
>>
>>TIA
>>


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform