I'm using SQL Server 2005 Express. When i'm attaching My project database through "SQl Server Management Studio" The database is getting attached as a 'Read only' database. But when i'm attaching the same database from command prompt or using a batch file it is getting attached normally.
The database is from another system. It is behaving the same on the parent system on which it is developed.
Look at the attributes and the permissions:
"A variation of this issue is when the user that opens the user instance connection has read permissions on the database files but does not have write permissions. In this case, SQL Server attaches the database as a READ_ONLY database. If you get a message saying that the database is opened as read only, you need to change the permissions on the database file. "
http://msdn2.microsoft.com/en-us/library/bb264564.aspx
Jens K. Suessmeyer
http://www.sqlserver2005.de
|||Hi JensthankQ very much for your reply.
Can you suggest me how can i change the permissions on the database file.
I've given full access permissions for the folder contaning the database files, but still the problem is the same.|||
hi,
you have to grant NTFS permissions to the account running the SQL Server instance..
regards
|||
Make also sure that the appropiate file attributes are not set like readonly / archive. This can also prevent the service from opening the file in a writeable mode.
Jens K. Suessmeyer
http://www.sqlserver2005.de
No comments:
Post a Comment