Quantcast
Channel: SharePoint Diary
Viewing all articles
Browse latest Browse all 1058

Move Site Collection to Another Content Database using PowerShell

$
0
0
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.

Solution: 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 new content database with New-SPContentDatabase cmdlet. Next, Run Move-SPSite cmdlet with site collection URL and database name parameters.

Syntax:
Move-SPSite <Site-Collection-URL> –DestinationDatabase "<Database-Name>"
Example:
Move-SPSite "http://intranet.crescent.com/sites/ops" –DestinationDatabase "SP13_Intranet_Content08"
Here is our script in action:
move site collection to another content database sharepoint 2010 using powershell
Tips: To find the current database of the site collection, use: Get-SPSite "Site-collection-url" | Select ContentDatabase

Here is an alternate approach: Move SharePoint Site Collections between Content Databases

Viewing all articles
Browse latest Browse all 1058

Trending Articles