none
Problem after upgrade... SPSearchDatabase Database is too old and upgrade is required

    Question

  • I upgraded to latest SP and ran PSConfig.exe after upgrade. 

    I am now getting an error in event viewer every 15 min that says... "

    The mount operation for the gatherer application 1cb8b129-ff94-42e4-a0d8-899946cf5b7e has failed because the schema version of the search administration database is less than the minimum backwards compatibility schema version supported for this gatherer application. The database might not have been upgraded."

    I found solution to run (get-spserver $env:computername).NeedsUpgrade, it returns "false". The solution goes on to say...  If the result is False then no further action is needed, if you are encountering similar events the cause will most likely not be resolved by the following steps.

    When I go to Central Admin > Manage Databases UPgrade Status it clearly says... SPSearchDatabase Database is too old and upgrade is required.

    I found a lot of information when (get-spserver $env:computername).NeedsUpgrade returns true but cannot find any information about what to do when it returns "false".

    Please help.

    Tuesday, April 10, 2012 6:56 PM

Answers

  • Hi,

    It seems to be your SharePoint Server farm is fine.When farm status says "Upgrade Available" its related to WFE,hotfix and patches not on your SQL Server.
    Please run the "Upgrade Advisor" on SQL Server to see any upgrade required.

    If you have the problem with only on "Search Database" then it have been migrated from the lower version on SharePoint.I would suggest you to gradual upgrade on this DB.I mean if it is SQL 2000 upgrade to SQL 2005 by simply restoring the.bak file on SQL Server 2005 and so on upto SQL Server 2008.


    Murugesa Pandian.,MCTS|App.Devleopment|Configure

    Wednesday, April 11, 2012 2:56 AM
  • Yes, and it has following GUID... WSS_Search_dccdsp2010    b6f30f6d-7399-4998-b662-a2c12efb099f

    Running PS C:\Windows\system32> $olddb = Get-SPContentDatabase b6f30f6d-7399-4998-b662-a
    2c12efb099f

    Returns error...

    Get-SPContentDatabase : The content database could not be found.
    At line:1 char:31
    + $olddb = Get-SPContentDatabase <<<<  b6f30f6d-7399-4998-b662-a2c12efb099f
        + CategoryInfo          : InvalidData: (Microsoft.Share...ContentDatabase:
       SPCmdletGetContentDatabase) [Get-SPContentDatabase], SPException
        + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletGetConte
       ntDatabase

    Sorry, I made a typo with the script. That should have been Get-SPDatabase, and not Get-SPContentDatabase. I've updated it above, please try again with the correct cmdlet!

    Jason Warren
    Infrastructure Specialist
    Habañero Consulting Group
    www.habaneros.com/blog

    Tuesday, April 17, 2012 11:01 PM

