Sunday, January 13, 2013

Recreate WSS Search database

In the rare even that the search database for Windows SharePoint Services 3.0 becomes corrupt or unusable here is how to create a new one. The SharePoint search Database simply contains index information about the SharePoint site and can be recreated at any time.

 

image

 

If you go into the SQL Server Management Studio Express you should be able to identify the search database that you are having an issue with. In this case we can see that it is WSS_SEARCH_SERVERF.

 

image

 

Open the SharePoint Central Administration. Select the Operations tab and then select Services on Server from under the Topology and Services heading.

 

image

 

Locate the line Windows SharePoint Services Search and press the Stop hyperlink to the right.

 

image

 

You will then receive a message like shown above telling you that the index files will be deleted. Press OK to continue.

 

image

 

After a few moments you should see that the Status changes to Stopped. Now select the hyperlink Windows SharePoint Services Search on the left or the Start button on the right.

 

image

 

Complete the details for the Service Account. This is account that the SharePoint Search Service runs as. Best practice is to have a dedicated account with a password that doesn’t expire and NOT use the Local service. This account will automatically be given full read only rights to all SharePoint data. Scroll down.

 

image

 

Now select a Content Access Account. This account will be used to crawl (read) all the SharePoint data and index it. again, best practice is that it should be a dedicated account with a password that doesn’t expire and NOT the Local Service.

 

In the Search Database fields you will see the Database Server name and the Search database (here WSS_SEARCH_SERVERF).

 

image

 

Enter a new name for the SharePoint Search database (here WSS_NEW_SEARCH_DB) and leave the other settings as is.

 

Press the OK button to create the Search database and start the SharePoint Search Service.

 

image

 

You will have to wait a few minutes while the Search Service is configured and started.

 

image

 

You should see that the Windows SharePoint Services Search is now started.

 

image

 

If you refresh the databases view you should now see the new Search database you created that is now operating with SharePoint. You can detach and remove the old database to avoid confusion.

 

image

 

Depending on how much database you have on your site it might take a while to completely reindex the search results. You can of course always do a full crawl manually if you want. Beware that the first crawl (whether automatic or forced) will be a major crawl (since it is new empty search database) and will thus be a very intensive process that may impact the performance of the server.

 

The last thing you should do is run a search from the SharePoint site to ensure everything is now working as expected.