在 SharePoint Server 中設定 Business Data Connectivity Service 應用程式Configure a Business Data Connectivity service application in SharePoint Server

摘要:了解如何在 SharePoint Server 2013 和 SharePoint Server 2016 中建立 Microsoft Business Connectivity Services 服務應用程式。Summary: Learn how to create a Microsoft Business Connectivity Services service application in SharePoint Server 2013 and SharePoint Server 2016.

Microsoft Business Connectivity Services 為 SharePoint Server 服務應用程式。如果在伺服器陣列初始設定期間未建立該服務應用程式,則必須加以建立。Microsoft Business Connectivity Services is a SharePoint Server service application. You must create it if it was not created during your farms initial configuration.

設定 Business Connectivity Services 應用程式集區帳戶Configure the Business Connectivity Services application pool account

Business Connectivity Services 服務應用程式的應用程式集區需要一個 SharePoint Server 受管理帳戶 (通常為 Active Directory 帳戶) 才能執行。此帳戶必須可存取內容資料庫,而內容資料庫包含將使用 Business Connectivity Services 的網站。The application pool for the Business Connectivity Services service application requires a SharePoint Server managed account (generally an Active Directory account) to run. This account must have access to the content databases containing the sites where Business Connectivity Services will be used.

若使用同一個應用程式集區帳戶當作 Web 應用程式 (內容資料庫所在位置) 來執行服務應用程式,則會自動設定資料庫存取。但是,建議您使用不同帳戶來操作 Business Connectivity Services 應用程式集區,特別是在大型或複雜的伺服器陣列中。這樣更能掌控資料與資源存取。If you run the service application using the same application pool account as the web application where the content databases are located, this required database access is configured automatically. However, we recommend that you use a different account for the Business Connectivity Services application pool, especially in a large or complex farm. This allows for greater control over data and resource access.

若您選擇要用 Web 應用程式所使用的同一個受管理帳戶來使用Business Connectivity Services,您可略過本節步驟。若您選擇建立新受管理帳戶,您必須執行下列步驟:If you choose to use the same managed account for Business Connectivity Services as is being used for the web application, you can skip the procedures in this section. If you choose to create a new managed account, you must do the following:

  1. 在 SharePoint Server 註冊受管理帳戶 (您必須要有 Active Directory 使用者帳戶才能執行此步驟。請要求 Active Directory 管理員建立一個帳戶)。Register a managed account in SharePoint Server. (You will need an Active Directory user account for this step. Have your Active Directory administrator create it.)

  2. 授與此帳戶對包含將使用 Business Connectivity Services 之網站的內容資料庫存取權。此程序包含執行 SharePoint 2016 管理命令介面的 Microsoft PowerShell 指令碼。Grant access for this account to the content databases that contain the sites where Business Connectivity Services will be used. This process includes running a Microsoft PowerShell script from the SharePoint 2016 Management Shell.

第一步是註冊受管理帳戶。依照下列步驟註冊您要用於 Business Connectivity Services 應用程式集區的 Active Directory 帳戶。The first step is to register a managed account. Use the following procedure to register the Active Directory account that you want to use for the Business Connectivity Services application pool.

註冊受管理帳戶To register a managed account

  1. 在 SharePoint Server 管理中心網站中,按一下 [安全性]。In the SharePoint Server Central Administration Web site, click Security.

  2. 在 [一般安全性] 區段中,按一下 [設定受管理帳戶]。In the General Security section, click Configure managed accounts.

  3. 按一下 [註冊受管理帳戶]。Click Register Managed Account.

  4. 在 [服務帳戶認證] 區段中輸入使用者名稱與您要登錄的 Active Directory 帳戶的密碼。In the Service account credentials section, type the user name and password for the Active Directory account that you want to register.

  5. 或者,若將帳戶密碼設定為一段時間後失效,請設定自動密碼設定,讓 SharePoint Server 變更密碼。Optionally, if the account password is set to expire after a certain length of time, configure the automatic password change settings to have SharePoint Server change the password.

  6. 按一下 [ OK ]。Click OK.

註冊受管理帳戶後,您必須授與該帳戶對內容資料庫的存取權,而內容資料庫包含將使用 Business Connectivity Services 的網站。請使用下列程序授與帳戶的資料庫存取權。每個包含要使用 Business Connectivity Services 之內容資料庫的 Web 應用程式都請遵循此程序。Once you have registered the managed account, you must grant that account access to the content databases containing the sites where you'll use Business Connectivity Services. Use the following procedure to grant database access to the account. Follow this procedure for each web application that contains a content database where you plan to use Business Connectivity Services.

授與帳戶的內容資料庫存取權To grant content database access to an account

  1. 系統管理員身分開啟 [ SharePoint 2016 管理命令介面]。Open the SharePoint 2016 Management Shell as administrator.

  2. 在 Microsoft PowerShell 命令提示字元處輸入下列命令,然後在每一行之後按 Enter 鍵:At the Microsoft PowerShell command prompt, type the following, pressing Enter after each line:

    $w = Get-SPWebApplication -identity <web application>
    $w.GrantAccessToProcessIdentity("<service account>")
    

