Dot-Net

SqlBulkCopy 超時

  • December 26, 2010

我正在使用 SqlBulkCopy 從 xml 備份中恢復表。其中一個表備份大約 200MB 大並且有很多記錄。

我有錯誤:

Timeout expired.
The timeout period elapsed prior to completion of the operation or the server
is not responding.

您可能需要增加超時時間。sqlBulkCopy.BulkCopyTimeout嘗試從預設值 30 秒增加 的值。

引用自:https://stackoverflow.com/questions/4535536