Pages

Thursday, January 26, 2012

How To Check Crawl Status of Windows Sharepoint Services 3.0 Search

Recently I came across with a Search Issue in my Clients WSS 3.0 Sharepoint enviornment. Search was running but was crawling only very few sites. It was not even crawling any document library. I checked the Search Searvice Account's access to all content Databases and it had full read access to all content. Still there were only very few search results shown against any keyword.

Unfortunately there is No GUI available in WSS 3.0 Search to check Its Crawl Status or Crawl Logs.
I did some googling and found these SQL Queries to check the Crawl Status of Search in WSS 3.0 Environment.


Queries

Notes -
  • WSS_Search corresponds to your default search database.
  • All the following queries should be run in SQL Query Analyzer in Management Studio of your defaul databse server for WSS 3.0
        

1.  SQL Query to check the last crawled URLs (WSS 3.0. )

I found these Queries Really Very Useful.
ENJOY!!!!!!!!!!!
SELECT [DocID],[AccessURL],[DisplayURL],[DisplayHash],[LastTouchStart],[LastTouchEnd]
FROM [WSS_Search].[dbo].[MSSCrawlURL]
where DisplayURL like '%wsstest:90%'
order by LastTouchStart desc

2. SQL Query to check the crawl errors for the SharePoint sites (WSS 3.0.)select msscrawlurllog.lasttouchstart as Time, msscrawlurllog.displayurl as URL,msscrawlurllog.errorid as Error, msscrawlerrorlist.errormsg as Description
from msscrawlurllog
join msscrawlerrorlist on msscrawlurllog.errorid = msscrawlerrorlist.errorid
order by msscrawlurllog.lasttouchstart

3. SQL Query to find how many items have been crawled for the SharePoint site (WSS 3.0.)SELECT [HostID],[HostName],[SuccessCount],[ErrorCount],[WarningCount]
FROM [WSS_Search].[dbo].[MSSCrawlHostList]
where HostName like '%wsstest:90%'

4. SQL Query to find out the crawl 'Start" and 'completed" time ( WSS 3.0.)
SELECT [CrawlID],[RequestTime],[Status],[StartTime],[EndTime]
FROM [WSS_Search].[dbo].[MSSCrawlHistory]
order by starttime desc