Well, if your app only changes data in the DB by using SQL Server Stored Procedures, you can use a User login which will maximize your connection pooling instead of building up usless connections. When you go to Users and right click the User, All Tasks -> Manage Permissions, you can then apply Exec permissions on all the SPs your app uses and deny everything else to lock down what the Login in question can do.
Log in as a Service & Act as Part of the Operating System are Windows Domain Security Policy rights that have to be granted through your Network Admin or the Server -> Domain Security Policy -> User Rights Assignments. Or, if you're workgrouping instead of using a Domain, go to the Local Security Policy on your Server and you'll find it under Local Policies -> User Rights Assignment.
OOPS. Just found a Caveat to the SP permissions issue. If the Stored Procedure itself uses the Exec or Execute command, the Execute command runs under the security rights of the SQL Login. So if Insert, Select, etc. are denied on a table which is accessed using a SP which in turn uses the Exec command, then it will fail. On the other hand, if non of your SPs use the Exec command (just do the Insert/Select/Update...etc. without the Exec command) then they work just fine under a Login with all Table permissions denied but the SP EXEC permission granted.
...What we did to test this. Created simple table called Error with 1 text column (we already had this table with other columns. Either use one you have that is simple or create a new one).
Created stored procedure with a
Code:
Create Procedure ErrorTest_SP
Insert Error
Set TextCol = "testing"
Went to Database -> Users-> Rightclick Login name for popup -> All Tasks -> Manage Permissions. Denied all permissions on Error table. Granted EXEC permission on ErrorTest_SP.
Logged into SQL Server with User and ran Exec ErrorTest_SP.
Went back and did a Select * from Error and found our "testing" inserted.
But if your application actually does updates/inserts/deletes directly from the application instead of calling existing SPs within SQL, this probably won't work for you.
Did I confuse you even worse or did I make any sense?
Catadmin - MCDBA, MCSA
Remember, "Work" is a four letter word. And you know what your mother told you about using four letter words!