SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business...

22
2013 SPHOL325: SharePoint Server 2013 Search Connectors and Using BCS Hands-On Lab Lab Manual

Transcript of SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business...

Page 1: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

2013

SPHOL325: SharePoint

Server 2013 Search

Connectors and Using

BCS

Hands-On Lab

Lab Manual

Page 2: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

This document is provided “as-is”. Information and views expressed in this document, including

URL and other Internet Web site references, may change without notice. You bear the risk of

using it.

This document does not provide you with any legal rights to any intellectual property in any

Microsoft product. You may copy and use this document for your internal, reference purposes.

© 2012 Microsoft. All rights reserved.

Page 3: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Page 1

Contents

SHAREPOINT SERVER 2013 SEARCH CONNECTORS AND USING BCS .......................................................... 2 Lab Objectives ........................................................................................................................................................ 2 Technologies .......................................................................................................................................................... 2 Audience ................................................................................................................................................................ 2 Scenario ................................................................................................................................................................. 2 Getting Started ....................................................................................................................................................... 3

Connect to the Lab Environment ....................................................................................................................... 3 Open the Lab Environment ................................................................................................................................ 3

Exercise 1 – Create an External Content Type (ECT) ........................................................................................... 4 Scenario ............................................................................................................................................................. 4 Task 1 – Create a New External Content Type ................................................................................................. 4 Task 2 – Connect the External Content Type With an External Data Source ................................................... 5

Exercise 2 – Configure The External Content Type ............................................................................................... 7 Scenario ............................................................................................................................................................. 7 Task 1 – Configure Database Operations ......................................................................................................... 7 Task 2 – Configure The Title and Profile Page .................................................................................................. 9 Task 3 – Verify ECT Properties and Permissions............................................................................................ 12

Exercise 3 – Create, Configure, And Crawl An External Content Source ........................................................... 14 Scenario ........................................................................................................................................................... 14 Task 1 – Create a New Content Source .......................................................................................................... 14 Task 2 – Start and Verify A Crawl .................................................................................................................... 17 Task 3 – Search the External Content ............................................................................................................. 18

Summary .............................................................................................................................................................. 20

Page 4: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Hands-on Lab SharePoint Server 2013 Search Connectors and Using BCS

Microsoft Confidential Page 2

SharePoint Server 2013 Search Connectors and Using BCS

Estimated time to complete this lab: 35 minutes

Lab Objectives

The goal of this lab is to learn how search connectors can be used to connect to and search across external data sources using Business Connectivity Services (BCS).

As an example, you will configure your SharePoint installation to extract content from a SQL database and make it searchable. To achieve this, you will create an external content type (ECT) using SharePoint Designer, deploy it to SharePoint, and create a new content source to crawl this External Content Type. Finally, you will perform some queries to confirm that the external content is now available to SharePoint search.

After completing this lab, you will be better able to:

Create and configure an external content type using SharePoint Designer and Business Connectivity Services.

Connect the ECT to an external content source (a SQL database).

Create a SharePoint content source corresponding to the ECT and crawl the source.

Conduct a search to confirm results have been successfully returned from the external database.

Technologies

SharePoint 2013 Search

Business Connectivity Services

Audience

SharePoint Site Administrators and SharePoint IT Professionals

Scenario

In this lab, you will learn how to access and search external content in SharePoint Server 2013 using search connectors and Business Connectivity Services.

Page 5: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Hands-on Lab SharePoint Server 2013 Search Connectors and Using BCS

Microsoft Confidential Page 3

Getting Started

Connect to the Lab Environment

You will be logged on to the SharePoint (SP) virtual machine (VM) as Garth Fort, with the credentials CONTOSO\GarthF, pass@word1.

Open the Lab Environment

1. To begin the lab, start Internet Explorer, navigate to the demo home page at http://intranet.contoso.com/sites/contoso if not already displayed and log on to SharePoint as Garth Fort with the following credentials:

Username: CONTOSO\GarthF

Password: pass@word1

2. Warm up Web Apps:

a. Start in the demo home page.

b. In the upper navigation, click the down-arrow next to Resources and then click Document Center.

c. Click on a PowerPoint presentation and see it open in a Web App.

d. Click the back-arrow to return to the Document Center.

e. Repeat steps c and d for Word and Excel documents.

Note: if you do not see a specific document type in the top view, in the left navigation click Documents and select from that list.

f. In the upper navigation, click Home to return to the demo home page.

3. You will need to start a second session of Internet Explorer and open Central Administration before proceeding with the lab. To do that:

a. From the Start menu, select SharePoint 2013 Central Administration. If you see a UAC message, click Yes to confirm.

b. If presented with a login dialog box, use the following credentials:

Username: CONTOSO\Administrator

Password: pass@word1

Page 6: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Hands-on Lab SharePoint Server 2013 Search Connectors and Using BCS

Microsoft Confidential Page 4

Exercise 1 – Create an External Content Type (ECT)

Estimated time to complete this exercise: 10 minutes

Scenario

In this exercise, you will create a new external content type using SharePoint Designer. The external content type will point to a local SQL Server Database, AdventureWorks2012. The SQL database contains product and sales data for Adventure Works Cycles, a fictitious bicycle manufacturer and parts distributor.

Task 1 – Create a New External Content Type

In this task, you will use SharePoint Designer to create and configure a new external content type.

1. From the Start menu, start SharePoint Designer 2013.

2. Click Open Site.

3. In the Site name box, type http://intranet.contoso.com/sites/contoso.

4. Click Open.

5. If presented with a login window, log on using the credentials GarthF, pass@word1.

6. In the left navigation, in the Site Objects menu, click External Content Types.

Page 7: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Hands-on Lab SharePoint Server 2013 Search Connectors and Using BCS

Microsoft Confidential Page 5

4. In the ribbon, in the New group, click External Content Type.

5. When the screen to define a new external content type loads, click the blue New external content type link next to Name and change the name to AdventureWorksProducts.

Task 2 – Connect the External Content Type With an External Data Source

In this task, you will continue to configure the new external content type by connecting it to an external data source.

Page 8: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Hands-on Lab SharePoint Server 2013 Search Connectors and Using BCS

Microsoft Confidential Page 6

1. Next to External System, click Click here to discover external data sources and….

2. Click Add Connection.

3. In the Data Source Type drop-down menu, select SQL Server.

4. Click OK.

Page 9: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Hands-on Lab SharePoint Server 2013 Search Connectors and Using BCS

Microsoft Confidential Page 7

5. Type the following information in the SQL Server Connection window:

a. Database Server: localhost

b. Database Name: AdventureWorks2012

c. Name: BCSHOL

d. Connect with User’s Identity Selected

6. Click OK.

In this exercise, you began the process of creating and configuring an external content type using SharePoint Designer.

Exercise 2 – Configure The External Content Type

Estimated time to complete this exercise: 15 minutes

Scenario

In this exercise, you will finish configuring the external content type properties in SharePoint Designer. Specifically, you will define which table in the database will be used for crawling and searching, define a title, and enable a profile page (A profile page is provisioned by data from the external content type, and appears when you click on a specific search result).

Task 1 – Configure Database Operations

In this task, you will set the database options for the external content type.

Page 10: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Hands-on Lab SharePoint Server 2013 Search Connectors and Using BCS

Microsoft Confidential Page 8

1. Back in SharePoint Designer, verify that you now have an entry BCSHOL in the Data Source Explorer.

2. Expand the tree view until you get to the list of Tables.

a. If you get a “Cannot complete refresh” warning message, click OK to close the message.

3. Scroll down, and then right-click on the table Product and click Create All Operations.

Page 11: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Hands-on Lab SharePoint Server 2013 Search Connectors and Using BCS

Microsoft Confidential Page 9

4. A wizard opens that lets you customize the parameters and filters for these operations. You will use the default values.

5. Press Finish to accept the default values.

6. At the right side of your screen, you should now see all the operations (Create, Read Item, Update, Delete, and Read List) on the External Content Type Operations.

Task 2 – Configure The Title and Profile Page

In this task, you will define a title and enable a profile page for the external content type.

Page 12: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Hands-on Lab SharePoint Server 2013 Search Connectors and Using BCS

Microsoft Confidential Page 10

1. In the ribbon, in the Views group, click Summary View.

2. Click Name from the Fields list the right side of this screen, and then in the ribbon, click Set as Title.

3. Leave SharePoint Designer open.

You will now briefly return to SharePoint Central Administration to enable and create a profile page for the new external content type.

4. Confirm that profile creation is enabled and configured for the site:

a. Navigate to the Internet Explorer session that has Central Administration open:

i. In the taskbar, click the Internet Explorer icon and then click Home – Central Administration – Windows Internet Explorer.

Page 13: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Hands-on Lab SharePoint Server 2013 Search Connectors and Using BCS

Microsoft Confidential Page 11

b. Under Application Management, click Manage service applications.

c. Click Business Data Connectivity Service.

d. In the ribbon, if the configuration options are not visible, click the Edit tab.

e. Click Configure.

5. On the screen that appears, confirm that the option Enable Profile Page Creation is checked.

6. If the following URL is not already displayed, type it into the Host SharePoint Site URL box:

http://intranet.contoso.com/sites/contoso.

7. Click OK to confirm the change.

8. In the Ribbon, click BROWSE. You will return to the View External Content Types page.

Page 14: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Hands-on Lab SharePoint Server 2013 Search Connectors and Using BCS

Microsoft Confidential Page 12

You will now return to SharePoint Designer to complete the configuration process.

9. Return to SharePoint Designer.

10. In the ribbon, click Create Profile Page.

11. When prompted to Save the External Content Type now, click Yes.

At this point, SharePoint Designer will save the external content type to the BCS Metadata store and create the profile page.

12. Close SharePoint Designer.

Task 3 – Verify ECT Properties and Permissions

In order for the new external content type to be crawled, the content access account must have appropriate permissions. In this task, you will confirm the correct settings for these parameters.

1. Return to the Internet Explorer session with the tab View External Content Types open:

a. In the taskbar, click the Internet Explorer icon and then click View External Content Types – Windows Internet Explorer.

Page 15: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Hands-on Lab SharePoint Server 2013 Search Connectors and Using BCS

Microsoft Confidential Page 13

2. The new AdventureWorksProducts ECT should appear on the list. If it does not, try refreshing the page.

3. Pause on the AdventureWorksProducts content type, and then click the drop-down arrow.

4. In the drop-down menu that appears, click Set Permissions.

5. If all permissions are already granted for Garth Fort, or for a group (for example, CONTOSO\Domain Users), skip steps 6-9 and continue with step 10.

6. In the window that appears, in the Add an account… box, type contoso\domain users and click the Check Names icon. Wait until the name resolves.

7. Click Add.

8. Check all permissions (Edit, Execute, Selectable In Clients, Set Permissions).

Page 16: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Hands-on Lab SharePoint Server 2013 Search Connectors and Using BCS

Microsoft Confidential Page 14

9. Check the box next to Propagate permissions to all methods…

10. Click OK.

11. Use the Internet Explorer back-button to navigate back to Central Administration.

In this exercise, you finished configuring the external content type properties. You defined which table in the database will be used for crawling and searching, define a title, and enabled a search result profile page.

Exercise 3 – Create, Configure, And Crawl An External Content Source

Estimated time to complete this exercise: 10 minutes

Scenario

In order to make the new external content type accessible to search, you need to create and configure a SharePoint content source and start a crawl. Once the crawl is completed, you will conduct a search to confirm that the external content is being retrieved.

Task 1 – Create a New Content Source

In this task, you will continue in Central Administration. You will open the SharePoint Search Service application and create a new search content source for the ECT you created in previous exercises.

Page 17: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Hands-on Lab SharePoint Server 2013 Search Connectors and Using BCS

Microsoft Confidential Page 15

1. Start in Central Administration (you should be there after completing the previous exercise).

2. Under Application Management, click Manage service applications.

3. Click the link for the Search Service Application (not the proxy).

4. In the left navigation, click Content Sources.

5. Pause on the AdventureWorksProducts content source, if it exist and then click the drop-down arrow. In the drop-down menu that appears, click Delete.

6. Click OK to confirm the deletion of the content source.

7. Click New Content Source.

Note: the existing content source list may not exactly match the screen shot.

8. In the next window, select the following options:

a. Name: AdventureWorksProducts

Page 18: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Hands-on Lab SharePoint Server 2013 Search Connectors and Using BCS

Microsoft Confidential Page 16

b. Content Source Type: Line of Business Data

Note: After you select this option, the page will reload to display your available options for this Content Source Type)

9. External Data Source:

a. Crawl selected external data source: Selected

b. BCSHOL Checked

10. Crawl Schedules:

a. Incremental Crawl: None

b. Full Crawl: None

c. Content Source Priority: Normal

11. Your configuration window should look like the following screen shot:

12. Click OK.

Page 19: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Hands-on Lab SharePoint Server 2013 Search Connectors and Using BCS

Microsoft Confidential Page 17

Task 2 – Start and Verify A Crawl

Recall that in the content source definition page, you can create an incremental crawl schedule. You will now manually start a full crawl of this content source in order to make the latest data available for search.

1. Back in the Manage Content Sources page, pause on the new content source

AdventureWorksProducts, click the down-arrow, and in the context menu click Start Full Crawl.

2. Click OK to confirm.

3. Follow the status of the crawl every few minutes by clicking Refresh.

4. After the status of your Content Source crawl changes from Crawling Full to Completing to Idle, move to the next step (approx. 2-3 minutes; may depend on hardware resources).

5. Right-click the AdventureWorksProducts content source and select View Crawl Log.

6. In the list of content sources, click AdventureWorksProducts.

7. Confirm that the source was crawled successfully with no errors.

Page 20: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Hands-on Lab SharePoint Server 2013 Search Connectors and Using BCS

Microsoft Confidential Page 18

8. In the left navigation, click Central Administration to return to the Central Administration page.

Task 3 – Search the External Content

In this final task, you will conduct a search to verify that you successfully connected and crawled an external content source connected to the AdventureWorks company database.

1. Return to the Internet Explorer session that has the Contoso demo site http://intranet.contoso.com/sites/contoso open:

a. In the taskbar, click the Internet Explorer icon, and then click Home – Windows Internet Explorer.

2. In the top navigation, click Search.

3. In the search box, type tire and click the search icon.

4. Verify that you have results coming from the AdventureWorks bicycle company database.

Note: you may also see one or more document results from other sources. You are looking for items in the bicycle catalog such as “Touring Tire”, “Mountain Tire Tube”, etc.

Page 21: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Hands-on Lab SharePoint Server 2013 Search Connectors and Using BCS

Microsoft Confidential Page 19

5. Click the link below one of the results to see how the URL for the item is composed. Click out of the item.

6. Pause on the item and in the hover panel, click OPEN.

Page 22: SPHOL325: SharePoint Server 2013 Search Connectors and ... · SharePoint 2013 Search Business Connectivity Services Audience SharePoint Site Administrators and SharePoint IT Professionals

Hands-on Lab SharePoint Server 2013 Search Connectors and Using BCS

Microsoft Confidential Page 20

7. In the product profile page that opens, note that the URL for the page is the same as that seen two steps above, and that the fields are populated from the external content type.

8. Click the back-arrow in Internet Explorer to return to the search results list.

By completing this exercise, you learned to create and configure an external content type, and to configure Business Connectivity Services (BCS) to access and crawl the external content. You then confirmed a successful crawl by conducting a search and retrieving results.

Summary

In this hands-on lab, you learned how Business Connectivity Services can be used to access an external data source, and then learned to make the content available for search.

Specifically, you:

Created a new external content type (ECT) and connect it to an external data source.

Configured some of the key ECT and SQL Server options including database operations, title, profile page, and permissions.

Created a new SharePoint search content source and configure it for crawling the ECT.

Crawled the source and conducted a query to verify that search has successfully discovered content in the external database.