mercredi 25 mars 2015

Grant permissions on stored procedure


I created a user in SQL Server 2012 database and revoked all permissions given by the public role.


Then i granted exec permission on a stored procedure. The user can execute the procedure but cannot get the data it returns.


The procedure is in a schema1 and the tables from which it selects are in schema2.


If I add the user to db_datareader role it can read all data from all the tables in the database. I tried WITH EXECUTE AS OWNER but it didn't work.


How can I grant only the access to the given procedure and nothing else?





Aucun commentaire:

Enregistrer un commentaire