View a markdown version of this page

解決將 Microsoft SQL Server 遷移至 AWS 雲端後的連線錯誤 - AWS 方案指引

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

解決將 Microsoft SQL Server 遷移至 AWS 雲端後的連線錯誤

Premkumar Chelladurai,Amazon Web Services

總結

將 Windows Server 2008 R2、2012 或 2012 R2 上執行的 Microsoft SQL Server 遷移至 Amazon Web Services (AWS) Cloud 上的 Amazon Elastic Compute Cloud (Amazon EC2) 執行個體後,SQL Server 的連線會失敗,並出現下列錯誤: 

  • [Microsoft][ODBC SQL Server Driver][DBNETLIB] General Network error

  • ERROR [08S01] [Microsoft][SQL Native Client]Communication link failure. System.Data.SqlClient.SqlException: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

  • TCP Provider: The semaphore timeout period has expired

此模式說明如何透過在作業系統 (OS) 和在 Windows Server 2008 R2、2012 或 2012 R2 上執行的 SQL Server 網路介面層級關閉 Windows Scalable Networking Pack (SNP) 功能來解決這些錯誤R2。

先決條件和限制

先決條件

  • Windows Server 的管理員權限。

  • 如果您使用 AWS Application Migration Service 做為遷移工具,則需要下列其中一個 Windows Server 版本:

    • Windows Server 2008 R2 Service Pack 1、2012 或 2012 R2

  • 如果您使用 CloudEndure Migration 做為遷移工具,則需要下列其中一個 Windows Server 版本:

    • Windows Server 2003 R2 Service Pack 3、2008、2008 R2 Service Pack 1、2012 或 2012 R2

工具

  • Amazon EC2 – Amazon Elastic Compute Cloud (Amazon EC2) 在 AWS 雲端中提供可擴展的運算容量。您可以使用 Amazon EC2 視需要啟動任意數量或任意數量的虛擬伺服器,也可以向外擴展或向內擴展。 

  • Windows Server – Windows Server 是建置連線應用程式、網路和 Web 服務基礎設施的平台。

史詩

任務Description所需的技能

在作業系統層級關閉 SNP 功能。

  1. 登入 Windows Server 並以管理員身分開啟命令提示。

  2. 執行 netsh int tcp show global 命令。

  3. 在輸出中,檢查 Receive-Side Scaling或 Chimney Offload 是否處於 enabled 模式。如果其中一個是 enabled,請執行下列命令:

    • netsh int tcp set global chimney=disabled

    • netsh int tcp set global rss=disabled

AWS 管理員、AWS 系統管理員、遷移工程師、雲端管理員

在彈性網路介面層級關閉 SNP 功能。

  1. 選擇開始,輸入 ncpa.cpl,然後按 Enter。 

  2. 在彈性網路轉接器上按一下滑鼠右鍵。

  3. 在快顯功能表中,選擇屬性。

  4. 在乙太網路轉接器屬性視窗中,選擇設定。

  5. 在 Amazon Elastic Network Adapter Properties 快顯視窗中,選擇進階索引標籤。

  6. 在屬性區段中,關閉所有卸載和 RSS。

AWS 管理員、雲端管理員、AWS 系統管理員

相關資源