Follow sqlserver-dba.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

SQLServer-DBA.com Links

Dba_db2_button

dba-ninja.com

SQL Server DBA Jobs

Execute permission was denied on the object

24 April,2015 by Tom Collins

Question: I get this  error message when  executing  a database function.

 

The EXECUTE permission was denied on the object ‘cccccccccc’ , database

  xxx

Answer:

1)      Avoid GRANT EXECUTE to public , such as

GRANT Execute on [dbo].your_object to [public]

 

Read more on Security audit for SQL public role

2)      Avoid giving individual object  level permissions  . Most internal or external security audits will report on object level permissions as a security  weaknkess. Read How to create a SQL Server Security Audit

3)      Good solution is to use a database role and grant EXECUTE to the role.

CREATE ROLE db_executor
GRANT EXECUTE TO db_executor

 

For other best practises read the SQL Server security polcy document

 


Author: Tom Collins (http://www.sqlserver-dba.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on Execute permission was denied on the object


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer