I have a service broker activated stored procdedure that runs fine when executed in management studio. However, when it is activated on the queue, the sql server error log shows the following message:
'The activated proc [dbo].[FileUploadAsyncWorker] running on queue AsyncProcessing.dbo.FileUploadRequestQueue output the following: 'You do not have permission to use the bulk load statement.'
I think that the ‘offending’ statement in FileUploadAsyncWorker is: insert into FileContent (filename, content) select @filename, content from openrowset (bulk…
How do I tell under which user account the stored procedure is running?
Let the stored procedure insert the username into a table:
My guess is that the SP will run as the SQL Server Service account.
You can also use the SQL Profiler to find out the account which is executing your sp.