Whenever I detach, xcopy an sql express db:
On the same computer I can re-attach no problem.
On another machine it always comes up as readonly. How do I get around this. Resetting the file and folder read-only attribs doesn't help.
Thanks
Heath
I posed your question at Microsoft's managed newsgroup for SQL Server and these are the two responses I received:
BOL says that the xcopied database gets it's readonly state by the file
attributes of the primary file. Check you don't have any group policies in
place or AV/privacy software that changes the permissions.
and
This should work. Chances are good the SQL Server principle doesn't have
write permissions on either the files or directory. A common issue is that
when the original attach was done the user didn't have write permissions and
write permission were added later to try to fix the problem. Once the
database has been attached as read_only, an ALTER DATABASE is required to
make it read write.
Copyright (c) Marimer LLC