Move Site Collection to Another Content Database using PowerShell
Requirement: Found a SharePoint Site collection growing in size over a period of time and wanted to move the SharePoint 2013 site collection to another content database.
Use the PowerShell Cmdlet Move-SPSite to move site collection from one content database to another. Here is how: First, identify the target content database to move your site collection. You can create a new content database with the New-SPContentDatabase cmdlet.
Next, Run the Move-SPSite cmdlet with site collection URL and database name parameters.
Move-SPSite <Site-Collection-URL> -DestinationDatabase "<Database-Name>"
Move-SPSite "https://intranet.crescent.com/sites/ops" -DestinationDatabase "SP13_Intranet_Content08"
Here is our script in action:
3 thoughts on “Move Site Collection to Another Content Database using PowerShell”
Move-SPsite command throws Execution Timeout error after 3 hours in production. Source site size is 65 GB and when tested in test server move-spsite works perfectly fine. Not sure what’s causing this issue of timeout. Please advise.
Even I experienced this for large sites, So I ended up site backup-restore to new database!
While moving we are getting timeout error site with size 130 GB and above, what can be done over here?
How to avoid timeout error, We tried web.config solution but didn’t work fr us.