PDesai Blogs

  • MOSS 2007 Search Scope Error --> Query/Index Server Event log Error (HOW TO FIX IT)

    MOSS Error: In multi Server MOSS 2007 farm environment. You might see Search Scope Count Errors and also Event Log errors on Index/Query server

     

    Possible Cause: Query and Index Servers are not functioning correctly

     

    Symptoms:

     

    View Scope page error:

     

    Search Scope Error

     

     

    Rule

    Behavior

    Item Count (approximate)

    All Content

    Include

    (all items)

    contentclass = urn:content-class:SPSPeople

    Exclude

    error

    ContentSource = BDCCStarSearch

    Include

    error

    ContentSource = BDCCStarSearchDelta

    Include

    error

    ContentSource = BDCCStarSearchCurrent

    Include

    error

    Total: error

     

    Application Event Log:

     

     

     

    Description:

     

    Event Type:        Error

    Event Source:    Office SharePoint Server

    Event Category:                Office Server Shared Services

    Event ID:              6482

    Date:                     9/26/2007

    Time:                     10:27:52 PM

    User:                     N/A

    Computer:          MyServerName

    Description:

    Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (09596173-2751-4db9-a84a-920690352eba).

     

    Reason: Object b605e66d-073d-4075-ad36-8565cdd48497 not found.

     

    Techinal Support Details:

    System.Collections.Generic.KeyNotFoundException: Object b605e66d-073d-4075-ad36-8565cdd48497 not found.

       at Microsoft.Office.Server.Search.Administration.SearchApi.get_App()

       at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize()

       at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)

     

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

     

     

     

    Diagnosis :  Steps to fix this problem

     

    This problem occurs mostly when your Office SharePoint Service Search is not working (or configured correctly). When you  follow steps listed here to configure your office SharePoint Service Search, you will  most likely loose crawled data in content catalogs if any. You need to re-crawl data source again.

     

    1.       Stop Office SharePoint Service on all servers (command line option StsAdm.exe -o osearch -action stop)

    2.       Stop and Start MOSS timer service

    3.       Start office SharePoint Service Search service on index server first. (my observation is stsadm.exe command line tool works better StsAdm.exe -o osearch -action start -role index)

    a.       Sometimes you configure Index location on index server (use new location). Use “configure automatically” option and provide domain account which is member of local admin group on the index server (command line option StsAdm.exe -o osearch -defaultindexlocation E:\spsindexdata)

    4.       Start Office SharePoint Services Search Service on Query Server(s) next. (command line option StsAdm.exe -o osearch -action start -role query)

    a.       Sometimes you configure Index location on Query server (use new location). Use “configure automatically” option and provide domain account which is member of local admin group on the Query server. (command line option StsAdm.exe -o osearch -propogationlocation d:\spsindexdata)

    5.       You might want to wait couple of minutes.

    6.       Edit your Shared Service Provider (SSP) settings. Select Index Server in drop down list. Provide service credentials. Click OK

    7.       Wait about 10 minutes and check your server again. Check if Scope count Error is gone.

     

    This worked for me in two diffent environments

  • MOSS Search: How to control content to be crawled..

    Today morning I was answering a DL question. Question was..."How to I control what Search content to be crawled? There are some paths URLs which I do not want to crawl?.

    I was wondering if there is a way to configure MOSS Search to exclude the path and library names in the search result?

    YES! You can easily control content to be crawled using following techique.

    Create a new page INDEX.HTML and use Index.html page to control what needs to be crawled. Details ….

     

    1.     Create a new path with only one page in it (Index.html)

    2.     Add all the paths URLs you want to crawl to Index.html page. [Do not include paths you do not want to crawl]

    3.     Use Index.html page URL to define Content Catalog.  specify newly created Path where Index file is (Say http://MyServer/Search/Index.html)

      • Content Source Type (select Web Sites radio button) 
      • Start Adderess (Type the Index.HTML page URL)

    4.     In crawler setting use custom settings to control server hop and page depth

      • Choose Radio button option "Custom- specify page depth and server hops"
      • Use Limit Page Depth option and Limit Server Hops options to control content to be crawled

    This way you have full control on content to be crawled.

  • Part I : How to build MOSS BDC Search for your Line Of Business Application [From Start to End]

      I just successfully implemented MOSS  BDC Search for CSTAR application. I will share my learnings about MOSS BDC search here. My design implements centralized MOSS Search for all LOB application in my group. MOSS BDC Search solution in a nut shell...

     

    This article walks you through MOSS BDC Search installations steps. At very high level, installation involves four steps

    1.       Verify prerequisites (software and hardware)

    2.       Install SharePoint Server 2007

    3.       Import BDC meta data, Create Managed properties and configure crawl

    4.       Smoke test installation

     

    You will see detailed instructions for each of the steps listed above in following section

    Install Microsoft® Office SharePoint® Server 2007

     

    Prerequisites

    Refer following readme.htm documents for SharePoint Server 2007

    .Net Framework 3.0 RTM (Windows Workflow Foundation)

    Microsoft Office SharePoint Server 2007 product.

    Read my previous post about MOSS Search  

    http://blogs.msdn.com/pdesai/archive/2007/06/17/moss-2007-bdc-search-full-text-out-of-the-box-solution-for-your-lob-application.aspx

     

    Install location

    To install Microsoft Office SharePoint Server (MOSS) 2007, follow instructions listed below.

    1.        

    SharePoint Serer 2007 depends on Windows Work Flow Foundation (WCF) which is part of .NET Framework 3.0.4203.2 (RTM Version). Make sure you have it on server where SharePoint is to be installed.

     

    2.        

    Kick off SharePoint Server 2007 installation using setup exe. This takes few seconds to bring up Moss Setup dialog box

    3.        

    Enter product key when prompted (product web SharePoint installation page  lists product key) and click continue

    4.        

    Read license agreement and Check the box “Accept the terms of this agreement”. Click continue

    5.        

    Choose the installation based on your environment. My recommendations are

    ·         Dev and Test environment click  Basic  (standalone server)

    ·         PPE and Production click Advanced (separate servers for query, index and database). This will perform better.

    Selected SharePoint Server 2007 installation begins. This will take a while to finish.

    6.        

    Click close button to complete SharePoint Server installation and continue with  Microsoft Office SharePoint Server 2007 Configuration wizard

    7.        

     

     

    Click Next button, it will immediately popup with following dialog

    8.        

    Click Yes to proceed with MOSS 2007 configuration. This will take couple of minutes to complete.

    9.        

    Click Finish to complete MOSS 2007 installation and configuration.

     

    Configure MOSS Search Index and Query Service Account

     

    You need to configure Search Inded and Query Service account, once MOSS (Microsoft Office Sharepoint Server) installation is complete. The account you specify here will be used by sharepoint to connect to Line of Business Application Database or web service. Use the account which has access to your database objects (or web service) for which you would like to enable MOSS Search 

    1.        

    Open Central Administration Site and click Application Management

    2.        

    And then click Manage Search Service in search section

    3.        

    Click Office SharePoint Server Search Indexing and Query link in Query and Index Servers section

    4.        

    On “Configure Office SharePoint Server Search Service Settings on server” page, configure E-Mail account (use production support alias responsible for supporting CSTAR MOSS BDC Search)

    5.        

    Configure Farm Search Service Account to use a Service Account (security Account like REDMOND\XYZ. Avoid using personal account). The account you use here should be preconfigured to access underlying application database. 

    6.        

    Scroll down and select other options as shown below. Click OK to complete

    Congratulations! you just learnt how to install and configure SharePoint Server 2007 Search components. Keep tuned, in my next blog post I will show you how to create MOSS BDC application,  Create managed property, Map Crawled properties, Create content catalog. I will also show how to create content crawl schedule.

     

  • MOSS 2007 BDC Search (Full text out of the box solution for your LOB application)

    Microsoft office SharePoint Services (MOSS) 2007 search diagram

              MOSS Search Components

    In general business data is in database or exposed as web service. MOSS 2007 has new feature that enables line of business applications data search.  You can enable full text search for you application in few easy steps.

    First create Business Data Catalog metadata model for your application, which basically defines contract between MOSS and your business application data.  The DBC contract includes data connection information, business entities, and methods to access business data. Additionally you may specify security information.

    Next you import BDC metadata model (XML file from step above) using SharePoint SSP Admin site and create a business data catalog (BDC). You can also define full & incremental crawl schedule for your business data.

    Finally define search scope to include your BDC crawl data. This makes crawled business data to searchable.

    Once you (MOSS) crawl business data, SharePoint automatically create profile web pages. Profile pages are used by MOSS to display Business data details when a result row in search result page is clicked.

         

     You can search your business data in many ways

     

    1.       SharePoint portal

    2.       Expose it as SharePoint list

    3.       Create Business Data Web Parts and

    4.       Use SharePoint Search Web service and create your own custom search application

     

  • Sample code to create Native XML Web Service using SQL 2005 Transact-SQL script

    "CREATE ENDPOINT" Transact-SQL allows us to create Native XML Web services using Transact-SQL. (Refer Books online for details)

    The beauty of this example is: neither we create web service project in visual studio, nor we need data access layer to access SQL data. All that we need to do is copy and execute Transact-Sql script on your Sql server which will create desired end point.

     Create Native XML Web Service

    We will create Native XML Web Service with

    1. Virtual directory http://PDesai222/MySqlEndPoint

    2. Three web methods

             I.      Web method 'GetDbInfo' that executes system stored procedure 'sp_helpdb' in master db and lists Sql server databases

           II.      Web method 'GetSqlLogins' that executes 'xp_loginInfo' system stored proc in master db and lists Sql server login accounts

          III.      And web method 'GetTableList' that executes 'sp_tables' system tables and returns master db table names

    Simplely copy and execute following Sql script on your Sql server which will create desired Native XML Web Service.

     

    Transact-SQL to create My_Sql_EndPoint

     /**********************************************************
    In this example ‘PDesai222’ is my SQL server name change it
    Please change it to your server name before executing script
     
    Also change Grant permission statement to reflect your login
    Instead of [MyDomain\MyLogin]
     **********************************************************/
     DROP ENDPOINT my_sql_endpoint;
     
    GO
     
     
     
    CREATE ENDPOINT my_sql_endpoint
    STATE = STARTED
    AS HTTP(
     
    PATH = '/MySqlEndPoint',
    AUTHENTICATION = (INTEGRATED ),
    PORTS = ( CLEAR ),
    SITE = 'PDesai222'
    )
     
    FOR SOAP (
     
    WEBMETHOD 'GetDbInfo'
    (name='master.sys.sp_helpdb',
    SCHEMA=STANDARD ),
     
    WEBMETHOD 'GetTableList'
     (name='master.sys.sp_Tables',
     SCHEMA=STANDARD ),
     
    WEBMETHOD 'GetSqlLogings'
     (name='master.sys.xp_logininfo',
     SCHEMA=STANDARD ),
     
    WSDL = DEFAULT,
    SCHEMA = STANDARD,
    DATABASE = 'master',
    NAMESPACE = 'http://www.GulbargaOnline.com/'
     
    );
     
    GO
     
    GRANT CONNECT ON ENDPOINT::my_sql_endpoint TO [MyDomain\MyLogin]
     

    Verify Native XML Web Service

     Open browser (internet explorer) and type Url http://pdesai222/MySqlEndPoint?wsdl

    How to retrieve data using XML Native Web Service?

    1.  Create a  C#  ASP.NET web site project in Visual studio and add web reference to SOAP end point you just created (http://pdesai222/MySqlEndPoint?wsdl) and name it as pdesai222
    2. Add a GridView control and three Buttons by replacing your Default.Aspx code with following code
     <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>Untitled Page</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        <table style="width: 853px">
        <tr></tr> <tr><td>
        <asp:Button ID="GetDbInfo" Text="GetDbInfo" runat="server" CommandName="GetDbInfo" OnClick="Button_Click"/>
        </td><td>
        <asp:Button ID="GetSqlLogings" Text="GetSqlLogings" runat="server"  CommandName="GetSqlLogings" OnClick="Button_Click"/>
        </td><td>
        <asp:Button ID="GetTableList" Text="GetTableList" runat="server" CommandName="GetTableList" OnClick="Button_Click"/>
        </td></tr><tr></tr>
        <tr>
        <td colspan = "3">
            <asp:GridView ID="GridView1" runat="server" Width="100%">
            </asp:GridView>
            </td> </tr>
        </table>
        </div>
        </form>
    </body>
    </html>
     
     
     
       3. Edit code behind page Default.Aspx.CS Add using to refer your web service

     using pdesai222;

    1. Copy following code to code behind page Default.Aspx.CS
       protected void Button_Click(object sender, EventArgs e)
        {
            pdesai222.my_sql_endpoint  proxy = new my_sql_endpoint();
            proxy.UseDefaultCredentials = true;
            Object[] retvalue = null;
            DataSet dataSet = null;
     
            switch ((sender as Button).CommandName)
            {
                case "GetDbInfo":
                    retvalue = proxy.GetDbInfo(null);
                    dataSet = (DataSet)retvalue[0];
                    break;
     
                case "GetSqlLogings":
                    System.Data.SqlTypes.SqlString privilege = new System.Data.SqlTypes.SqlString("Not wanted");
     
                    retvalue = proxy.GetSqlLogings(null, null, ref privilege);
                    dataSet = (DataSet)retvalue[0];
                    break;
     
                case "GetTableList":
                    retvalue = proxy.GetTableList(null, null, null, null, true);
                    dataSet = (DataSet) retvalue[4];
                    break;
     
            }
     
            this.GridView1.DataSource = dataSet;
            this.GridView1.DataBind();
          }

     Build and run your web site project and run it. Click command button to make SOAP request to your Navtive XML web service.

     

  • SQL Server 2005 Native XML Web Service

    Microsoft SQL Server 2005 Native XML web service enables us to make SOAP requests to SQL Server 2005 over HTTP. You can executes
     
     1. SQL Batch statements
     2. Stored Procedures
     3. and scalar valued User defined functions

    How does it work?
     
           Native XML Web Service
     
    Simplely we create a HTTP End Point in SQL Server
    And enable Enable Microsoft SQL Server 2005 Native XML Web Service Option
    Stay tuned for How to details and samples

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker