views:

194

answers:

3

Is there a way to set an "Select Only" Mode?

I work with SQL Server Management Studio and im afraid of editing some lines while selecting stuff from the database!

+3  A: 

create a new user with select only permissions. then use that user to connect.

Josh
+2  A: 

ALTER DATABASE database-name SET READ_ONLY

http://www.blackwasp.co.uk/SQLReadOnly.aspx

Dyno Fu
That will affect everyone, and that is not a good idea.
Hakan Winther
+1  A: 

Yes, they are called user permissions. So you need to set the account you have only select rights to the database.

So

DENY insert ON all TO user
DENY update ON all TO user
DENY delete ON all TO user
Calmar