從 SharePoint Server 的 Web 應用程式新增或移除服務應用程式連線Add or remove service application connections from a web application in SharePoint Server

摘要: 了解如何在 SharePoint Server 2016 和 SharePoint 2013 中新增或移除服務應用程式連線群組的服務應用程式連線。Summary: Learn how to add or remove service application connections to a service application connection group in SharePoint Server 2016 and SharePoint 2013.

在 SharePoint Server 中建立服務應用程式時,會建立「服務應用程式連線」。服務應用程式連線也稱為「應用程式 Proxy」。服務應用程式連線透過「服務應用程式連線群組」 (也稱為「應用程式 Proxy 群組」) 中的成員資格,建立服務應用程式與 Web 應用程式的關聯。When you create a service application in SharePoint Server, a service application connection is created. A service application connection is also referred to as an application proxy. A service application connection associates the service application to web applications via membership in a service application connection group (also referred to as application proxy group).

重要

如果要建立指向遠端伺服器陣列中服務應用程式的服務應用程式連線,您應該閱讀<跨 SharePoint Server 伺服器陣列共用服務應用程式>,以全面了解跨伺服器陣列成功共用服務應用程式的需求。If you are creating a service application connection to a service application in a remote farm, you should read Share service applications across farms in SharePoint Server to gain a full understanding of the requirements to successfully share service applications across farms.

根據預設,使用管理中心建立服務應用程式時,新的服務應用程式連線會新增至服務應用程式連線之伺服器陣列的「預設」群組中。您可以覆寫此預設成員資格。若使用 Microsoft PowerShell 而不是使用管理中心建立新服務應用程式,除非提供 default 參數,否則新服務應用程式不會自動成為「預設」服務應用程式連線群組的成員。By default, a new service application connection is added to the farm's Default group of service application connections when you create the service application by using Central Administration. You can override this default membership. If a new service application is created by using Microsoft PowerShell instead of by using Central Administration, the new service application does not automatically become a member of the Default service application connections group unless the default parameter is supplied.

注意

如需如何建立及設定服務應用程式的詳細資訊,請參閱<在 SharePoint Server 中管理服務應用程式>。For more information about how to create and configure service applications, see Manage service applications in SharePoint Server.

根據預設,所有 Web 應用程式都與服務應用程式連線之伺服器陣列的「預設」群組相關聯,但您可以變更此設定。還可以為伺服器陣列中的每個 Web 應用程式建立一個自訂連線群組。您可以隨時變更與 Web 應用程式相關聯的服務應用程式,還可以變更包含在「預設」服務應用程式連線群組中的服務應用程式。By default, all web applications are associated with the farm's Default group of service application connections, although you can change this setting. You can also create one custom connection group for each web application in the farm. You can change the service applications with which a web application is associated at any time, and you can change the service applications that are included in the Default service application connection group.

編輯服務連線群組Editing a service connection group

您可以使用 管理中心,或使用 PowerShell Cmdlet,在服務應用程式連線群組中新增或移除服務應用程式連線。You can add or remove service application connections to a service application connection group by using Central Administration or by using PowerShell cmdlets.

使用管理中心編輯服務連線群組To edit a service connection group by using Central Administration

  1. 確認執行此程序的使用者帳戶為 SharePoint 伺服器陣列管理員群組的成員。Verify that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group.

  2. 啟動管理中心。Start Central Administration.

  3. 在管理中心首頁上,按一下 [應用程式管理]*On the Central Administration Home page, click *Application Management.

  4. 在 [應用程式管理] 頁面上,按一下 [服務應用程式] 區段中的 [設定服務應用程式關聯]。On the Application Management page, in the Service Applications section, click Configure service application associations.

  5. 在 [服務應用程式關聯] 頁面上,選取 [檢視] 下拉式功能表中的 [Web 應用程式]。On the Service Application Associations page, select Web Applications from the View drop-down menu.

  6. 在 Web 應用程式的清單中的 [應用程式 Proxy 群組] 欄中,按一下您要變更的服務應用程式連線群組名稱。In the list of Web applications, in the Application Proxy Group column, click the name of the service application connection group that you want to change.

  7. 若要在群組中新增服務連線,請選取您要新增至連線群組之服務應用程式旁的核取方塊。若要移除連線群組中的服務應用程式連線,請清除您要從連線群組中移除之服務應用程式旁的核取方塊。進行所需的變更後,按一下 [確定]。To add a service connection to the group, select the check box that is next to the service application that you want to add to the connection group. To remove a service application connection from the connection group, clear the check box next to the service application that you want to remove from the connection group. When you have made the changes that you want, click OK.

    注意

    您還可以變更自訂的服務應用程式連線群組,方法是在管理中心首頁中按一下 [管理 Web 應用程式],選取列出的 Web 應用程式,然後按一下功能區上的 [服務連線]。不過,無法透過此頁面變更預設的服務應用程式連線群組。You can also change custom service application connection groups by clicking Manage Web Applications from the Central Administration Home page, selecting a listed Web application, and then clicking Service Connections on the ribbon. You cannot change the default service applications connection group through this page, however.

