SqlException: EXECUTE permission denied on object

  • Thread starter Thread starter Ivan Simurina
  • Start date Start date
I

Ivan Simurina

I m getting the following error once i initiate a page that connects with
database.

SqlException: EXECUTE permission denied on object 'sp_items_for_sale',
database 'bids', owner 'dbo'.]

what should i do to correct this?

thanx
 
Ivan Simurina said:
I m getting the following error once i initiate a page that connects with
database.

SqlException: EXECUTE permission denied on object 'sp_items_for_sale',
database 'bids', owner 'dbo'.]

what should i do to correct this?

Either change which user you're connecting as, or talk to your DBA to
get access to that stored procedure.
 
Grant permissions to the stored proc to the user who is trying to execute
it, i.e. ASPNET for a web server.

Also, user written stored procs should not use the sp_ or xp_ prefixes, SQL
Server will look in the MASTER database for the proc before looking in the
BIDS database causing performance degradation.
 
Ivan said:
How do i do that?
Execute the following query in query analyzer to give ASPNET access rights to
execute the proc:

GRANT EXECUTE ON [dbo].[sp_items_for_sale] TO [ASPNET]

FB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top