Microsoft Office SharePoint Server 2007 Crawl never ends


Today one of my colleagues was experiencing some problem in the Microsoft Office SharePoint Server 2007 test environment. He started a crawling job last Friday and the job was still running this morning. He found a post with a solution for this problem. The title is “MOSS 2007 crawl never ends”. Click here to see the post.

The solution was to truncate some tables from the “shared_services_ search” database. The post also referred to http://support.microsoft.com/kb/930887/en-us . We solved the problem by truncating the following tables on the “shared_services_ search” database:

TABLES TO BE TRUNCATED (not deleted!!!):

MSSAnchorChangeLog

MSSBatchHistory

MSSChangeLogCookies

MSSCrawlChangedSourceDocs

MSSCrawlChangedTargetDocs

MSSCrawlContent

MSSCrawlDeletedURL

MSSCrawlHistory

MSSCrawlQueue

MSSCrawlURL

MSSCrawlURLLog

MSSDocDeleteList

(Exclude the MSSCrawlHistory table, if you try to truncate it, it will give you a FOREIGN KEY constraint).

You can use this script:

truncate table
MSSAnchorChangeLog
go
truncate table
MSSBatchHistory
go
truncate table
MSSChangeLogCookies
go
truncate table
MSSCrawlChangedSourceDocs
go
truncate table
MSSCrawlChangedTargetDocs
go
truncate table
MSSCrawlContent
go
truncate table
MSSCrawlDeletedURL
go
truncate table
MSSCrawlQueue
go
truncate table
MSSCrawlURL
go
truncate table
MSSCrawlURLLog
go
truncate table
MSSDocDeleteList
go
–End of Script

 I hope this post will help you.

Advertisements

5 thoughts on “Microsoft Office SharePoint Server 2007 Crawl never ends

  1. Hello

    thanks for your post

    we did not met the crawl issue since one month

    we have a search DB with currently 1GB
    what is the threshold where we shoud purge these tables?
    Thanks
    best regards

    1. My Search DB is 30 GB. I don’t know what is the threshold to purge these tables. In my case the problem was only one time. Do you experience this problem more often?

  2. I think the first “truncate table” is missing the MSSAnchorChangeLog, which somehow appeared after the –End of Script. When I run this script everything gets truncated ok except for the MSSCrawlHistory. The following error pops up:

    Cannot truncate table ‘MSSCrawlHistory’ because it is being referenced by a FOREIGN KEY constraint.

  3. Thank you for your comments. I edited the script according to your remarks. The MSSCrawlHistory will give you indeed a FOREIGN KEY constraint error when trying to truncate it. Just skip that table and you will be able to do the crawling again.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s