December 1, 2005 at 2:24 pm
I'm trying to execute xp_sendmail inside a stored procedure. I think the ownership chain is OK, but it's still not working. Here's the setup:
The user database is owned by SA.
My wrapper procedure (SendMailTest - CREATE PROC SendMailTest AS EXEC master..xp_sendmail ...) is owned by dbo.
The login is granted access to the user database.
The login is a member of a role that has EXEC permission on SendMailTest. I've also tried giving the login itself EXEC permission on SendMailTes.
When I login and execute SendMailTest, it fails on permission to xp_sendmail.
I thought that having all of the databases involved owned by SA and all of the objects owned by dbo that the ownership chain would make it possible for the user to execute xp_sendmail. Is there something I'm missing?
Thanks,
John Mo.
December 5, 2005 at 8:00 am
This was removed by the editor as SPAM
December 5, 2005 at 11:08 am
There is something called cross database ownership, which may not be enabled.
Personally I'd setup a job owned by sa to run the mail procedure every minute. Check some table for mail to send and then let your proc insert data in the table.
Be sure you mark the msgs as sent once they are processed.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply