JDBC connector Definition



Building Search Applications in SharePoint Server 2010 for Search and FAST Search Server 2010 for SharePoint: Lesson 11 Lab 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.Some examples depicted herein are provided for illustration only and are fictitious.? No real association or connection is intended or should be inferred.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. ? 2010 Microsoft Corporation. All rights reserved.Building Search Applications in SharePoint Server 2010 for Search and FAST Search Server 2010 for SharePoint: Lesson 11 LabSummary: This is the lab excercises Building Search Applications in SharePoint Server 2010 for Search and FAST Search Server 2010 for SharePoint: Lesson 11 JDBC Connector.Applies to: Microsoft SharePoint Server 2010 | Microsoft FAST Search Server 2010 for SharePoint FederationPublished: September 2010Provided by: Anthony Butcher, Senior Consultant, FAST - Global Services, EMEA | David de Santiago, Senior Consultant, FAST - Global Services, EMEA | Roberto Fanelli, Senior Consultant, FAST - Global Services, EMEA | Microsoft CorporationJDBC connector DefinitionFast Search for SharePoint provides the ability to index database content into the Fast index. This is one of the most common scenarios for indexing structured data. Pre-requisitesThe JDBC connector requires the JDK 1.6 (32 bits for Windows) installed on your server. You can download the installer from or other sources.It is advised to set the JAVA_HOME variable directly in your jdbcconnector.bat file as shown here (usually java installation directory is C:\Program Files (x86)\Java\)@echo offrem This bat file should setup the java env and run the connector managerSETLOCALset JAVA_HOME="C:\Program Files (x86)\Java\jre1.6.0"echo Copyright (c) Microsoft Corporation.? All rights reserved.rem !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!rem Java 1.6 must be installed and set hererem !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!if NOT defined JAVA_HOME (?? echo Sorry..?? echo You have NOT set JAVA_HOME - Should point to where JRE 1.6.x or later is installed?? echo Exiting.......?? goto end)Data for this demo (skip this step if data already present in Database)For the purpose of this course we will be using a Microsoft SQL Server 2008 R2 Database. Create a table on you’re a SQL Server database instance called ‘nbateams’:As an administrator log into your database server and run the following script for creating the nbateams database:USE [master]GO/****** Object: Database [nbateams] Script Date: 06/28/2010 02:03:46 ******/CREATE DATABASE [nbateams] ON PRIMARY ( NAME = N'nbateams', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\nbateams.mdf' , SIZE = 2048KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ) LOG ON ( NAME = N'nbateams_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\nbateams_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)GOALTER DATABASE [nbateams] SET COMPATIBILITY_LEVEL = 100GOIF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))beginEXEC [nbateams].[dbo].[sp_fulltext_database] @action = 'enable'endGOALTER DATABASE [nbateams] SET ANSI_NULL_DEFAULT OFF GOALTER DATABASE [nbateams] SET ANSI_NULLS OFF GOALTER DATABASE [nbateams] SET ANSI_PADDING OFF GOALTER DATABASE [nbateams] SET ANSI_WARNINGS OFF GOALTER DATABASE [nbateams] SET ARITHABORT OFF GOALTER DATABASE [nbateams] SET AUTO_CLOSE OFF GOALTER DATABASE [nbateams] SET AUTO_CREATE_STATISTICS ON GOALTER DATABASE [nbateams] SET AUTO_SHRINK OFF GOALTER DATABASE [nbateams] SET AUTO_UPDATE_STATISTICS ON GOALTER DATABASE [nbateams] SET CURSOR_CLOSE_ON_COMMIT OFF GOALTER DATABASE [nbateams] SET CURSOR_DEFAULT GLOBAL GOALTER DATABASE [nbateams] SET CONCAT_NULL_YIELDS_NULL OFF GOALTER DATABASE [nbateams] SET NUMERIC_ROUNDABORT OFF GOALTER DATABASE [nbateams] SET QUOTED_IDENTIFIER OFF GOALTER DATABASE [nbateams] SET RECURSIVE_TRIGGERS OFF GOALTER DATABASE [nbateams] SET DISABLE_BROKER GOALTER DATABASE [nbateams] SET AUTO_UPDATE_STATISTICS_ASYNC OFF GOALTER DATABASE [nbateams] SET DATE_CORRELATION_OPTIMIZATION OFF GOALTER DATABASE [nbateams] SET TRUSTWORTHY OFF GOALTER DATABASE [nbateams] SET ALLOW_SNAPSHOT_ISOLATION OFF GOALTER DATABASE [nbateams] SET PARAMETERIZATION SIMPLE GOALTER DATABASE [nbateams] SET READ_COMMITTED_SNAPSHOT OFF GOALTER DATABASE [nbateams] SET HONOR_BROKER_PRIORITY OFF GOALTER DATABASE [nbateams] SET READ_WRITE GOALTER DATABASE [nbateams] SET RECOVERY SIMPLE GOALTER DATABASE [nbateams] SET MULTI_USER GOALTER DATABASE [nbateams] SET PAGE_VERIFY CHECKSUM GOALTER DATABASE [nbateams] SET DB_CHAINING OFF GOAs an administrator log into your database server and run the following script for creating the teams table:USE [nbateams]CREATETABLE [nbateams] ([id] [smallint] NULL,[teamname] [varchar](50) NULL,[teamcity] [varchar](50) NULL,[teamconference] [varchar](50) NULL,[teaminfo] [varchar](50) NULL)Populate the table with the following data by running the SQL scripts:USE nbateamsINSERT INTO [nbateams]([id],[teamname],[teamcity],[teamconference],[teaminfo])VALUES ('1','Lakers','Los Angeles','West','Kobe MVP!')GOINSERT INTO [nbateams]([id],[teamname],[teamcity],[teamconference],[teaminfo])VALUES ('2','Celtics','Boston','East','Larry bird is a LEGEND!')GOJDBC connector configuration: The JDBC connector configuration file is located at <FS4SP_install_directory>/etcOpen the JDBCTemplate.xml file and save it as JDBC_demo.xmlIn your JDBC_demo.xml modify the following entriesInput/JDBCDriver: com.microsoft.sqlserver.jdbc.SQLServerDriverInput/JDBCURL: JDBC:sqlserver://<SQL SERVER>\<instance name>:1433;database=nbateams;integrateedSecurity=true;Input/JDBCSQL: <![CDATA[select id as id, teamname as teamname, teamcity as teamcity, teamconference as teamconference, teaminfo as teaminfo from dbo.nbateams]]>Transformation/JDBCPrimaryKeyField: <![CDATA[id]]>Transformation/UseMultiRowNormalizer: trueChangeDetection/Enable: trueFastSearchSubmit/Collections: sp(Warning: INPUT/JDBCSQL and Transformation/JDBCPrimaryKeyField value need to be encapsulated in between <![CDATA[]]>)Open The FastSearch Server 2010 for SharePoint PowerShell command (run as administrator)Navigate to the <FS4SP_install_directory>/binRun the following command to test the connection:.\jdbcconnector.bat testconnections –f ..\etc\jdbcDEMO.xml[If this is the first time you run the JDBC connector go the SharePoint Central Administration, Select Manage Service Applications and select the FAST Query SSA. Click on the Crawled Properties and links and verify that Category JDBC is empty.]Run the following command to execute the JDBC connector:.\jdbcconnector.bat start –f ..\etc\jdbcDEMO.xmlGo the SharePoint Central Administration, Select Manage Service Applications and select the FAST Query SSA. Click on the Crawled Properties and links and verify that Category JDBC contains crawled properties. By default all crawled properties under the JDBC category are searchable. You can run a search from the Search Center for ‘Lakers’ Optional: Mapping crawled properties for correct display.Go the SharePoint Central Administration, Select Manage Service Applications and select the FAST Query SSA.Click on the Crawled Properties and Category JDBC.Map the ‘teamname’ crawled properties to the managed properties ‘title’Map the ‘teaminfo’ crawled properties to the managed properties ‘description’The ChangeDetection and ChangeDBPurge crawler configuration properties need to be set to true <group name="ChangeDetection" expand="no"><description><![CDATA[The parameters in the "ChangeDetection" group specify how to detect changes in the database since last feeding from the database(s), using row checksums ]]></description><parameter name="Enabled" type="boolean"><description><![CDATA[If true, changedetection will be enabled. <br>Default: false ]]></description><value>true</value></parameter><parameter name="ChangeDBPurge" type="boolean"><description><![CDATA[If true, will delete all entries in the checksum database on startup. <br>Default: false ]]></description><value>true</value></parameter>Run again the connector to have the mapping taking place.ConclusionThis concludes the lab excercises for Building Search Applications in SharePoint Server 2010 for Search and FAST Search Server 2010 for SharePoint: Lesson 11 JDBC Connector. ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download