none
Bulk insert RRS feed

Answers

  • SQL Azure doesn't have BulkAdmin Roles. The following are 2 roles available

    1. loginmanager

    2. dbmanager

    FYI, BULK INSERT T-SQL Statement is not supported in SQL Azure

    You can use BCP to load data, for that the user who connects needs to have write permissions on the database or tables, you can add that user to "db_datawriter" database role in that specific database


    Arunraj Chandrasekaran, MCTS, Author: SQLXpertise.com
    If you found this post useful, Please "Mark as Answer" or "Vote as Helpful"
    Monday, July 18, 2011 12:34 PM

All replies

  • You should be able to do it using the Sql Server Management Studio 2008 R2 (there's a free express version). otherwise, executing the appropriate t-sql command using the SA user should accomplish it as well.

    Friday, July 15, 2011 1:36 PM
    Moderator
  • i tried executing on the master database,:

    EXEC sp_addsrvrolemember 'myuser', 'bulkadmin'

    it cant find the procedure...


    i got the sql from here:

    http://msdn.microsoft.com/en-us/library/ms186320.aspx

     

    Sunday, July 17, 2011 4:07 PM
  • when i try: EXEC sp_addrolemember 'bulkadmin', 'myuser'

    it says that the role does not exist in the db...

    do i need to create the bulkadmin role my self too?

    Sunday, July 17, 2011 4:09 PM
  • SQL Azure doesn't have BulkAdmin Roles. The following are 2 roles available

    1. loginmanager

    2. dbmanager

    FYI, BULK INSERT T-SQL Statement is not supported in SQL Azure

    You can use BCP to load data, for that the user who connects needs to have write permissions on the database or tables, you can add that user to "db_datawriter" database role in that specific database


    Arunraj Chandrasekaran, MCTS, Author: SQLXpertise.com
    If you found this post useful, Please "Mark as Answer" or "Vote as Helpful"
    Monday, July 18, 2011 12:34 PM
  • And Arunraj, I was confusing bulk insert with BCP. :P
    Monday, July 18, 2011 1:35 PM
    Moderator
  • To clarify one point, BULK INSERT is not supported in SQL Azure, but INSERT BULK is... INSERT BULK is what BCP is using. If you want programmatic access to loading data in bulk, look at the SqlBulkCopy API. There are many samples on the Internet; here is the MSDN page on how to use the API: http://msdn.microsoft.com/en-us/library/30c3y597(VS.85)

    The INSERT BULK statement must be used programmatically because data is inserted as a direct binary feed into SQL Server and SQL Azure. It does not require any special security access other than enough rights to INSERT records into a table.

     


    Herve Roggero, MVP SQL Azure Co-Author: Pro SQL Azure http://www.herveroggero.com
    Tuesday, July 19, 2011 10:46 PM
    Moderator