在 SharePoint Server 中連線至遠端伺服器陣列上的服務應用程式Connect to service applications on remote farms in SharePoint Server

摘要: 了解如何針對 SharePoint Server 2016 和 SharePoint 2013 中已發佈的服務應用程式進行連線和使用。Summary: Learn how to connect to and consume a published service application in SharePoint Server 2016 and SharePoint 2013.

在 SharePoint Server 中,您可以發佈一些服務應用程式,讓使用者能夠透過遠端連線使用這些服務應用程式。發佈服務應用程式可以最佳化資源、避免冗餘,而且不需要安裝專用的企業伺服器陣列,就能在企業範圍內提供服務。In SharePoint Server, you can publish some service applications to make them available over remote connections. By publishing a service application, you can optimize resources and avoid redundancy, and provide enterprise-wide services without installing a dedicated enterprise services farm.

對於已由其他伺服器陣列共用的服務應用程式,如果您知道伺服器陣列的搜索服務位址,或服務應用程式的位址,就可以連線至服務應用程式。請注意,僅在遠端伺服器陣列之伺服器陣列管理員已發佈服務應用程式的情況下,您才能連線至遠端伺服器陣列上的服務應用程式。You can connect to a service application that has been shared by another farm if you know the address of the farm's discovery service or the address of the service application. Be aware that you can only connect to a service application on a remote farm if the farm administrator for the remote farm has published the service application.

在您開始作業之前,請檢閱<跨 SharePoint Server 伺服器陣列共用服務應用程式>,以取得必要條件的詳細資訊。Before you begin this operation, review Share service applications across farms in SharePoint Server for information about prerequisites.

使用 管理中心連線至遠端伺服器陣列上的服務應用程式To connect to a service application on a remote farm by using Central Administration

  1. 確認您是否為 SharePoint 伺服器陣列管理員群組的成員。Verify that you are a member of the Farm Administrators SharePoint group.

  2. 在使用伺服器陣列的伺服器上,按一下管理中心的 [應用程式管理]*,然後再按一下 [管理服務應用程式]On a server in the consuming farm, on Central Administration, click **Application Management, and then click **Manage service applications*.

  3. 在功能區上,按一下 [連線]*On the ribbon, click *Connect.

  4. 在 [連線]**** 下拉式功能表上,按一下您要連線至服務應用程式的類型。On the Connect drop-down menu, click the kind of service application to which you want to connect.

  5. 在 [遠端服務應用程式] 頁面上的 [伺服器陣列或服務應用程式的位址]**** 文字方塊中,輸入適當的 URL,然後按一下 [確定]*On the Connect to a Remote Service Application page, type the appropriate URL in the *Farm or Service Application address text box, and then click OK.

    注意

    您可以從發佈伺服器陣列管理員那邊取得 URL。如需詳細資訊,請參閱<在 SharePoint Server 中發佈服務應用程式>。本步驟中可以使用兩種 URL:服務應用程式的 URL 或遠端伺服器陣列拓撲服務應用程式的 URL。如果使用服務應用程式的 URL,則本程序的步驟 6 中將只列出對應的服務應用程式。如果使用拓撲服務的 URL,則本程序的步驟 6 中將列出伺服器陣列中所有服務應用程式。You can obtain the URL from the administrator of the publishing farm. For more information, see Publish service applications in SharePoint Server. There are two kinds of URLs that you can use in this step: either the URL of the service application or the URL of the remote farm's topology service application. If you use the URL of the service application, only the corresponding service application will be listed in Step 6 of this procedure. If you use the URL of the topology service, all service applications in the farm will be listed in Step 6 of this procedure.

  6. 新的 [連線至遠端服務應用程式]**** 對話方塊會顯示與您在步驟 5 中輸入 URL 相符的服務應用程式。按一下包含服務應用程式名稱的列,然後選取核取方塊,以將服務應用程式連線新增至伺服器陣列服務應用程式連線的預設清單 (也就是,預設 Proxy 群組) 中。按一下 [確定]*The new *Connect to a Remote Service Application dialog box displays the service applications that match the URL that you typed in Step 5. Click the row that contains the name of the service application, and then select the check box to add the service application connection to the farm’s default list of service application connections (that is, the default proxy group). Click OK.

  7. 系統將提示您變更連線名稱。請在 [連線名稱]**** 文字方塊中,輸入新的名稱或保留預設名稱,然後按一下 [確定]*You are prompted to change the connection name. Type a new name into the *Connection Name text box or leave the default name, and then click OK.

  8. 我們建議您使用<在 SharePoint Server 中交換伺服器陣列之間的信任憑證>中的指示,來建立兩個伺服器陣列之間的信任。We recommend that you use the instructions in Exchange trust certificates between farms in SharePoint Server to establish trust between the two farms.

  9. 建立新的連線後,必須按一下 [確定]**** 完成整個程序。After the new connection is created, you must click OK to complete the procedure.

  10. 建立新服務應用程式連線與本機 Web 應用程式的關聯。如需如何執行此作業的資訊,請參閱<從 SharePoint Server 的 Web 應用程式新增或移除服務應用程式連線>。Associate the new service application connection with a local Web application. For information about how to do this, see Add or remove service application connections from a web application in SharePoint Server.