使用 PowerShell 新增服務應用程式連線至服務應用程式連線群組To add a service application connection to a service application connection group by using PowerShell

  1. 確認您具備下列成員身分:Verify that you have the following memberships:

    • SQL Server 執行個體上的 securityadmin 固定伺服器角色。securityadmin fixed server role on the SQL Server instance.

    • 所有要更新之資料庫上的 db_owner 固定資料庫角色。db_owner fixed database role on all databases that are to be updated.

    • 正在執行 PowerShell Cmdlet 之所在伺服器上的系統管理員群組。Administrators group on the server on which you are running the PowerShell cmdlets.

      系統管理員可以使用 Add-SPShellAdmin Cmdlet 授與使用 SharePoint Server Cmdlet 的權限。An administrator can use the Add-SPShellAdmin cmdlet to grant permissions to use SharePoint Server cmdlets.

      注意

      如果您不具備上述權限,請連絡安裝程式系統管理員或 SQL Server 系統管理員要求權限。如需 PowerShell 權限的其他資訊,請參閱 Add-SPShellAdminIf you do not have permissions, contact your Setup administrator or SQL Server administrator to request permissions. For additional information about PowerShell permissions, see Add-SPShellAdmin.

  2. 啟動 SharePoint 管理命令介面。Start the SharePoint Management Shell.

  3. 在 PowerShell 命令提示字元中,輸入下列命令:At the PowerShell command prompt, type the following command:

    Add-SPServiceApplicationProxyGroupMember -Identity < the service application proxy group > -Member <members to add to the service application proxy group>
    

    如需詳細資訊,請參閱<Add-SPServiceApplicationProxyGroupMember>。For more information, see Add-SPServiceApplicationProxyGroupMember.

使用 PowerShell 移除服務應用程式連線群組中的服務應用程式連線To remove a service application connection from a service application connection group by using PowerShell

  1. 確認您具備下列成員身分:Verify that you have the following memberships:

    • SQL Server 執行個體上的 securityadmin 固定伺服器角色。securityadmin fixed server role on the SQL Server instance.

    • 所有要更新之資料庫上的 db_owner 固定資料庫角色。db_owner fixed database role on all databases that are to be updated.

    • 正在執行 PowerShell Cmdlet 之所在伺服器上的系統管理員群組。Administrators group on the server on which you are running the PowerShell cmdlets.

    • 請以高於上述基本要求新增必要的成員資格。Add memberships that are required beyond the minimums above.

      系統管理員可以使用 Add-SPShellAdmin Cmdlet 授與使用 SharePoint Server Cmdlet 的權限。An administrator can use the Add-SPShellAdmin cmdlet to grant permissions to use SharePoint Server cmdlets.

      注意

      如果您不具備上述權限,請連絡安裝程式系統管理員或 SQL Server 系統管理員要求權限。如需 PowerShell 權限的其他資訊,請參閱 Add-SPShellAdminIf you do not have permissions, contact your Setup administrator or SQL Server administrator to request permissions. For additional information about PowerShell permissions, see Add-SPShellAdmin.

  2. 啟動 SharePoint 管理命令介面。Start the SharePoint Management Shell.

  3. 在 PowerShell 命令提示字元中,輸入下列命令:At the PowerShell command prompt, type the following command:

    Remove-SPServiceApplicationProxyGroupMember -Identity <SPServiceApplicationProxyGroupPipeBind> -Member <SPServiceApplicationProxyPipeBind >
    

    如需詳細資訊,請參閱<Remove-SPServiceApplicationProxyGroupMember>。For more information, see Remove-SPServiceApplicationProxyGroupMember.

另請參閱See also

概念Concepts

跨 SharePoint Server 伺服器陣列共用服務應用程式Share service applications across farms in SharePoint Server