使用 SQL Azure 时出现 SQLBulkCopy 连接错误

发布于 2024-08-12 10:22:28 字数 480 浏览 3 评论 0原文

我们目前正在新的 SQL Azure CTP 上尝试 SQLBulkCopy API。

虽然我们已经能够一致地迁移大约一百万行的表,但在处理更大的表时,我们面临着连接错误。我们不断收到(随机行传输后)以下错误:

从服务器接收结果时发生传输级错误。 (提供程序:TCP 提供程序,错误:0 - 远程主机强制关闭现有连接。)

我了解 SQL Azure 连接策略(提到 此处)指出连接可能因多种原因而终止,并且还提到了返回的一些错误代码。但我无法理解哪些原因其中可能会导致错误或捕获错误代码。

有没有办法可以克服这个错误并继续表行的迁移?

使用的 SQLBulkCopy 选项有:
批量大小=1000
批量复制超时 = 5000

We are currently trying out the SQLBulkCopy API on the new SQL Azure CTP.

While we have been able to consistently migrate tables with about a million rows, we are facing connection errors when working with larger tables. We keep getting (after random row transfers) the following error:

A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

I understand that SQL Azure connection policies (mentioned here) state that the connection can be terminated for a number of reasons and it also mentions some error codes that are returned.But I am not able to understand which of these might be causing the error or capture the error code.

Is there a way we can get past this error and continue with the migration of table rows?

The SQLBulkCopy options used are:
BatchSize=1000
BulkCopyTimeout = 5000

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

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

发布评论

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

评论(1

一口甜 2024-08-19 10:22:28

知识库文章 977291 将此错误消息视为 Windows 2003 TCP/IP 问题的症状。

Knowledge Base article 977291 gives this error message as a symptom of a Windows 2003 TCP/IP issue.

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