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 Programming
 grant exec on sys.sp_OACreate to userrole

Author  Topic 

sinva
Starting Member

23 Posts

Posted - 2010-05-16 : 18:07:46
Hi All,

I am having a problem when want to use a stored procedure containing the statement to create CDO.Message Object exec @hr = sp_OACreate 'CDO.Message', @iMsg OUT

But it seems the system stored procedure sp_OACreate could only be executed when using sa account because when i use other account there is an error: The EXECUTE permission was denied on the object 'sp_OACreate', database 'mssqlsystemresource', schema 'sys'.

I have tried to grant the exec permission to the userrole in the master database using the sa account

grant exec on sys.sp_OACreate to userrole

But error message shown: Cannot find the user 'userrole', because it does not exist or you do not have permission.

Is there any suggestion other than execute as dbo / grant exec to public??

Thanks a lot

sinva
Starting Member

23 Posts

Posted - 2010-05-18 : 04:57:50
Is that really have no solution??
Go to Top of Page
   

- Advertisement -