授與受管理帳戶的內容資料庫存取權後,下一步就是建立 Business Connectivity Services 服務應用程式。Once you have finished granting content database access to the managed account, the next step is to create a Business Connectivity Services service application.

建立 Business Data Connectivity Service 服務應用程式Create a Business Data Connectivity Services service application

如果您正在使用 SharePoint Server 2013,您必須在伺服器陣列中的至少一個伺服器上啟動 Business Data Connectivity 服務。(如果您正在使用 SharePoint Server 2016,MinRole 會自動處理服務佈建。)If you're using SharePoint Server 2013, you must start the Business Data Connectivity service on at least one server in your farm. (If you're using SharePoint Server 2016, service provisioning is handled automatically by MinRole.)

啟動 Business Data Connectivity 服務 (僅限 SharePoint Server 2013)Start the Business Data Connectivity service (SharePoint Server 2013 only)

  1. 針對包含您 BCS 解決方案的伺服器陣列開啟 SharePoint 管理中心網站。Open the SharePoint Central Administration website for the server farm that contains your BCS solution.

  2. 在 [快速啟動] 上按一下 [系統設定]。On the Quick Launch, click System Settings.

  3. 在 [系統設定] 頁面的 [伺服器] 之下按一下 [管理伺服器上的服務]。On the System Settings page, under Servers, click Manage services on server.

  4. 檢查 [伺服器] 欄位中的值。如果顯示不是您想要的伺服器的伺服器名稱上,執行Business Data Connectivity Service按一下向下箭號上,按一下 [變更伺服器] 並選取正確的伺服器。Check the value in the Server field. If the server name shown there is not the server that you want running the Business Data Connectivity Service on, click on the down arrow, click Change Server and select the correct server.

  5. 必要的話,按一下 Business Data Connectivity Service] 旁的 [動作] 欄中,按一下 [開始If necessary, next to Business Data Connectivity Service, under the Action column, click Start.

請使用下列程序建立 Business Connectivity Services 服務應用程式。Use the following procedure to create a Business Connectivity Services service application.

建立 Business Data Connectivity Service 服務應用程式To create a Business Data Connectivity Services service application

  1. 使用伺服器陣列管理員帳戶開啟 SharePoint 管理中心網站。Open the SharePoint Central Administration website for with a farm administrator account.

  2. 應用程式管理] 下選擇 [管理服務應用程式]。Under Application Management, choose Manage service applications.

  3. 按一下 [新增],然後按一下 [ Business Data Connectivity ServiceClick New and then click Business Data Connectivity Service.

  4. 設定 [建立新 Business Data Connectivity Service 應用程式設定] 頁面中,如下所示:Configure the setting in the Create New Business Data Connectivity Service Application configuration page as follows:

  5. 在 [服務應用程式名稱] 方塊中輸入服務應用程式的名稱。In the Service Application Name box type a name for the service application.

  6. 在 [資料庫] 區域中,保留預先填入的值的資料庫伺服器資料庫名稱資料庫驗證],除非有特定設計需求是Windows 驗證 (建議使用)將它們變更。In the Database area, leave the prepopulated values for Database Server, Database Name, and Database authentication, which is Windows authentication (recommended) unless you have specific design needs to change them.

  7. 如果您已設定 SQL Server 資料庫鏡像且您想要包含 Business Data Connectivity Service 資料庫鏡像,提供容錯移轉資料庫伺服器] 方塊中的容錯移轉資料庫伺服器名稱。If you have SQL Server database mirroring configured and you want to include the Business Data Connectivity Service database in mirroring, provide the name of the failover database server in the Failover Database Server box.

  8. 在 [應用程式集區名稱] 方塊中輸入新的應用程式集區的名稱。Type a name for a new application pool in the Application pool name box.

  9. 從下拉式清單中選取您註冊的受管理帳戶。Select the managed account that you registered from the drop down list.

  10. 按一下[確定]建立新 Business Data Connectivity Service 應用程式並按一下 [確定]。Click OK to create the new Business Data Connectivity Service Application and click OK again.

  11. 選取 [ Business Data Connectivity Service 應用程式是在不是 proxy 列的列。Select the row that the Business Data Connectivity Service Application is in, not the proxy row.

  12. 按一下 [作業] 區域中的系統管理員並新增任何您想要能夠管理可完全控制權授與他們 [Business Data Connectivity service 應用程式的帳戶。當這些人員開啟管理中心他們將能夠管理 Business Data Connectivity service 應用程式。Click Administrators in the Operations area and add any accounts that you want to be able to administer the Business Data Connectivity service application granting them full control. When these individuals open Central Administration they will be able to administer the Business Data Connectivity service application.