User is getting below error while running bulk insert command in Azure SQL Server. I am using Azure SQL Server and not SQL Sever. Most of the commands related to Bulk Insert grant permission is not working in Azure SQL Server.
Error
You do not have permission to use the bulk load statement.
Commands Tried in Azure SQL Server to Add User
EXEC sp_addrolemember 'db_ddladmin', 'testuser';
ALTER SERVER ROLE [bulkadmin] ADD MEMBER testuser
GRANT ADMINISTER BULK OPERATIONS TO testuser
Error
Msg 40520, Level 16, State 1, Line 5
Securable class 'server' not supported in this version of SQL Server.
Your help is highly appreciated.
In Azure SQL Database, grant ADMINISTER DATABASE BULK OPERATIONS
to the principal in the context of the desire database:
GRANT ADMINISTER DATABASE BULK OPERATIONS TO testuser;
The user will also need INSERT
permissions on the target table. These Azure SQL Database permissions are detailed in the BULK INSERT documentation under the permissions section.
On Azure it works on tables in the database in question only. It does not work on temp tables. So if you are bulk loading in parallel and want to use temp tables, you are in a corner.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With