設定用戶端通訊協定Configure Client Protocols

適用於: 是SQL Server 否Azure SQL Database 否Azure Synapse Analytics (SQL DW) 否平行處理資料倉儲 APPLIES TO: yesSQL Server noAzure SQL Database noAzure Synapse Analytics (SQL DW) noParallel Data Warehouse

此主題描述如何使用 SQL ServerSQL Server 組態管理員,在 SQL ServerSQL Server 中設定用戶端應用程式所使用的用戶端通訊協定。This topic describes how to configure client protocols used by client applications in SQL ServerSQL Server by using SQL ServerSQL Server Configuration Manager. Microsoft SQL ServerSQL Server 支援使用 TCP/IP 網路通訊協定和具名管道通訊協定來進行用戶端通訊。Microsoft SQL ServerSQL Server supports client communication with the TCP/IP network protocol and the named pipes protocol. 如果用戶端是連接到同一部電腦上的 Database EngineDatabase Engine 執行個體,也可以使用共用記憶體通訊協定。The shared memory protocol is also available if the client is connecting to an instance of the Database EngineDatabase Engine on the same computer. 選取通訊協定有三種常見的方法。There are three common methods of selecting the protocol.

使用 SQL Server 組態管理員Using SQL Server Configuration Manager

啟用或停用用戶端通訊協定To enable or disable a client protocol

  1. SQL ServerSQL Server 組態管理員中,展開 [SQL Server Native Client Configuration (SQL Server Native Client 組態)] ,並以滑鼠右鍵按一下 [用戶端通訊協定] ,然後按一下 [屬性] 。In SQL ServerSQL Server Configuration Manager, expand SQL Server Native Client Configuration, right-click Client Protocols, and then click Properties.

  2. [停用的通訊協定] 方塊中按一下某通訊協定,再按一下 [啟用] ,即可啟用通訊協定。Click a protocol in the Disabled Protocols box, and then click Enable, to enable a protocol.

  3. [啟用的通訊協定] 方塊中按一下某通訊協定,再按一下 [停用] ,即可停用通訊協定。Click a protocol in the Enabled Protocols box, and then click Disable, to disable a protocol.

變更用戶端電腦的預設通訊協定或通訊協定順序To change the default protocol or the protocol order for client computers

  1. SQL ServerSQL Server 組態管理員中,展開 [SQL Server Native Client Configuration (SQL Server Native Client 組態)] ,並以滑鼠右鍵按一下 [用戶端通訊協定] ,然後按一下 [屬性] 。In SQL ServerSQL Server Configuration Manager, expand SQL Server Native Client Configuration, right-click Client Protocols, and then click Properties.

  2. [啟用的通訊協定] 方塊中,按一下 [上移][下移] ,來變更要連接到 SQL ServerSQL Server時使用通訊協定的順序。In the Enabled Protocols box, click Move Up or Move Down, to change the order in which protocols are tried, when attempting to connect to SQL ServerSQL Server. [啟用的通訊協定] 方塊裡最上方的通訊協定,是預設通訊協定。The top protocol in the Enabled Protocols box is the default protocol.

    重要

    SQL ServerSQL Server 組態管理員」會為伺服器別名組態與預設用戶端網路程式庫建立登錄項目。SQL ServerSQL Server Configuration Manager creates registry entries for the server alias configurations and default client network library. 然而,應用程式並不會安裝 SQL ServerSQL Server 用戶端網路程式庫或網路通訊協定。However, the application does not install either the SQL ServerSQL Server client network libraries or the network protocols. SQL ServerSQL Server 用戶端網路程式庫是在安裝 SQL ServerSQL Server 時安裝;網路通訊協定是在安裝 Microsoft Windows 時安裝 (或透過 [控制台] 中的 [網路] 安裝)。The SQL ServerSQL Server client network libraries are installed during SQL ServerSQL Server Setup; the network protocols are installed as part of Microsoft Windows Setup (or through Networks in Control Panel). 某些特定網路通訊協定可能不會隨 Windows 安裝。A particular network protocol may not be available as part of Windows Setup. 如需有關安裝這些網路通訊協定的詳細資訊,請參閱供應商說明文件。For more information about installing these network protocols, see the vendor documentation.

設定用戶端使用 TCP/IPTo configure a client to use TCP/IP

  1. SQL ServerSQL Server 組態管理員中,展開 [SQL Server Native Client Configuration (SQL Server Native Client 組態)] ,並以滑鼠右鍵按一下 [用戶端通訊協定] ,然後按一下 [屬性] 。In SQL ServerSQL Server Configuration Manager, expand SQL Server Native Client Configuration, right-click Client Protocols, and then click Properties.

  2. 請在 [啟用的通訊協定] 方塊中,按一下向上箭號與向下箭號,以便在嘗試連接 SQL Server 時變更通訊協定的順序。In the Enabled Protocols box, click the up and down arrows to change the order in which protocols are tried, when attempting to connect to SQL Server. [啟用的通訊協定] 方塊裡最上方的通訊協定,是預設通訊協定。The top protocol in the Enabled Protocols box is the default protocol.

您可以勾選 [啟用共用記憶體通訊協定] 方塊來個別啟用共用記憶體通訊協定。The shared memory protocol is enabled separately by checking the Enabled Shared Memory Protocol box.

另請參閱See Also

設定遠端登入逾時伺服器組態選項Configure the remote login timeout Server Configuration Option