All replies

  • That command is checking to see if the server you are currently logged onto requires an upgrade. Instead, you need to check the Search Administration database.

    Try running this PowerShell script from a SharePoint Management Console (assumes you have only one Search Service Application):

    $search = Get-SPServiceApplication | where {$_.TypeName -eq "Search Service Application"}
    $search.SearchAdminDatabase.NeedsUpgrade

    Does this return True or False?


    Jason Warren
    Infrastructure Specialist
    Habañero Consulting Group
    www.habaneros.com/blog

    Tuesday, April 10, 2012 7:48 PM
  • Running your script did not return anything. No errors, just returned me back to the prompt.

    I ran stsadm.exe -o localupgradestatus and received below results...

    [6] content database(s) encountered.
    [0] content database(s) still need upgrade or cannot be upgraded.
    [15] site collection(s) are contained in the content databases.
    [0] site collection(s) still need upgrade.
    [92] other objects encountered, [1] of them still need upgrade or cannot be upgr
    aded.

    Also, when I go to Central Admin > Servers in Farm under Status, it says "Upgrade Available".

    Tuesday, April 10, 2012 11:20 PM
  • That nothing was returned suggest to me that $search was not assigned a Search Service Application instance. If you do a plain Get-SPServiceApplication, is there a Search Service Application returned?

    Jason Warren
    Infrastructure Specialist
    Habañero Consulting Group
    www.habaneros.com/blog

    Tuesday, April 10, 2012 11:27 PM
  • Hi,

    It seems to be your SharePoint Server farm is fine.When farm status says "Upgrade Available" its related to WFE,hotfix and patches not on your SQL Server.
    Please run the "Upgrade Advisor" on SQL Server to see any upgrade required.

    If you have the problem with only on "Search Database" then it have been migrated from the lower version on SharePoint.I would suggest you to gradual upgrade on this DB.I mean if it is SQL 2000 upgrade to SQL 2005 by simply restoring the.bak file on SQL Server 2005 and so on upto SQL Server 2008.


    Murugesa Pandian.,MCTS|App.Devleopment|Configure

    Wednesday, April 11, 2012 2:56 AM
  • Yes, I have 2 Search Service Applications returned when running  Get-SPServiceApplication

    DisplayName          TypeName             Id
    -----------          --------             --
    CollegeoftheDeser... Search Service Ap... e822f037-44c4-4431-9958-5687d5f0f343
    PortalSearch         Search Service Ap... a51224fc-a9ce-47c1-9ef5-870daf309990

    Wednesday, April 11, 2012 4:32 PM
  • Yes, I have 2 Search Service Applications returned when running  Get-SPServiceApplication

    DisplayName          TypeName             Id
    -----------          --------             --
    CollegeoftheDeser... Search Service Ap... e822f037-44c4-4431-9958-5687d5f0f343
    PortalSearch         Search Service Ap... a51224fc-a9ce-47c1-9ef5-870daf309990

    OK. Try this instead:

    $search = Get-SPServiceApplication | where {$_.TypeName -eq "Search Service Application"}
    
    foreach ($instance in $search) {
    	$instance.SearchAdminDatabase.Name
    	$instance.SearchAdminDatabase.NeedsUpgrade
    }


    Jason Warren
    Infrastructure Specialist
    Habañero Consulting Group
    www.habaneros.com/blog


    Wednesday, April 11, 2012 4:54 PM
  • CollegeoftheDesert_edu_DB_12c51fd9274b4d86a75aaef7c989152b
    False
    PortalSearch_DB_550d399985cb440f9fb92cea83b3ae35
    False

    Ok, I think I'm starting to see my problem. The DB that needs updated is called WSS_Search_dccdsp2010 (WSS_Search_dccdsp2010 SPSearchDatabase Database is too old and upgrade is required).

    I think this is an old database that is not being used. I think it was part of the initial installation. From there I created 2 different Search Services for each of my 2 Web Applications. When I look at the Topology under Databases, neither of my Search Services are using the DB WSS_Search_dccdsp2010.

    Should I try to upgrade it or simply delete db WSS_Search_Dccdsp2010? Where in SharePoint is it referencing this database? I think I may have deleted the Service Application a long time ago but I guess the database was not deleted.

    Wednesday, April 11, 2012 6:06 PM
  • I don't recommend deleting it until we know how it's being used in the farm.

    Run the Get-SPDatabase cmdlet, is WSS_Search_dccdsp2010 returned?

    Assuming it is, if you copy the GUID for the DB from Get-SPDatabase's output, you can run the following to get the type of database (so its purpose) and whether it needs to be upgraded (hopefully now we see a True result):

    $olddb = Get-SPDatabase <Paste GUID here>
    $olddb.Type $olddb.NeedsUpgrade




    Jason Warren
    Infrastructure Specialist
    Habañero Consulting Group
    www.habaneros.com/blog






    • Edited by Jason WarrenMVP Tuesday, April 17, 2012 11:00 PM fixed cmdlet from Get-SPContentDatabase to Get-SPDatabase
    Wednesday, April 11, 2012 6:12 PM
  • Yes, and it has following GUID... WSS_Search_dccdsp2010    b6f30f6d-7399-4998-b662-a2c12efb099f

    Running PS C:\Windows\system32> $olddb = Get-SPContentDatabase b6f30f6d-7399-4998-b662-a
    2c12efb099f

    Returns error...

    Get-SPContentDatabase : The content database could not be found.
    At line:1 char:31
    + $olddb = Get-SPContentDatabase <<<<  b6f30f6d-7399-4998-b662-a2c12efb099f
        + CategoryInfo          : InvalidData: (Microsoft.Share...ContentDatabase:
       SPCmdletGetContentDatabase) [Get-SPContentDatabase], SPException
        + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletGetConte
       ntDatabase

    Wednesday, April 11, 2012 7:03 PM
  • The same error for me.

    Get-SPContentDatabase : The content database could not be found.
    At line:1 char:31
    + $olddb = Get-SPContentDatabase <<<<  a0c4f551-c676-410c-b890-d3adeba97daa
        + CategoryInfo          : InvalidData: (Microsoft.Share...ContentDatabase:SPCmdletGetContentDatabase) [Get-SPContentDatabase], SPException
        + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletGetContentDatabase

    Tuesday, April 17, 2012 10:49 PM
  • Yes, and it has following GUID... WSS_Search_dccdsp2010    b6f30f6d-7399-4998-b662-a2c12efb099f

    Running PS C:\Windows\system32> $olddb = Get-SPContentDatabase b6f30f6d-7399-4998-b662-a
    2c12efb099f

    Returns error...

    Get-SPContentDatabase : The content database could not be found.
    At line:1 char:31
    + $olddb = Get-SPContentDatabase <<<<  b6f30f6d-7399-4998-b662-a2c12efb099f
        + CategoryInfo          : InvalidData: (Microsoft.Share...ContentDatabase:
       SPCmdletGetContentDatabase) [Get-SPContentDatabase], SPException
        + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletGetConte
       ntDatabase

    Sorry, I made a typo with the script. That should have been Get-SPDatabase, and not Get-SPContentDatabase. I've updated it above, please try again with the correct cmdlet!

    Jason Warren
    Infrastructure Specialist
    Habañero Consulting Group
    www.habaneros.com/blog

    Tuesday, April 17, 2012 11:01 PM
  • I think I am almost there. I am now getting "True".

    PS C:\Windows\system32> $olddb = Get-SpDatabase b6f30f6d-7399-4998-b662-a2c12efb
    099f
    PS C:\Windows\system32> $olddb.Type
    Microsoft.SharePoint.Search.Administration.SPSearchDatabase
    PS C:\Windows\system32> $olddb.NeedsUpgrade
    True

    Where do I go from here?

    Thursday, May 03, 2012 3:16 PM
  • I think I am almost there. I am now getting "True".

    PS C:\Windows\system32> $olddb = Get-SpDatabase b6f30f6d-7399-4998-b662-a2c12efb
    099f
    PS C:\Windows\system32> $olddb.Type
    Microsoft.SharePoint.Search.Administration.SPSearchDatabase
    PS C:\Windows\system32> $olddb.NeedsUpgrade
    True

    Where do I go from here?

    The SPDatabase.Upgrade() method should do the trick:

    $olddb = Get-SpDatabase b6f30f6d-7399-4998-b662-a2c12efb099f
    $olddb.Upgrade()

    And then get the database and check if it needs to be upgraded again:

    $olddb = Get-SpDatabase b6f30f6d-7399-4998-b662-a2c12efb099f
    $olddb.NeedsUpgrade


    Jason Warren
    Infrastructure Specialist
    Habañero Consulting Group
    www.habaneros.com/blog

    • Proposed as answer by weigh2tall Thursday, January 24, 2013 2:04 PM
    Thursday, May 03, 2012 3:33 PM
  • I'm doing something wrong. I am getting error...

    PS C:\Windows\system32> $olddb = Get-SpDatabase b6f30f6d-7399-4998-b662-a2c12efb
    099f
    PS C:\Windows\system32> $olddb.Upgrade()
    Exception calling "Upgrade" with "0" argument(s): "The global session cannot be
     used to perform an upgrade operation."
    At line:1 char:15
    + $olddb.Upgrade <<<< ()
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : DotNetMethodException

    PS C:\Windows\system32>

    Friday, May 04, 2012 5:56 PM
  • I think my problem is almost solved. Can you please help me with this last error?

    When I try to run $olddb.Upgrade() as instructed, I get the following message...

    PS C:\Windows\system32> $olddb = Get-SpDatabase b6f30f6d-7399-4998-b662-a2c12efb
    099f
    PS C:\Windows\system32> $olddb.Upgrade()
    Exception calling "Upgrade" with "0" argument(s): "The global session cannot be
    used to perform an upgrade operation."
    At line:1 char:15
    + $olddb.Upgrade <<<< ()
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : DotNetMethodException

    PS C:\Windows\system32>

    Tuesday, May 08, 2012 4:39 PM
  • I think my problem is almost solved. Can you please help me with this last error?


    Exception calling "Upgrade" with "0" argument(s): "The global session cannot be
    used to perform an upgrade operation."

    I honestly have no idea what this means and a quick search doesn't seem to provide any insight either.  If I had to guess, this database needs to be updated as a part of a SP or CU update as opposed to trying to update it directly.

    You originally wrote:

    I found a lot of information when (get-spserver $env:computername).NeedsUpgrade returns true but cannot find any information about what to do when it returns "false".

    What was the information you found when the result is true?

    My only other thoughts at this point are:

    1. Force an upgrade with psconfig -cmd upgrade -inplace b2b -wait -force
    2. Recreate the search service application. 

    My recommendation would be #2, only because I can't say for sure that forcing the upgrade will work. If this was happening in a test environment it might be worth doing. The biggest issue with doing the second option would be having to recreate your search configuration. This could be a big deal if there are lots of customizations (properties, scopes, etc)


    Jason Warren
    Infrastructure Specialist

    Thursday, May 10, 2012 10:28 PM
  • Thanks for trying and thank you for getting me to this point.

    Marc

    Monday, May 14, 2012 5:42 PM