How to enable bulk permission in SQL Server

前端 未结 6 1253
我在风中等你
我在风中等你 2020-11-30 05:52

I am trying to insert images using \"bulk\" into SQL Server 2012. But, am ending up with the error message stating tha:

Msg 4834, Level 16, State 1, L

6条回答
  •  日久生厌
    2020-11-30 06:16

    Note that the accepted answer or either of these two solutions work for Windows only.

    GRANT ADMINISTER BULK OPERATIONS TO [login_name];
    -- OR
    ALTER SERVER ROLE [bulkadmin] ADD MEMBER [login_name];
    

    If you run any of them on SQL Server based on a linux machine, you will get these errors:

    Msg 16202, Level 15, State 1, Line 1
    Keyword or statement option 'bulkadmin' is not supported on the 'Linux' platform.
    
    Msg 16202, Level 15, State 3, Line 1
    Keyword or statement option 'ADMINISTER BULK OPERATIONS' is not supported on the 'Linux' platform.
    

    Check the docs.

    Requires INSERT and ADMINISTER BULK OPERATIONS permissions. In Azure SQL Database, INSERT and ADMINISTER DATABASE BULK OPERATIONS permissions are required. ADMINISTER BULK OPERATIONS permissions or the bulkadmin role is not supported for SQL Server on Linux. Only the sysadmin can perform bulk inserts for SQL Server on Linux.

    Solution for Linux

    ALTER SERVER ROLE [sysadmin] ADD MEMBER [login_name];
    

提交回复
热议问题