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 Administration
 How to check stored procedure execute permission

Author  Topic 

Rahul Raj
Starting Member

41 Posts

Posted - 2015-03-12 : 22:51:54
Hi,

We have some pre-defined stored procedures(around 4-5) which deletes/ truncates the tables. Can someone please let me know how can I determine whether I have the execute permission for the stored procedure.

Thanks for you help!

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2015-03-13 : 01:24:24
[CODE]
select name,
has_perms_by_name(name, 'OBJECT', 'EXECUTE') as has_execute,
has_perms_by_name(name, 'OBJECT', 'VIEW DEFINITION') as has_view_definition
from sys.procedures
where name = 'SPName'
[/CODE]

--
Chandu
Go to Top of Page

Rahul Raj
Starting Member

41 Posts

Posted - 2015-03-14 : 22:21:15
Hi Chandu,

Thanks for the prompt response!
Go to Top of Page

huangchen
Starting Member

37 Posts

Posted - 2015-04-02 : 05:56:35
unspammed
Go to Top of Page
   

- Advertisement -