In this post we will discuss how to move site collections to other content databases in SharePoint 2013. Also you can check out:
There might have situation where we need to move site collections to different content database. Suppose the content database grows very large in size (More than 100 GB) then we need to move the site collection to different content data base.
We can move site collection by using PowerShell commands.
But before moving we need to make sure:
- The destination content database must already exist.
- The source content database and destination content database must be located on the same instance of SQL Server.
- The source content database and destination content database must be attached to the same web application.
Below is the PowerShell command to move a single site collection:
First Open SharePoint 2013 Management Shell and then run the below command.
Move-SPSite <http://SiteURL> -DestinationDatabase <DestinationContentDataBaseName>
Here <http://SiteURL> is the name of the site collection.
<DestinationContentDataBaseName> is the name of the destination content database.
PowerShell command to move multiple site collections:
Get-SPSite -ContentDatabase <SourceContentDb> | Move-SPSite -DestinationDatabase <DestinationContentDb>
Here <SourceContentDb> is the name of the original content database.
<DestinationContentDb> is the name of the destination content database.