Reputation: 7163
Hi I'm getting the error
You do not have permission to use the bulk load statement.
when I try to execute a stored procedure.
I've seen some websites mentioning about the bulkadmin
role, but I don't see it.
I'm using SQL Server 2008.
Any ideas?
Upvotes: 28
Views: 51266
Reputation: 461
I was having the same issue on a Sql Serverless database (Azure Synapse Analytics).
sp_addsrvrolemember is not available in this context, so I used the following to solve the issue:
ALTER ROLE db_owner ADD MEMBER [username]; -- owner allows bulk operations
ALTER ROLE db_denydatawriter ADD MEMBER [username]; -- in our case we don't want this specific user to have writer
It doesn't feel quite right to give owner to this user. Thoughts anyone?
Upvotes: -1
Reputation: 85
You can provide permission to user to fix this issue.
Source: http://sforsuresh.in/asp-net-mvc-4-not-permission-use-bulk-load-statement
Upvotes: 0
Reputation: 1527
Query version for Aleksandr's answer:
EXEC master..sp_addsrvrolemember @loginame = N'%userName%', @rolename = N'bulkadmin'
GO
Just replace %userName%
with desired user.
Also you need to be loged in as Sys-Admin (sa
) or other user with EXEC
permissions and bulkadmin
granting permission.
Upvotes: 6
Reputation: 14953
bulkadmin
is checked. bulkadmin
doesn't work for you.Upvotes: 56