SharePoint – 2019 – Manual Migration of Database

To update the database connections by using Microsoft PowerShell

  1. Start the SharePoint Management Shell.
  2. At the PowerShell command prompt, type the following commands:

Copy

$db = Get-SPDatabase -Identity <guid>

Where <GUID> is the ID of the database that you move.

 Note

Use Get-SPDatabase without parameters to see a list of all databases with GUIDs.Copy

$db.ChangeDatabaseInstance("<DBServerName>")

Where <DBServerName> is the name or alias of the new SQL Server or is the Always On Availability Group listener DNS name.Copy

$db.Update()
  1. If you use SQL Server database mirroring then you must remember to populate the FailoverServiceInstance property on the SharePoint database.

Copy

$db.failoverserviceinstance("<DBServerName>")

Where <DBServerName> is the name or alias of the mirrored SQL Server.Copy

$db.update()
  1. Repeat these steps for all databases that you move, including the Configuration and Central Administration Content databases.

Comments

Leave a Reply

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