Showing posts with label permission. Show all posts
Showing posts with label permission. Show all posts

Sunday, March 11, 2012

Error: "EXECUTE permission denied on object..."

I get this error when I try to preview a report that uses a stored procedure. The stored procedure does not exist in the database, but in the directory I run the report from. The stored procedure declares which database to use, and to create the temp table I want. Do I require special permissions on the sql db I am using to be able to create temp tables? Any help would be great, thanks!

Michael

How are you connecting to the stored procedure in a directory?

SQL Profiler may let you troubleshoot what user account and object this error message relates to.

|||

I had a developer do this awhile ago too; you require elevated permissions to create tables. Try just clearing the table rather than deleting and recreating the table every time the report is run it requires less security.

Error: "grantor does not have grant permission"

Hi all,

Before using SQL Server 2000 Developer Edition I did not get this error message. I had been using the trial edition of SQL Server 2000.

I only get it with stored procedures.

I solved my problem by giving the ASPNET login "db_owner" privs, which I didn't need to with the trial edition and is not best practice from a security angle.

I login under the Windows based admin account. (not using mixed mode).

Hope someone can shed some light.

Thanks.Placing a statement like:

"grant exec to dbo.testProc for {role}"

Inside the procedure can cause this problem, and was the culprit in this case.

Of course the ASPNET account (executing the sp) does not have grant permission!