Sql server execute permission; failure to apply permissions

Posted by WestDiscGolf on Stack Overflow See other posts from Stack Overflow or by WestDiscGolf
Published on 2010-06-15T08:48:27Z Indexed on 2010/06/15 9:02 UTC
Read the original article Hit count: 178

I've just migrated from SQL2000 to SQL2008 and I have started getting an execute permission issue on a stored proc which uses sp_OACreate.

The rest of the system works fine with the db login which has been setup and added to the database.

I've tried:

USE master
GO
GRANT EXEC ON sp_OACreate TO [dbuser]
GO

But this fails with the following error:

Msg 15151, Level 16, State 1, Line 1 Cannot find the user 'dbuser', because it does not exist or you do not have permission.

I'm logged into the server as sa with full permissions. I can execute a similar sql statement and apply the permissions to a server role, however not a login/user.

How do I apply the changes to the specific user/login?

I can apply the permissions to the public role and it resolves my issue; however this seems to be a security issue to me which I don't really want to apply to the live server.

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about security