Re: sqlBulkCopy and required permissions



I believe the same permissions are needed for SqlBulkCopy as BULK INSERT.
Here's an excerpt from the SQL 2005 Books Online BULK INSERT topic:


<Excerpt
href="ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/be3984e1-5ab3-4226-a539-a9f58e1e01e2.htm">

Requires INSERT and ADMINISTER BULK OPERATIONS permissions. Additionally,
ALTER TABLE permission is required if one or more of the following is true:

- Constraints exist and the CHECK_CONSTRAINTS option is not specified.

Note:
Disabling constraints is the default behavior. To check constraints
explicitly, use the CHECK_CONSTRAINTS option.

- Triggers exist and the FIRE_TRIGGER option is not specified.

Note:
By default, triggers are not fired. To fire triggers explicitly, use the
FIRE_TRIGGER option.

- You use the KEEPIDENTITY option to import identity value from data
file.

</Excerpt>

--
Hope this helps.

Dan Guzman
SQL Server MVP

"skants" <skants@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7C1F19B6-2454-4E19-BE86-535EB280B697@xxxxxxxxxxxxxxxx
I am working on a client application (.NET 2.0) that will use sqlBulkCopy
to
upload some records to a SQL Server 2000 database. The end users will be
using their domain accounts to access the database via the application.
My
question is what are the minimum permissions required (on SQL Server) for
the
end-user if the application uses sqlBulkCopy to insert into table X. I
assume it would be more than just to grant insert on table X.

Thanks



.



Relevant Pages

  • Re: Bulk insert ArrayList into table
    ... SqlBulkCopy is probably perfect for you described ... There is no faster way to insert data into SQL ... Server than a bulk insert technique. ... @ExtremeDate datetime, ...
    (microsoft.public.sqlserver.programming)
  • Re: Bulk Insert permission
    ... "x" was a mapped drive but I have the same issue with a UNC path. ... My user is part of the Bulk Admin Role in SQL. ... This does sound like it is a permissions issue. ...
    (microsoft.public.sqlserver.programming)
  • Re: Bulk Insert permission
    ... My SQL user is also a domain account that has permissions on the share where the source file is. ... When I try running the sproc with my user credentials I get the "You do not have permission to use the bulk load statement". ...
    (microsoft.public.sqlserver.programming)
  • Re: Bulk Insert permission
    ... My user is part of the Bulk Admin Role in SQL. ... so there is no reason to look for permissions on drives. ...
    (microsoft.public.sqlserver.programming)
  • Re: laoding data from csv file
    ... I'm working with .net 1.1..so i can't use sqlbulkcopy concept.. ... You could use SQL Server's 'BULK INSERT' T-SQL command directly: ...
    (microsoft.public.dotnet.framework.windowsforms)