Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Permissions for a stored proc running under Service Broker Expand / Collapse
Posted Monday, March 7, 2011 6:19 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, September 7, 2015 4:51 AM
Points: 4, 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, 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?

Hope you can help,
Post #1074097
Posted Monday, March 7, 2011 10:19 AM



Group: General Forum Members
Last Login: Wednesday, September 23, 2015 3:34 PM
Points: 5,467, Visits: 7,660
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
Post #1074300
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse