部署 SharePoint Server 中的 Business Connectivity Services 內部部署解決方案Deploy a Business Connectivity Services on-premises solution in SharePoint Server

摘要:如何安裝 Business Connectivity Services (BCS) 以存取內部部署的 SQL Server 外部資料來源,在 SharePoint Server 與 SharePoint Foundation 清單中的呈現外部資料以及在 Outlook 中離線外部資料。Summary: How to install Business Connectivity Services (BCS) to access an on-premises SQL Server external data source, surface external data in SharePoint Server and SharePoint Foundation lists, and take external data offline in Outlook.

下列案例將示範如何使用 SQL Server AdventureWorks 範例資料庫建立無程式碼商務解決方案中 Microsoft Business Connectivity Services (BCS)。您了解如何:The following scenario shows you how to create a no-code business solution in Microsoft Business Connectivity Services (BCS) by using the SQL Server AdventureWorks sample database. You learn how to:

  • 設定帳戶及用以保護外部資料存取安全的群組。Configure the accounts, and groups that you need to securely access the external data source.

  • 設定外部資料來源、外部內容類型及外部清單的權限。Configure the permission on the external data source, the external content type and the external lists.

  • 建立及設定外部內容類型。Create and configure an external content type.

  • 建立可將外部資料提供給使用者的外部清單。Create an external list that makes the external data available to users.

  • 將外部清單連線至提供外部資料離線使用者時的 Microsoft Outlook。Connect the external list to Microsoft Outlook to make the external data available when the user is offline.

這些程序的功能What these procedures help you deploy

Business Connectivity Services 為 SharePoint Server 與 Office 應用程式可讓您將無法在 SharePoint Server 中的資料整合及 Office SharePoint Server 及 Office 集中式基礎結構。BCS 實作讓許多不同的表單,包括內部表單。這些程序顯示如何安裝及設定 BCS 到 SharePoint Server 的外部清單與 outlook 整合的內部 SQL 資料來源的資料。基於建置取出此案例中,我們使用 AdventureWorks 範例 SQL 資料庫。解決方案看起來如下圖所示。Business Connectivity Services is a centralized infrastructure in SharePoint Server and Office that enables you to integrate data that is not in SharePoint Server and Office into SharePoint Server and Office. BCS implementations take many different forms, including the on-premises form. These procedures show you how to install and configure BCS to integrate data from an on-premises SQL data source into a SharePoint Server external list and into Outlook. For the purposes of building out this scenario, we use the AdventureWorks sample SQL database. The solution looks as shown in the following diagram.

圖: 內部部署 BCS 解決方案Figure: On-premises BCS solution

結構化的內部部署 BCS 解決方案。顯示

  1. 使用者會前往 SharePoint 網站上的外部清單。外部清單使用使用者的 Windows 認證建立要求的資料。A user goes to an external list on a SharePoint site. The external list creates a request for data by using the user's Windows credentials.

  2. 要求傳送至 SharePoint 伺服器陣列的 BDC 執行階段。The request is sent to the BDC runtime in the SharePoint farm.

  3. BDC 執行階段存取清單中 (在 BDC 中繼資料存放區) 的外部內容類型來查看如何存取之外部系統和可以執行哪些作業。使用使用者的認證的 Secure Store (如外部內容類型中定義)、 BDC 執行階段將要求傳送至連接器可以處理要求,在此例中的 SQL 連接器。The BDC runtime accesses the external content type for the list (in the BDC Metadata Store) to see how to access the external system and which operations can be performed. By using either the user's credentials or the credentials from the Secure Store (as defined in the external content type), the BDC runtime passes the request to a connector that can handle the request, in this case the SQL connector.

  4. SQL 連接器存取外部資料來源並擷取資料,然後套用外部內容類型中所指定的格式與篩選。資料透過要求鏈傳回使用者可以進行互動的清單。The SQL connector accesses the external data source and retrieves the data, and applies any formatting and filtering as specified in the external content type. The data is passed back through the request chain to the list where the user can interact with it.

  5. 使用者想要讓使用者可以使用外部清單連線至 Outlook功能使資料離線攜帶型電腦在 Outlook 中採取此資料。The user wants to take this data on a portable computer in Outlook so the user can use the Connect to Outlook feature on the external list to take the data offline.

  6. Click Once 安裝隨即執行,在用戶端上安裝所需的 BDC 模型,以便於 BDC 用戶端執行階段可以直接存取外部資料。The Click Once installation runs and installs the required BDC model on the client. This lets the BDC Client-Side Runtime access the external data directly.

  7. Outlook 接著使用 BDC 模型中的設定連線至外部資料及同步處理至 Outlook SharePoint 外部清單,格式化為連絡人清單。Outlook then connects to the external data by using the configuration in the BDC model and synchronizes it into an Outlook SharePoint external list, formatted as a contacts list.

  8. 然後,使用者可以與連絡人資料互動,且使用者所做的任何變更會隨時受命進行同步處理,或等候六小時再自動同步處理,以寫回外部資料來源。The user can then interact with the contact data, and any changes that the user makes can be written back to the external data source either by an on-demand synch or by waiting six hours for the automated synchronization.

部署方案Deploy the solution

下列所示完全部署此案例中的步驟。某些程序的其他文章。在需要時提供的連結。The steps to completely deploy this scenario are presented below. Some of the procedures are in other articles. Links are provided where needed.

在您開始安裝內部部署 Microsoft Business Connectivity Services (BCS) 案例前,您必須具備這些軟體和基礎結構需求備妥。Before you start your installation of the on-premises Microsoft Business Connectivity Services (BCS) scenario, you must have these software and infrastructure requirements in place.

  • 功能完整的 SharePoint Server 伺服器陣列與 Web 應用程式和網站集合A fully functional SharePoint Server server farm with a Web Application and site collection

  • Business Data Connectivity Services 服務應用程式的正確設定A properly configured Business Data Connectivity Services service application

  • 運作完全正常的執行個體的 SQL Server 2008 Service Pack 1 (SP1) 與累計更新 2 或 SQL Server 2008 R2A fully functioning instance of SQL Server 2008 with Service Pack 1 (SP1) and Cumulative Update 2 or SQL Server 2008 R2

  • SharePoint Designer 2013SharePoint Designer 2013

  • Outlook 2016 用戶端Outlook 2016 client

  • 您已具備管理Business Data Connectivity Service 應用程式權限的帳戶You have an account that has permissions to administer the Business Data Connectivity Service Application

  • 您已有管理 Secure Store Service 服務應用程式的權限的帳戶You have an account that has permissions to administer the Secure Store Service service application

  • 下載AdventureWorks 範例資料庫從 Codeplex 下載 SQL Server。此資料庫必須已安裝和 SQL Server 上運作Download the AdventureWorks sample database from Codeplex downloads for SQL Server. This database must be installed and functioning on your SQL Server

  • 建立 Active Directory 目錄服務 (AD DS) 安全性群組,然後加入會使用此 BCS 解決方案的使用者。例如,建立名稱為 AdventureWorksBCSUsers 的群組。Create an Active Directory directory Service (AD DS) security group and add the users who will be using this BCS solution, for example create a group that is named AdventureWorksBCSUsers

    AdventureWorks 資料範例AdventureWorks sample data

AdventureWorks 範例資料庫是和已開發 Microsoft 發佈。AdventureWorks 範例資料庫會預先填入的虛構公司 AdventureWorks Cycles 虛構資料的大型數量。我們使用 AdventureWorks 範例資料庫以下因此我們必須具體範例說明安裝及設定內部部署 BCS 案例。The AdventureWorks sample database is developed and published by Microsoft. The AdventureWorks sample database is prepopulated with a large quantity of fictitious data from a fictitious company, AdventureWorks Cycles. We are using the AdventureWorks sample database here so we have a concrete example for illustrating the installation and configuration of the on-premises BCS scenario.

如何下載並安裝 AdventureWorks 範例資料庫How to download and install the AdventureWorks sample database

  1. 在瀏覽器中移至AdventureWorks 範例資料庫並下載 AdventureWorks2008R2_Data.mdf 檔案。From a browser, go to AdventureWorks sample database and download the AdventureWorks2008R2_Data.mdf file.

  2. 遵循SQL Server 範例讀我檔案 (EN-US)頁面的 ["讀我檔案的 AdventureWorks 2008 R2 範例資料庫"] 區段中的程序安裝 Adventure Works2008R2 範例資料庫。Install the Adventure Works2008R2 sample database by following the procedures in the "Readme for AdventureWorks 2008 R2 Sample Database" section of the SQL Server Samples Readme (en-US) page.

建立資料庫登入Create database logins

Microsoft Business Connectivity Services (BCS) 需要它可用來存取外部資料來源的帳戶。帳戶必須要執行您 BCS 解決方案可能需要的所有作業的外部資料來源的必要權限。為了簡化設定和持續管理,您可以將 SharePoint Server 使用者群組對應至外部資料來源上的單一共用帳戶。Microsoft Business Connectivity Services (BCS) requires an account that it can use to access the external data source. The account must have the necessary permissions on the external data source to perform all the operations that your BCS solution might require. For ease of configuration and ongoing management, you can map a group of SharePoint Server users to a single shared account on the external data source.

在此程序,您可以建立的 SQL Server 登入,然後 AdventureWorks 範例資料庫上的使用者帳戶指派的登入。您將使用 Secure Store Service 服務可以將 SharePoint Server 使用者群組對應到後續的程序中的單一共用帳戶。In this procedure, you create a SQL Server login and then assign that login to a user account on the AdventureWorks sample database. You will use Secure Store Service services to map a group of SharePoint Server users to the single shared account in a later procedure.

