Renaming SharePoint 2013 Search databases

 If you have had trouble moving your SharePoint 2013 Search Databases using the TechNet article below. 
  
 Move the Search service application databases in SharePoint 2013

This article may help.

First: The original databases need to be online with their original names for these PowerShell scripts to work. The only way to get this to work is to backup each database and restore them as new databases with the new names. Then you can run the PowerShell scripts to allow the Search service to use the new databases.

Second: Step 6 has some typos in it.

$LinksDatabase0 = ([array]($searchApp | Get-SPEnterpriseSearchLinksDatabase))[0]

$LinksDatabase0 | Set-SPEnterpriseSearchLinkDatabase [-DatabaseName "<NewDbName>"] -DatabaseServer "<NewServerName>"

  • Set-SPEnterpriseSearchLinkDatabase is not a valid commandlet. 

    Set-SPEnterpriseSearchLinksDatabase is the correct commandlet. Links is plural.

  • $searchApp variable has not been declared. $ssa is the variable that needs to be used for consistency .

Making these changes should make the database move work.