使用 PowerShell 連線至遠端伺服器陣列上的服務應用程式To connect to a service application on a remote farm 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:

    Receive-SPServiceApplicationConnectionInfo -FarmUrl <PublishingFarmTopologyURL>
    

    其中:Where:

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

    New-SPServiceApplicationProxy -Name " <ServiceApplicationProxyName>" -Url "<PublishingFarmTopologyURL>"
    

    其中:Where:

    • <ServiceApplicationProxyName> 是使用伺服器陣列上服務應用程式連線的唯一名稱。<ServiceApplicationProxyName> is a unique name for a service application connection on the consuming farm.

    • <PublishingFarmTopologyURL> 是前面的命令中也有使用的服務應用程式拓撲 URL。<PublishingFarmTopologyURL> is the service application topology URL that was also used in the previous command.

      每種服務應用程式都有特定的 PowerShell Cmdlet,應使用此 Cmdlet,而不是 New-SPServiceApplicationProxy。(這些 Cmdlet 在本文的 [另請參閱] 區段中列出)。例如,下列命令將建立一個名為 "MetadataServiceProxy1" 的新 Managed Metadata Service 應用程式 Proxy,會連線至位於指定 URL 的服務應用程式。Each kind of service application has a specific PowerShell cmdlet that should be used instead of New-SPServiceApplicationProxy. (These cmdlets are listed in the See Also section.) For example, the following command creates a new Managed Metadata service application proxy named "MetadataServiceProxy1" that connects to the service application located at the stated URL.

    New-SPMetadataServiceApplicationProxy -Name "MetadataServiceProxy1" -Uri "
    urn:schemas-microsoft-com:sharepoint:service:9c1870b7ee97445888d9e846519cfa27#authority=urn:uuid:02a493b92a5547828e21386e28056cba&amp;authority=https://ua_powershell:32844/Topology/topology.svc  "
    
  5. 您必須建立新服務應用程式連線與本機 Web 應用程式的關聯。如需如何執行此作業的資訊,請參閱<從 SharePoint Server 的 Web 應用程式新增或移除服務應用程式連線>。You must associate the new service application connection with a local Web application. For information about how to do this, see Add or remove service application connections from a web application in SharePoint Server.

另請參閱See also

其他資源Other Resources

New-SPBusinessDataCatalogServiceApplicationProxyNew-SPBusinessDataCatalogServiceApplicationProxy

New-SPEnterpriseSearchServiceApplicationProxyNew-SPEnterpriseSearchServiceApplicationProxy

New-SPMetadataServiceApplicationProxyNew-SPMetadataServiceApplicationProxy

New-SPProfileServiceApplicationProxyNew-SPProfileServiceApplicationProxy

New-SPSecureStoreServiceApplicationProxyNew-SPSecureStoreServiceApplicationProxy