Migrate SharePoint 2010 Search Service Application to SharePoint 2013 – The Fineprints

Hi Guys,
In this post I would like to share about how to migrate an existing SharePoint 2010 Search Service application to SharePoint 2013 Search with specific Index location.The requirements for doing so could be –

  • You are doing an as-is migration, in this case migrated sites in SP 2013 looks and behaves same as SP 2010. Some organizations go for this option to quickly move to SP 2013 and then update their’s sites UI to 2013 interface gradually, site by site
  • You want to keep using already created search scopes/content sources/crawl schedules etc in SP 2010 Search Service Application in you SP 2013 farm.

Because Search in SP 2013 includes some more components (because of integrated FAST) than SP 2010, it’s better and preferable to create the new Search Service using PowerShell.

I’ll use an example of a medium farm with 4 SharePoint server – 2 Web Front End servers and 2 Application Servers.

So, lets get started-

  • Backup the Search Service Application admin database from SharePoint 2010 environment and restore on SharePoint 2013 database server, preferably by the name as “Search Service Application_ AdminDB”
  • Now, login to your SharePoint 2013 App server, and create the application pool to be used in Search Service Application
    • New-SPServiceApplicationPool -Name SPSearchServiceAppPool -Account
    • $appPool = Get-SPServiceApplicationPool -Identity “SPSearchServiceAppPool”
  •  Now connect to local Search Instance and Create a New Search Service Application by suing the restored admin DB
    • $searchInst = Get-SPEnterpriseSearchServiceInstance -local
    • Restore-SPEnterpriseSearchServiceApplication -Name “Search Service Application” -applicationpool $appPool -databasename “Search Service Application_AdminDB” -databaseserver “SP2013DB_P_ALIAS” -AdminSearchServiceInstance $searchInst
  • It will take some time 5-10 mins to get this completed
  • Once completed, use the following command to get the instance of the same
    • $ssa = Get-SPEnterpriseSearchServiceApplication -Identity “Search Service Application”
  • Create a Search Service Application Proxy
    • New-SPEnterpriseSearchServiceApplicationProxy -Name “Search Service Application” -SearchApplication $ssa
  • Now, that we have the SSA created, it’s time to set the topology correct
    • $hostA = Get-SPEnterpriseSearchServiceInstance -Identity “”
    • $hostB = Get-SPEnterpriseSearchServiceInstance -Identity “”
    • $hostC = Get-SPEnterpriseSearchServiceInstance -Identity “”
    • $hostD = Get-SPEnterpriseSearchServiceInstance -Identity “”
  • Start the Search Service Instances on all Servers
    • Start-SPEnterpriseSearchServiceInstance -Identity $hostA
    • Start-SPEnterpriseSearchServiceInstance -Identity $hostB
    • Start-SPEnterpriseSearchServiceInstance -Identity $hostC
    • Start-SPEnterpriseSearchServiceInstance -Identity $hostD
  • Wait for some time to let the process get completed, check if status is online
    • Get-SPEnterpriseSearchServiceInstance -Identity $hostA
    • Get-SPEnterpriseSearchServiceInstance -Identity $hostB
    • Get-SPEnterpriseSearchServiceInstance -Identity $hostC
    • Get-SPEnterpriseSearchServiceInstance -Identity $hostD
  • Once the status is online on all the servers
    • $ssa = Get-SPEnterpriseSearchServiceApplication -Identity “Search Service Application”
    • $newTopology = New-SPEnterpriseSearchTopology -SearchApplication $ssa
  • Set the topology by defining which service runs on which server, I prefer Indexing and Query services on WFEs and all other services on APP servers. This configuration ensures, that users queries are served directly from WFEs itself
    • New-SPEnterpriseSearchAdminComponent -SearchTopology $newTopology -SearchServiceInstance $hostC
    • New-SPEnterpriseSearchCrawlComponent -SearchTopology $newTopology -SearchServiceInstance $hostC
    • New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostC
    • New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostC
    • New-SPEnterpriseSearchAdminComponent -SearchTopology $newTopology -SearchServiceInstance $hostD
    • New-SPEnterpriseSearchCrawlComponent -SearchTopology $newTopology -SearchServiceInstance $hostD
    • New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostD
    • New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostD
    • New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostA
    • New-SPEnterpriseSearchIndexComponent -SearchTopology $newTopology -SearchServiceInstance $hostA -IndexPartition 0 –RootDirectory “D:SharePointIndex”
    • New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostB
    • New-SPEnterpriseSearchIndexComponent -SearchTopology $newTopology -SearchServiceInstance $hostB -IndexPartition 0 –RootDirectory “D:SharePointIndex”
  • The switch -RootDirectory is used to change the default Index location. It is recommended to keep it out of the system drive.
  • Now, just change to this new topology
    • Set-SPEnterpriseSearchTopology -Identity $newTopology
    • Get-SPEnterpriseSearchTopology -SearchApplication $ssa
  • Let it complete, you can see the progress in Search Administration page in Central administration.
  • Will take around 10-15 mins and we are done !!!
I would just like to add a note about why did I ask to restore the Search Service Admin DB with the name of Search Service Application_AdminDB. This is just to maintain the consistency in nomenclature.
Once the new SSA is created, it will create 3 more databases using the name of your Search Service Application like –
  • Search Service Application_CrawlDB
  • Search Service Application_AnalyticsReportingDB
  • Search Service Application_LinksDB
I hope this helps 🙂

You may also like

1 comment

  1. I am experiencing the issue while restore search admindb

    Restore-SPEnterpriseSearchServiceApplication : Action 15.0.9.0 of Microsoft.Office.Server.Search.Upgrade.SearchAdminDatabaseSequence failed.
    At D:\Temp-Kesa\Scrips\Search-ServiceAapplication.ps1:17 char:1

Leave a Reply

Your email address will not be published. Required fields are marked *