Bulk Load Files into SQL Azure?

僤鯓⒐⒋嵵緔 提交于 2019-11-27 17:36:02

问题


I have an ASP.NET app that takes multimegabyte file uploads, writes them to disk, and later MSSQL 2008 loads them with BCP.

I would like to move the whole thing to Azure, but since there are no "files" for BCP, can anyone comment on how to get bulk data from an Azure app into SQL Azure?

I did see http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopy.aspx but am not sure if that applies.

Thanks.


回答1:


BCP is one way to do it.

This post explains it in three easy steps: Bulk insert with Azure SQL




回答2:


You are on the right track. The Bulk Copy API will work. I am using it. And it's the fastest way to import data because it uses INSERT BULK statements. Not to get confused with the BULK INSERT statement which is not supported in SQL Azure. In essence, BCP and the SqlBulkCopy API use the same method.




回答3:


http://www.solidq.com/sqj/Pages/2011-May-Issue/Migrating-Data-into-Microsofts-Data-Platform-SQL-Azure.aspx for a detailed analysis of options available




回答4:


I think it's important to note that BCP cannot handle source files that are Unicode while using a format file to do your import.



来源:https://stackoverflow.com/questions/6352660/bulk-load-files-into-sql-azure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!