将文件批量加载到 SQL Azure 中?

发布于 2024-11-15 06:06:48 字数 383 浏览 9 评论 0原文

我有一个 ASP.NET 应用程序,它需要上传数兆字节的文件,将它们写入磁盘,然后 MSSQL 2008 使用 BCP 加载它们。

我想将整个内容移至 Azure,但由于 BCP 没有“文件”,任何人都可以评论如何将批量数据从 Azure 应用程序获取到 SQL Azure 吗?

我确实看到了 http://msdn.microsoft.com/ en-us/library/system.data.sqlclient.sqlbulkcopy.aspx 但不确定这是否适用。

谢谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

隔岸观火 2024-11-22 06:06:48

BCP 是实现这一目标的一种方法。

这篇文章通过三个简单的步骤进行了解释:
使用 Azure SQL 批量插入

BCP is one way to do it.

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

把梦留给海 2024-11-22 06:06:48

你走在正确的轨道上。批量复制 API 将起作用。我正在使用它。这是导入数据最快的方法,因为它使用 INSERT BULK 语句。不要与 SQL Azure 中不支持的 BULK INSERT 语句混淆。本质上,BCP 和 SqlBulkCopy API 使用相同的方法。

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.

吃不饱 2024-11-22 06:06:48

我认为值得注意的是,在使用格式文件进行导入时,BCP 无法处理 Unicode 源文件。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文