使用 SQL Azure 时出现 SQLBulkCopy 连接错误
我们目前正在新的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
知识库文章 977291 将此错误消息视为 Windows 2003 TCP/IP 问题的症状。
Knowledge Base article 977291 gives this error message as a symptom of a Windows 2003 TCP/IP issue.