建立 SQL Server 登入Create a SQL Server login

  1. 啟動 SQL Server Management Studio。Start SQL Server Management Studio.

  2. 物件總管] 中展開 [ 、 展開安全性],然後展開 [登入In the Object Explorer, expand the , expand Security, and then expand Logins.

  3. 以滑鼠右鍵按一下 [登入,並再按一下 [新增登入Right-click Logins, and then click New Login

  4. 在 [登入名稱] 方塊中輸入 SharePointGroupAccount。In the Login Name box, enter SharePointGroupAccount.

  5. 選取 [ SQL Server 驗證,然後輸入並確認密碼。Select SQL Server authentication, and then enter and confirm a password.

  6. 在 [預設資料庫] 方塊中,選取AdventureWorks2008R2,並再按一下 [確定]In the Default database box, select AdventureWorks2008R2, and then click OK.

    在 AdventureWorks 資料庫上建立 SQL Server 的使用者Create a SQL Server user on the AdventureWorks database

  7. 物件總管] 中展開 [資料庫]、 adventureworks2008r2、 展開 [安全性],然後展開使用者In the Object Explorer, expand Databases, expand AdventureWorks2008R2, expand Security, and then expand Users.

  8. 以滑鼠右鍵按一下 [使用者],並再按一下 [新增使用者Right-click Users, and then click New User.

  9. 登入名稱],使用者名稱] 方塊中預先選取 [第一個] 方塊中輸入 AdventureWorksUserUnder the Login Name, with the User name box pre-selected, in the first box, enter AdventureWorksUser

  10. 在第二個方塊中,按一下 [選取登入] 對話方塊中的 [瀏覽、、 按一下 [瀏覽、 選取 SQL Server 帳戶SharePointGroupAccount,然後按兩次[確定]In the second box, click Browse, in the Select Login dialog box, click Browse, select the SQL Server account, SharePointGroupAccount, and then click OK twice.

  11. 在 [資料庫角色成員資格] 下選取 [ db_owner]。Under Database Role membership, select db_owner.

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

  13. 關閉 SQL Server Management Studio。Close SQL Server Management Studio.

設定 BCS 中繼資料存放區的權限Set permissions on the BCS Metadata Store

BCS 中繼資料存放區會保留外部內容類型、外部系統,以及適用於 BCS 服務應用程式的 BDC 模型定義。在此程序中,您會在中繼資料存放區上設定管理權限,以及它將包含的所有內容。The BCS Metadata Store holds external content types, external systems and BDC model definitions for the BCS Service Application. In this procedure you configure administrative permissions on the Metadata Store and everything that it will contain.

Business Connectivity Services 中繼資料存放區上設定權限Set permissions on the Business Connectivity Services Metadata Store

  1. 開啟 SharePoint 管理中心網站與伺服器陣列管理員帳戶或已管理 Business Data Connectivity Service 應用程式的委派權限的帳戶。Open the SharePoint Central Administration website with either a Farm administrator account or an account that has been delegated permissions to administer the Business Data Connectivity Service Applications.

  2. 在 [快速啟動] 上按一下 [應用程式管理]。On the Quick Launch, click Application Management.

  3. 在 [應用程式管理] 頁面的 [服務應用程式,按一下 [管理服務應用程式]。On the Application Management page, under Service Applications, click Manage service applications.

  4. 在服務清單中,選取您在設定 SharePoint Server 中的 Business Data Connectivity service 應用程式中建立Business Data Connectivity Service 應用程式的列和再按一下 [管理然後設定中繼資料儲存區權限In the list of services, select the row of the Business Data Connectivity Service Application that you created in Configure a Business Data Connectivity service application in SharePoint Server and then click Manage and then Set Metadata Store Permissions.

  5. 如果您有的話,然後按一下 [新增輸入伺服器陣列管理員帳戶和任何其他委派管理員。Enter the Farm Administrator account and any other delegate administrators if you have them and then click Add.

  6. 每個帳戶或群組,也就是您新增的 Business Data Connectivity Service Application 管理員選取 [編輯Execute可在用戶端,並設定權限] 核取方塊。For each account or group that you added that is an administrator of the Business Data Connectivity Service Application, select the Edit, Execute, Selectable In Clients, and Set Permissions checkboxes.

  7. BDC 中繼資料存放區中選取權限傳播至所有 BDC 模型、 外部系統和外部內容類型。這樣會覆寫現有的權限] 核取方塊。如需詳細的 BDC 中繼資料存放區上設定權限的詳細資訊,請參閱 < Overview of Business Connectivity Services in SharePoint Server 的安全性工作Select the Propagate permissions to all BDC Models, External Systems and External Content Types in the BDC Metadata Store. Doing so will overwrite existing permissions checkbox. For more information on setting permissions on the BDC Metadata Store, see Overview of Business Connectivity Services security tasks in SharePoint Server.

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

注意

編輯是高度權限的權限所需要建立或修改資料來源、 模型及 Business Data Connectivity 中繼資料存放區中的外部內容類型。執行權限,才能查詢外部內容類型 (因為它會授與建立、 讀取、 更新、 刪除及查詢權限)。可在用戶端提供能夠讓新的外部清單,選擇的外部內容類型選擇器中的外部內容類型,並使用外部資料網頁組件、 時設定權限讓使用者能夠設定 BDC 服務本身的權限。務必規劃權限的 BCS,以及請小心時授與編輯 」 權限。Edit is a highly privileged permission that is required to create or modify data sources, models and external content types in the Business Data Connectivity metadata store. Execute permission is required to query the external content type (because it grants create, read, update, delete, and query rights). Selectable in Clients gives the ability to make new external lists, choose external content types in the External Content Types picker, and use External Data web parts, while Set Permissions gives the user the ability to set permissions for the BDC service itself. It is important to plan permissions for BCS, and to be careful when granting Edit permission.

設定 Secure Store ServiceConfigure the Secure Store Service

Secure Store Service 可儲存 Microsoft Business Connectivity Services 使用存取 AdventureWorks 外部資料來源並執行您的使用者帳戶與認證可用來存取外部資料之間的認證對應的認證來源。The Secure Store Service stores the credentials that Microsoft Business Connectivity Services uses to access the AdventureWorks external data source and performs credential mapping between your users accounts and the credentials used to access the external data source.

在此程序中執行設定 Secure Store Service in SharePoint 2013 Preview > 文章中的所有步驟。您必須執行中的步驟設定 Secure Store Services 使用這些參數的 SharePoint 2013 文章中從開始到完成。In this procedure you perform all the steps in Configure the Secure Store Services in SharePoint 2013 Preview article. You must perform the steps in the Configure the Secure Store Services in SharePoint 2013 article with these parameters from start to finish.

設定內部部署 Business Connectivity Services 的 Secure Store ServiceConfigure Secure Store Service for on-premises Business Connectivity Services

  1. 使用下列參數執行中設定 Secure Store Service in SharePoint 2013 Preview的所有步驟。Perform all the steps in Configure the Secure Store Services in SharePoint 2013 Preview with the following parameters.

  2. 開啟 SharePoint 管理中心網站的伺服器陣列的 Secure Store Service 所在具有伺服器陣列管理員權限的帳戶。Open the SharePoint Central Administration website for the server farm that your Secure Store Service is in with an account that has Farm Administrator permissions.

  3. 在 [設定 Secure Store Service 在 SharePoint 2013 Preview > 一文中執行 [ SharePoint Server 中設定 Secure Store ] 區段中使用下列參數中的所有程序In the Configure the Secure Store Services in SharePoint 2013 Preview article, perform all procedures in the Configure Secure Store in SharePoint Server section with these parameters

  4. 註冊受管理帳戶使用者名稱輸入您在Prerequisites for deploying a Business Connectivity Services 內部部署 SharePoint 2013 中的解決方案程序中建立之服務帳戶。For the Register Managed Account, User name type in the name of the service account that you created in the Prerequisites for deploying a Business Connectivity Services on-premises solution in SharePoint 2013 procedure.

  5. 請勿選取 [啟用自動變更密碼] 方塊中。Do not select the Enable automatic password change box.

  6. 執行 「 啟動 Secure Store Service 」 程序。Perform the "To start the Secure Store Service" procedure

  7. 執行 「 建立 Secure Store Service 應用程式 」 程序使用這些參數Perform the "To create a Secure Store Service application" procedures using these parameters

  8. 在 [服務應用程式名稱] 方塊中輸入您想要顯示在 [管理服務應用程式] 頁面上的服務的名稱。In the Service Application Name box enter the name you want the service to appear as on the Manage Service Applications page.

  9. 在 [資料庫] 區域中,保留預先填入的值的資料庫伺服器資料庫名稱資料庫驗證],除非有特定設計需求是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.

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

  11. 可設定] 下拉式清單中,選取 [帳戶註冊為受管理帳戶稍早在此程序。For the Configurable dropdown, select the account that you registered as a managed account earlier in this procedure.

  12. 在 [使用安全認證儲存加密金鑰] 區段中使用下列參數執行步驟:Perform the steps in the Work with Secure Store encryption keys section with these parameters:

  13. 請勿執行 「 重新整理加密金鑰 」 子段落中的程序Don't perform the procedures in the "Refresh the encryption key" sub-section

  14. 閱讀在 Secure Store 中的儲存認證] 區段,然後執行建立目標應用程式程序使用這些參數。Read the Store credentials in Secure Store section and perform the Create a target application procedure using these parameters.

  15. 在 [目標應用程式 ; 字串中的目標應用程式識別碼] 方塊類型不顯示名稱。例如輸入 AWTargetAppID。In the Target Application ID box type in a string for the target application; this is not the display name. For example type in AWTargetAppID.

  16. 在 [顯示名稱] 方塊中輸入顯示名稱,例如 Adventure Works 目標應用程式識別碼。In the Display Name box, enter the display name you want, for example Adventure Works Target Application ID.

  17. 在 [目標應用程式類型] 下拉式清單中選取群組(這表示許多憑證對應到的一個認證)。在此例中,目標應用程式頁面 URL ,則不需要與自動選取為NoneIn the Target Application Type dropdown, select Group (which indicates the mapping of many credentials to one credential). In this case, the Target Application Page URL is not needed and automatically selects to None.

  18. 在 [建立新 Secure Store 目標應用程式] 頁面上的 [欄位名稱] 中,變更Windows 使用者名稱為 SQL 使用者名稱和Windows 密碼為 [SQL 密碼。On the Create New Secure Store Target Application page, under Field Name, change Windows User Name to SQL User Name, and Windows Password to SQL Password.

  19. 欄位類型] 下的 Windows 使用者名稱變更為 [使用者名稱和Windows 密碼變更密碼。Under Field Type change Windows User Name to User Name and change Windows Password to Password.

  20. 目標應用程式管理員新增您想要的目標應用程式的系統管理員的帳戶。請注意伺服器陣列管理員存取的預設值。In the Target Application Administrators add the accounts that you want to be administrators of the Target Application. Note that the Farm Administrator has access by default.

  21. 在 [成員] 方塊中,新增您要允許外部資料來源的存取權的使用者名稱。此範例會使用AdventureWorksBCSUsers安全性群組剛才在Prerequisites for deploying a Business Connectivity Services 內部部署 SharePoint 2013 中的解決方案In the Members box, add the names of the users whom you want to allow access to the external data source. For this example use the AdventureWorksBCSUsers security group you created in Prerequisites for deploying a Business Connectivity Services on-premises solution in SharePoint 2013.

  22. 使用這些參數設定為安全認證儲存目標應用程式的認證程序中執行步驟:Perform the steps in the Set credentials for a Secure Store target application procedure using these parameters:

  23. 在 [ SQL 使用者名稱] 方塊中輸入AdventureWorksUser這是您在建立資料庫登入的 Business Connectivity Services 內部部署解決方案 in SharePoint 2013中建立名稱 SQL Server 帳戶。In the SQL User Name box, type AdventureWorksUser which is the name SQL Server account you created in Create database logins for a Business Connectivity Services on-premises solution in SharePoint 2013.

  24. 在 [ SQL 密碼] 和 [確認 SQL 密碼] 方塊中輸入該帳戶,這實際上是密碼在建立資料庫登入 for Business Connectivity Services 中建立之 SharePointGroupAccount 帳戶的密碼內部部署 SharePoint 2013 中的方案In the SQL Password, and Confirm SQL Password boxes type the password for that account, which is actually the password for the SharePointGroupAccount account that you created in Create database logins for a Business Connectivity Services on-premises solution in SharePoint 2013.

建立外部內容類型Create an external content type

這些程序引導您逐步完成建立不需撰寫任何程式碼中使用 SharePoint Designer 2013 的 Business Connectivity Services 的外部內容類型。您將了解如何探索 SQL Server 資料庫、 連線至資料庫資料表中,並再傳回所需的資料。您將建立外部內容類型名為 Customers 為基礎的 AdventureWorks 範例資料庫中的 [客戶] 檢視。本文使用中的程序How to: 建立 SharePoint 2013 Preview 中的 SQL Server 的外部內容類型。您必須開啟該文章並執行那里的步驟使用中比對本文的節所述的參數。These procedures walk you through building an external content type for Business Connectivity Services using SharePoint Designer 2013 without writing any code. You will learn how to discover a SQL Server database, connect to the database table, and then return the required data. You will create an external content type named Customers that is based on the Customer view in the AdventureWorks sample database. This article uses the procedures in How to: Create external content types for SQL Server in SharePoint 2013 Preview. You must open that article and perform the steps there using the parameters given in the matching sections of this article.

定義一般資訊Define general information

  1. 開啟How to: 建立 SharePoint 2013 Preview 中的 SQL Server 的外部內容類型Open How to: Create external content types for SQL Server in SharePoint 2013 Preview

  2. 建立名稱為 AWcustomers 且顯示名稱為 AdventureWorks Customers 之新外部內容類型。Create a new external content type named AWcustomers with a display name of AdventureWorks Customers.

    定義一般及 Office 行為Define general and Office behaviors

  3. Office 項目類型設為連絡人。Office 的項目類型會決定您想要附加至外部內容類型的 Outlook 行為。在此例中,此 AWCustomer 外部內容類型的行為與 Outlook 中的原生連絡人項目類似。Set the Office Item Type to Contact. The Office Item Type determines the Outlook behavior you want to attach to the external content type. In this case, this AWCustomer external content type behaves like a native Contact Item in Outlook.

  4. 外部清單的離線同步處理] 核取方塊,請確定已選取 [啟用,預設值。In the Offline Sync for External List checkbox, make sure Enabled is selected, which is the default.

注意

如果停用此選項,則「將 SharePoint 連線至 Outlook」功能區命令會無法用於外部清單。If you disable this option, then the SharePoint Connect to Outlook ribbon command is not available for an external list.

建立外部資料連線Create a connection to the external data

  1. 新增外部資料來源類型為使用 SQL Server 的連線。Add a connection using SQL Server as the External Data Source Type.

  2. 在設定資料庫伺服器] 方塊中,輸入並在設定資料庫名稱] 方塊中輸入 AdventureWorks2008R2。(選用) 在 [名稱] 方塊中輸入 AdventureWorks 範例資料庫。In the Set the Database Server box, enter and in the Set the Database Name box, enter AdventureWorks2008R2. Optionally, in the Name box, enter AdventureWorks Sample Database.

  3. 選取 [使用模擬自訂身分識別連線]。Select Connect with Impersonated Custom Identity.

  4. 在 [安全認證儲存應用程式識別碼] 方塊中輸入 AWTargetAppID。In the Secure Store Application ID box, enter AWTargetAppID.

警告

如果系統提示您輸入使用者名稱與密碼的AWTargetAppID可能是因為當您建立 SharePointGroupAccount SQL 登入您並未不取消核取 [使用者必須變更密碼在下次登入時] 選項。若要修正此問題,您必須變更透過 SQL 查詢的密碼ALTER LOGIN <LoginName> WITH PASSWORD = '<originalpassword>'If you are prompted to enter a user name and password for AWTargetAppID it may be because when you created the SharePointGroupAccount SQL login, you did not uncheck the User must change password at next login option. To fix this, you must change the password via SQL query ALTER LOGIN <LoginName> WITH PASSWORD = '<originalpassword>'

選取資料表、 檢視或常式以及定義作業Select a table, view, or routine and Define Operation

  1. AdventureWorks 範例資料庫選取 [ vIndividualCustomer ] 檢視,並以滑鼠右鍵按一下 [建立所有作業In the AdventureWorks Sample Database select the vIndividualCustomer view and right click Create All Operations.

注意

建立所有作業] 都是一種易於定義所有基本作業方法的 (建立讀取讀取清單更新刪除) 方式。Create All Operations is a convenient way to define all basic methods of operations ( Create, Read, Read List, Update, and Delete).

提示

永遠仔細閱讀 [錯誤和警告] 窗格中的訊息。提供以確認您的動作或解決任何問題的實用資訊。Always read carefully the messages in the Errors and Warnings pane. They provide useful information to confirm your actions or troubleshoot any issues.

新增欄Add columns

  1. 參數設定] 對話方塊中,預設的所有欄都選取。若要移除不必要的欄,請清除下列資料行] 旁的核取方塊:尾碼人口In the Parameters Configuration dialog box, by default all columns are selected. To remove unnecessary columns, clear the checkboxes next to the following columns: Suffix and Demographics.

  2. 針對BusinessEntityID選取 [對應至識別碼值。For the BusinessEntityID select the Map to Identifier value.

    注意

    取消核取 [必要] 方塊中,防止即將更新但選取 [唯讀] 核取方塊,這會擷取所需的項目,以便您更新其他欄位。Uncheck the Required box to prevent it from being updated but select the Read Only checkbox, which is needed to retrieve items so you can update other fields.

    對應 Outlook 欄位並設定外部項目選擇器控制項Map Outlook fields and set up the external item picker control

  3. FirstNameLastNameEmailAddress] 以及[phonenumber]欄位,執行下列動作:For the FirstName, LastName, EmailAddress, and PhoneNumber fields, do the following:

  4. 按一下並將欄位反白顯示。Click and highlight the field.

  5. [屬性] 下方的 [ Office 屬性的下拉式清單] 中選取適當的符合欄位: FirstName 名字 (FirstName)LastName * * 姓氏 (LastName) * ,以及[phonenumber]主要電話線電話號碼 (PrimaryTelephonePhoneNumber)、 **EmailAddressEmailAddress1 (Email1Address)Under properties, in the **Office property* dropdown, select the appropriate matching field: FirstName to First Name (FirstName), LastName to ** Last Name (LastName) , and **PhoneNumber to Primary Telephone Phone Number (PrimaryTelephonePhoneNumber), EmailAddress to EmailAddress1 (Email1Address).

    注意

    未對應的欄位數目,會顯示為擴充屬性。兩個至五個欄位的列出為Adjoining表示他們會附加至 Outlook 表單的預設頁面底部的表單區域。六個或多個欄位的列為不同,且會做為新的頁面新增至 Microsoft Outlook。Unmapped fields, depending on the number, are displayed as extended properties. For two to five fields they are listed as Adjoining meaning that they are appended to the form region at the bottom of an Outlook form's default page. For six or more fields they are listed as Separate and are added as a new page to an Microsoft Outlook.

  6. 下列的欄位、 BusinessEntityIDFirstNameLastName] 以及EmailAddress按一下欄位反白顯示,然後按一下 [屬性] 下方的 [選擇器中顯示For the following fields, BusinessEntityID, FirstName, LastName, and EmailAddress click and highlight the field, and then under Properties, click Show in Picker.

    定義篩選Define filters

  7. 建立名稱為 ByRegion 的比較篩選,使用CountryRegionName值。Create a Comparison filter named ByRegion, use CountryRegionName for the value.

  8. [屬性] 下方預設值] 旁邊輸入 Canada。Under Properties, next to Default Value, enter Canada.

  9. 建立名稱為 AWLimit 的限制篩選,使用篩選欄位]BusinessEntityIDCreate Limit filter named AWLimit, use BusinessEntityID for the Filter Field

  10. 將預設值設為 200Set the default value to 200

