Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a sql server user named SchoolTeacher to access my application.

It has the following rights to my PrimarySchool database

INSERT, UPDATE, DELETE, EXECUTE, CONNECT, SELECT

The user must be able to perform simple DB operations through my c# application (ADD,SEARCH, UPDATE, DELETE)

I have tested the application, and these permissions seem enough, still it's good to have a second opinion.

Are these permissions enough or do I need to add/reduce some more ?

share|improve this question

migrated from stackoverflow.com Sep 2 '11 at 12:14

This question came from our site for professional and enthusiast programmers.

2  
I'd say this belongs here: dba.stackexchange.com –  George Duckett Sep 2 '11 at 10:49
3  
If it satisfies the working of your application in entirety, it should be enough –  Tarun Sep 2 '11 at 10:50

1 Answer 1

up vote 1 down vote accepted

If your user needs to execute some SP (Stored Procedure), you need to give him/her executor role. Here how you can do it;

USE [MyDatabaseName]
GO

/* CREATE A NEW ROLE */
CREATE ROLE db_executor;

/* GRANT EXECUTE TO THE ROLE */
GRANT EXECUTE TO db_executor;

Then you need to simple add your user to db_executor role. It will allow him/her to exec SPs from your app.

But your title seems that you need to give the user as low permission as possible so this action might not be needed if you are not working with SPs.

On the other hand, if you have dependencies on other database (for example your companies Master database named Contoso.Master), you need to grant permissions to your user to do some stuff on those dbs as well.

share|improve this answer
    
The user is able execute SPs with the current permission set. –  Question Guy Sep 2 '11 at 11:00
    
oh, I didn't see that. You have already given EXECUTE permission –  tugberk Sep 2 '11 at 11:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.