Microsoft Knowledge Base Email Alertz

The search service is unavailable in SharePoint Server 2007, and you receive a Search service is currently offline error message

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 968094 - Last Review: March 13, 2009 - Revision: 2.0

The search service is unavailable in SharePoint Server 2007, and you receive a "Search service is currently offline" error message

SYMPTOMS

In some cases, the search service may be unavailable in Microsoft Office SharePoint Server 2007, and you may receive the following error message:
Search service is currently offline.
Or, you may receive the following error message when you visit the Search Settings page:
Error
The search service is currently offline. Visit the Services on Server page in SharePoint Central Administration to verify whether the service is enabled. This might also be because an indexer move is in progress.
Troubleshoot issues with Windows SharePoint Services.

CAUSE

These issues occur if the out of box (OOB) default scopes on the shared service provider (SSP) are deleted.

WORKAROUND

To work around these issues, re-create the OOB default scopes on the SSP. To do this, run the following Microsoft SQL Server script for the appropriate Shared Services Administration database (for example: SharedServices1_ DB).
SET IDENTITY_INSERT dbo.MSSScopes ON

IF EXISTS (SELECT * FROM sysobjects WHERE name = 'proc_MSS_AddScopeWithID' AND type = 'P')
    DROP PROCEDURE dbo.proc_MSS_AddScopeWithID
GO

CREATE PROCEDURE dbo.proc_MSS_AddScopeWithID(
    @Name nvarchar( 60 ),
    @Description nvarchar( 300 ),
    @ConsumerName nvarchar( 60 ),   
    @DisplayInAdminUI bit,
    @AlternateResultsPageUrl nvarchar( 2048 ) = NULL,
    @CompilationType smallint,        
    @ModifierName nvarchar( 2048 ),
    @ScopeID int )
AS
    DECLARE @LastError int
    
    DECLARE
        @ConsumerID int
    SELECT
        @ConsumerID = ConsumerID
    FROM
        dbo.MSSRegisteredConsumers
    WHERE
        ConsumerName = @ConsumerName
        
    IF @@ROWCOUNT = 0
        RETURN 1
    SELECT @LastError = @@ERROR
    IF @LastError <> 0
        RETURN @LastError
        
    BEGIN TRAN

    INSERT INTO
        dbo.MSSScopes (
            ScopeID,
            Name,
            Description,
            ConsumerID,
            DisplayInAdminUI,
            AlternateResultsPageUrl,
            CompilationType,
            CompilationState,
            LastCompilationTime,
            LastModifiedTime,
            LastModifiedBy,
            LastChangeID
        )
    VALUES (
        @ScopeID,
        @Name,
        @Description,
        @ConsumerID,
        @DisplayInAdminUI,
        @AlternateResultsPageUrl,
        @CompilationType,
        0,
        NULL,
        GETUTCDATE(),
        @ModifierName,
        0
    )

    SELECT @LastError = @@ERROR
    IF @LastError <> 0
    BEGIN
        ROLLBACK TRANSACTION
        RETURN @LastError
    END
    
    EXEC
        @LastError = dbo.proc_MSS_ScopeHasChanged @ScopeID, @ModifierName

    IF @LastError <> 0
    BEGIN 
        ROLLBACK TRAN
        RETURN @LastError
    END
    
    COMMIT TRAN
    RETURN 0
GO

DELETE FROM dbo.MSSScopes WHERE ScopeId = 0
BEGIN
    EXEC dbo.proc_MSS_AddScopeWithID N'People', N'Search for people.', N'shared', 1, N'peopleresults.aspx', 1, N'system', 0
    DECLARE @id int
    EXEC dbo.proc_MSS_AddScopeRule 0, 0, 2, 0, 261, N'urn:content-class:SPSPeople', N'system', @id OUTPUT
END
GO

DELETE FROM dbo.MSSScopes WHERE ScopeId = 1
BEGIN
    EXEC dbo.proc_MSS_AddScopeWithID N'All Sites', N'Search for everything available for searching.', N'shared', 1, NULL, 1, N'system', 1
    DECLARE @id int
    EXEC dbo.proc_MSS_AddScopeRule 1, 0, 0, 0, 0, N'', N'system', @id OUTPUT
    EXEC dbo.proc_MSS_AddScopeRule 1, 2, 2, 0, 261, N'urn:content-class:SPSPeople', N'system', @id OUTPUT
END

DELETE FROM dbo.MSSScopes WHERE ScopeId = 2
BEGIN
    EXEC dbo.proc_MSS_AddScopeWithID N'Global Query Exclusion', N'Everything that should be omitted from all searches by default.', N'shared', 0, NULL, 1, N'system', 2
END
GO

DELETE FROM dbo.MSSScopes WHERE ScopeId = 3
BEGIN
    EXEC dbo.proc_MSS_AddScopeWithID N'Rank Demoted Sites', N'Sites whose ranks will be demoted in click-distance calculation.', N'shared', 0, NULL, 1, N'system', 3
END
GO

DROP PROC dbo.proc_MSS_AddScopeWithID

SET IDENTITY_INSERT dbo.MSSScopes OFF
Note For non-English installations, you must manually rename the scope name.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

APPLIES TO
  • Microsoft Office SharePoint Server 2007
Keywords: 
kbexpertiseinter kbqfe kbfix kbsurveynew kbprb KB968094
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate