Galahtech

Development => Databases => Topic started by: Slowhand on July 04, 2008, 01:24:36 pm



Title: SQL Server 2005 - Database roles/permissions
Post by: Slowhand on July 04, 2008, 01:24:36 pm
Hi,

I'm building a small web application that connects to an MS SQL server.
Now to minimize risks I want to create a database user that can do only one thing: execute stored procedures (just one SP to be precise)
Can this be done?
If so, how?

Cheers,
CJ


Title: Re: SQL Server 2005 - Database roles/permissions
Post by: wrack on July 04, 2008, 03:31:56 pm
Very easy Slowy.

You create the stored procedure and a user to whom you want to allow access to a given stored procedure.

Then you right click on the stored procedure in management studio and click properties.

Go Permissions and add the user by clicking the add button. Then at the botton of that screen you tick the "Grant" box against "Execute" option.

Press OK and off you go :)