Skip to content

Instantly share code, notes, and snippets.

@joerodgers
Created October 26, 2017 20:12
Show Gist options
  • Save joerodgers/cc90056a7763a6315b929765de2d1ad0 to your computer and use it in GitHub Desktop.
Save joerodgers/cc90056a7763a6315b929765de2d1ad0 to your computer and use it in GitHub Desktop.
Upgrade SharePoint 2013 Search Analytics Database to SharePoint 2016 Farm
$sa = Get-SPEnterpriseSearchServiceApplication
# show all the scaled out databases
Get-SPServerScaleOutDatabase -ServiceApplication $sa | FT Name, NormalizedDataSource -AutoSize
# add the 2013 analytics database to the 2016 farm
Add-SPServerScaleOutDatabase -ServiceApplication $sa -DatabaseServer "SQL01\SHAREPOINT" -DatabaseName "SP2013_SERVICE_SEARCH_ADMIN_AnalyticsReportingStore"
# get all the scaled out databases
$scaleOutDatabases = Get-SPServerScaleOutDatabase -ServiceApplication $sa
# remove the first scaled out database (big assumption that the first is the default 2016 analytics)
Remove-SPServerScaleOutDatabase -Database $scaleOutDatabases[0] -ServiceApplication $sa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment