Phil
Phil

Reputation: 537

Make SQL Select Query Read Only

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!

Upvotes: 2

Views: 2801

Answers (3)

Calmar
Calmar

Reputation: 327

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

Upvotes: 2

Dyno Fu
Dyno Fu

Reputation: 9044

ALTER DATABASE database-name SET READ_ONLY

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

Upvotes: 3

Josh
Josh

Reputation: 6322

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

Upvotes: 3

Related Questions