Web Venture 101

Read-only database in SQLExpress

, posted: 18-Apr-2006 13:55

If my database in app_data is not checked out (ie it is read-only) when SSE attaches the database, it will stay as read-only (from a DB perspective) even if you check it out.

You need to detach the DB from SSE and start again.

Luckily I use SQL Server Management Studio which shows the currently attached DBs (connect to .\SQLExpress), and allows me to adjust the DB properties (under Options) and set the "Database Read-Only" attribute to False.

If you don't use SQL Server Management Studio, you can do this with SQL Server Express Utility (SSEUtil.exe), available at http://msdn.microsoft.com/data/downloads/tools/default.aspx

Comment by Mike D, on 9-Oct-2007 04:01

You can use sqlcmd which i think is built into sql express, the below script will switch off the read only status. sqlcmd -U sa -P PASSWORD -S .\SQLExpress -Q "alter database DATABASENAME set read_write" Soz in advance if i am barking up the wrong tree.

Comment by radu, on 8-Jan-2009 13:53

you just saved me allot of headache. thanks

Add a comment

Please note: comments that are inappropriate or promotional in nature will be deleted. E-mail addresses are not displayed, but you must enter a valid e-mail address to confirm your comments.

Are you a registered Geekzone user? Login to have the fields below automatically filled in for you and to enable links in comments. If you have (or qualify to have) a Geekzone Blog then your comment will be automatically confirmed and shown in this blog post.

Your name:

Your e-mail:

Your webpage:

ptorrsmith's profile

Peter Torr Smith
New Zealand

I've been working on a web venture idea for the last year or so, so have now resigned from my job to go at it full-time.

Here's how I go, with business and technology challenges!!