SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Permissions for a stored proc running under Service Broker


Permissions for a stored proc running under Service Broker

Author
Message
jc-526617
jc-526617
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 73
Hi all

I am new to Service Broker but I'm trying to use it to run a stored procedure as a background process as it may take many hours to complete.

I used the example provided by Remus Rusanu at http://rusanu.com/2009/08/05/asynchronous-procedure-execution/, which is excellent and kicks off a stored proc just fine.

The stored proc runs fine when called from SSMS but fails when I try to run it under SB. I can run other, simple sprocs using SB, so that part is working. What appears to be the problem is that SB is running in a different security mode than my user, which has the necessary permissions (ie BULKADMIN).

I am no SQL Server guru, so I don't understand why, when CURRENT_USER is dbo, when I do "execute as user='dbo'" and check "is_srvrolemember ('bulkadmin')" it returns false. But I guess this is something to do with my problem.

Is the problem solveable, or do I have to work out another way of getting background imports to run?Sad

Hope you can help,
John
Evil Kraig F
Evil Kraig F
SSCrazy Eights
SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)

Group: General Forum Members
Points: 8593 Visits: 7660
Can you give us the specific command or statement that Service Broker is choking on, and any exact errors you may have encountered?


- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search