Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Execute Permission to user

Author  Topic 

shaggy
Posting Yak Master

248 Posts

Posted - 2009-05-20 : 10:02:08
HI Friends,

I want to restrict user by giving only execute permission.
If i grant exec to user, execute permission is granted to that specified user and he can able to access all the object present in that stored procedure but he cannot able to access the objects present in dynamic query (permission denied).

My Scenario is that i have to give only exec permission for that particular user.

Please Advice


visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-05-20 : 12:48:32
exec permission to what? procedure you mean?
Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2009-05-20 : 13:03:08
The statement you made is correct. But what is your question? Are you asking HOW to grant EXECUTE permissions? You use GRANT EXECUTE ON ______ TO _______ where the first blank is the name of the stored procedure you want them to execute, and the second blank is the user name.

If you are complaining that EXECUTE permissions do not allow a user to run a stored procedure that uses Dynamic SQL, then you are correct, that is a security feature, and one of the reasons I discourage people from using Dynamic SQL becuase Dynamic SQL requires that the user have direct access to the underlying tables.

--------------------------------------------
Brand yourself at EmeraldCityDomains.com
Go to Top of Page
   

- Advertisement -