[Solved] SQL Server Error: You do not have permission to use the bulk load statement

kankon
 
on Jul 19, 2021 07:35 AM
593 Views

Hello 

If i want set all users same image

Isn't like this code?

The image in c: folder name img name image 1.png

insert into Table_infoname(id, profileimage)
SELECT BulkColumn
FROM Openrowset(Bulk 'C:\img\1.png', Single_Blob) as image

I am getting error

Msg 4834, Level 16, State 1, Line 3 You do not have permission to use the bulk load statement.

Download FREE API for Word, Excel and PDF in ASP.Net: Download
dharmendr
 
on Jul 19, 2021 10:56 PM

Hi kankon,

Make sure you have the right permissions to use BULK commands.

  • Expand Security
  • Expand Logins
  • Right click on your username and choose properties (A dialog window appears)
  • Choose Server Roles
  • Select bulkadmin to be able to use bulk commands or sysadmin to be able to use any commands to your database.

Reference:

https://stackoverflow.com/questions/32417776/you-do-not-have-permission-to-use-the-bulk-load-statement-error

 

kankon
 
on Jul 19, 2021 11:07 PM
dharmendr says:

Hi kankon,

Make sure you have the right permissions to use BULK commands.

  • Expand Security
  • Expand Logins
  • Right click on your username and choose properties (A dialog window appears)
  • Choose Server Roles
  • Select bulkadmin to be able to use bulk commands or sysadmin to be able to use any commands to your database.

Reference:

https://stackoverflow.com/questions/32417776/you-do-not-have-permission-to-use-the-bulk-load-statement-error

 

UPDATE Table_infoname 
SET profileimage = (SELECT BulkColumn FROM OPENROWSET (BULK 'C:\img\1.png', SINGLE_BLOB) a)