提示

按一下 [錯誤和警告] 窗格,並確定沒有任何錯誤和警告。Click the Errors and Warnings pane and make sure there are no more errors or warnings.

設定外部清單的標題欄位及完成外部內容類型Set the Title field for an external list and complete the external content type

  1. businessentityid 設標題並儲存外部內容類型。Set BusinessEntityID as the Title and save the external content type.

設定外部內容類型的權限Configure permission on an external content type

設定外部內容類型的使用者存取權和權限:To configure user access and permissions to the external content type:

設定外部內容類型的權限Set up permissions to the external content type

  1. 開啟網站的 [管理中心] 頁面。Open the Central Administration page for your site.

  2. 在 [快速啟動] 上按一下 [應用程式管理]。On the Quick Launch, click Application Management.

  3. 在 [應用程式管理] 頁面的 [服務應用程式,按一下 [管理服務應用程式]。On the Application Management page, under Service Applications, click Manage service applications.

  4. 在服務清單中,按一下 [Business Data Connectivity (BDC) Service]。In the list of services, click your Business Data Connectivity (BDC) Service.

  5. 按一下 [ AWCustomers]。Click AWCustomers.

  6. 在功能區上,按一下 [設定物件權限On the ribbon, click Set Object Permissions.

  7. 輸入您要授與權限的使用者帳戶,然後按一下 [新增]。此範例中,您會新增在Prerequisites for deploying a Business Connectivity Services 內部部署 SharePoint 2013 中的方案AdventureWorksBCSUsers 中建立的 [安全性] 群組。Enter the user accounts to which you want to grant permissions, and then click Add. For this example, you would add the security group that was created in Prerequisites for deploying a Business Connectivity Services on-premises solution in SharePoint 2013AdventureWorksBCSUsers.

  8. 選取您剛新增的使用者帳戶,然後選取 [執行] 核取方塊。Select the user accounts that you just added, and then select Execute check boxe.

  9. 選取 [覆寫現有的權限的權限傳播到 BDC 模型、 外部系統與 BDC 中繼資料存放區中的外部內容類型] 核取方塊。Select the Propagate permissions to all BDC Models, External Systems and External Content Types in the BDC Metadata Store check box to overwrite existing permissions.

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

外部內容類型現已提供適當的使用者的 SharePoint 和 Office 產品中使用。The external content type is now available for use in SharePoint and Office products to the appropriate users.

建立外部清單Create an external list

將外部清單是根據外部資料的 SharePoint 解決方案的重要的建置區塊。您可以讀取及寫入外部資料與使用 SharePoint 清單的熟悉的體驗。將外部清單外觀與呈現很類似原生] 清單中,但有一些差異的行為。例如,可以建立的檢視和計算的值使用的公式,但未附加檔案或追蹤版本。此練習,為您建立外部清單在瀏覽器中因為這是常見的方法。本文使用本節的程序在 Office.com 上的 [建立外部清單。您必須開啟該文章並執行那里的步驟使用中比對本文的節所述的參數。An external list is a key building block for SharePoint solutions based on external data. You can read and write external data with the familiar experience of using a SharePoint list. An external list looks and behaves a lot like a native list, but there are some differences in behavior. For example, you can create views and use calculated values with formulas, but not attach files or track versions. For this exercise, you create the external list in the browser because that is a common approach. This article uses the procedures in Create an external list on Office.com. You must open that article and perform the steps there using the parameters given in the matching sections of this article.

建立外部清單Create an external list

  1. 開啟建立外部清單Open Create an external list

  2. 建立名稱為 AdventureWorksCustomers 使用AWCustomers外部內容類型的外部清單。Create an external list named AdventureWorksCustomers using the AWCustomers external content type.

    建立外部清單的檢視Create a view of an external list

  3. 建立外部清單AdventureWorksCustomers的檢視。本範例會使用ByRegion 的資料來源篩選器Create a view for the external list AdventureWorksCustomers. For this example use ByRegion Data Source Filter.

  4. 將其設為預設檢視,然後自行選取 [排序篩選限制值。Make it the default view, and select your own Sort, Filter, and Limit values.

管理使用者權限Manage user permissions

只要您或適當的使用者建立外部清單,務必確定您設定其他使用者的適當權限。若包含外部清單的子網站繼承上層網站權限,然後您可能會不經意授與權限給不適當的使用者。在這個範例中,] 權限指定給AdventureWorksBCSUsers的群組。Once you or an appropriate user has created the external list, it's important to make sure that you set appropriate permissions for other users. If the subsite that contains the external list inherits permissions from its parent site, then you may inadvertently give permission to inappropriate users. In this example, permissions are given to the AdventureWorksBCSUsers group.

管理外部清單的使用者權限Manage user permissions to the external list

  1. 在 [清單] 索引標籤的 [設定] 群組中按一下 [清單設定]。On the List tab, in the Settings group, click List Settings.

  2. 在 [權限與管理] 按一下 [此清單的權限]...]Under Permissions and Management, click Permissions for this list...

  3. 規劃完成之後,將權限套用至清單。Apply permissions to the list as you have planned them.

下表摘要說明 SharePoint 使用者群組的預設外部清單權限:The following table summarizes the default external list permissions for SharePoint user groups:

名稱Name 權限層級Permission levels
Excel Services 檢視程式Excel Services Viewers
僅供檢視View Only
<站台名稱>成員<Site Name> Members
編輯Edit
<站台名稱>擁有者<Site Name> Owners
完全控制Full Control
<站台名稱>訪客<Site Name> Visitors
讀取Read

將外部清單連線至 OutlookConnect an external list to Outlook

外部清單包含客戶資料對應至 Microsoft Outlook 連絡人的您已啟用的外部清單、 離線同步處理讓您可以使用 Outlook 2016 連線清單。一旦連線,您可以檢視、 編輯和列印使用熟悉的 Outlook 使用者介面的資料。本文會將在 Office.com 上的連線至 Outlook 的外部清單中的程序。請參閱在 outlook 連線的外部清單的詳細資訊的文章。The external list contains customer data mapped to Microsoft Outlook contacts for which you enabled Offline Sync for External List, so you can connect the list with Outlook 2016. Once connected, you can view, edit, and print the data using the familiar Outlook user interface. This article mirrors the procedures in Connect an external list to Outlook on Office.com. Refer to that article for more information on connecting an external list to Outlook.

與 Outlook 同步處理外部清單Synchronize the external list with Outlook

  1. 開啟包含外部清單的 SharePoint Server 網站。在功能區的 [清單] 索引標籤中連線&匯出群組中,按一下 [連線至 OutlookOpen the SharePoint Server site that contains the external list. In the ribbon, on the List tab, in the Connect & Export group, click Connect to Outlook.

  2. Microsoft Office 自訂安裝程式] 對話方塊中,按一下 [安裝]。安裝應需數分鐘。In the Microsoft Office Customization Installer dialog box, click Install.The installation should take a minute or two.

  3. 安裝完成後,按一下 [關閉]。Once the installation is complete, click Close.

驗證 Outlook 外部資料的離線存取與同步處理Verify offline access and synchronization of external data in Outlook

更新離線客戶資料並上線加以To update customer data offline and refresh it online

  1. 若要使 Outlook 2016 離線,按一下 [傳送/接收] 和 [喜好設定] 群組中按一下 [離線工作To take Outlook 2016 offline, click Send/Receive, and in the Preferences group, click Work Offline.

  2. 對其中一位 AdventureWorks 客戶做出一些變更。Make a change or two to one of the AdventureWorks customers.

  3. 若要使 Outlook 2016 重新連線,按一下 [傳送/接收] 和 [喜好設定] 群組中按一下 [線上工作To bring Outlook 2016 back online, click Send/Receive, and in the Preferences group, click Work Online.

  4. 同步處理功能窗格上的資料,以滑鼠右鍵按一下<小組網站名稱>AWCustomers外部清單和 [立即同步處理To synchronize the data, on the navigation pane, right-click the <Team Site Name> AWCustomers external list and then click Sync now

另請參閱See also

概念Concepts

為 SharePoint Server 設定 Business Connectivity Services 解決方案Configure Business Connectivity Services solutions for SharePoint Server