问题
Can I use sqlbulkcopy with Azure SQL Paas?
I have an app that does bulk copy to a database and we are testing it with SQL PaaS. It appears to be failing on the SQLBulkCopy.
I thought I read this is not supported somewhere but do not see it in the Azure SQL documentation. Is this still a limitation? Where is that documented?
I am using .net code to do the bulk copy (not SSIS or any other tool), it is a .net app, if it matters.
回答1:
Short answer is, yes, you can use SQLBulkCopy to insert data from your .net app to SQL Azure.
However, if you have too much record you might face SQL Azure throttling issue.
Now, In case of CPU throttling SQL Database will not throw an error but will slowdown the operation and you will probably just get a timeout error. At this time there is no mechanism to determine whether this form of throttling is happening other than possibly looking at the query stats telling that the work is taking place slowly.
And if it is non-CPU throttling, then you will get an exception about it.
Also, if I recall correctly, there is a limitation for inserting bulk data into temp tables in SQL Azure, but it works for normal tables.
来源:https://stackoverflow.com/questions/42706540/can-i-use-sqlbulkcopy-with-azure-sql-paas