Moving a SharePoint 2010 Site Collection to another Content Database
March 30, 2010 1 Comment
Moving a Content Database to another Site Collection has never been easier than in PowerShell. Just fire up your PowerShell, add the Snap-In for SharePoint and run Move-SPSite.
PS C:Usersmrhodes> get-help Move-SPSite -full
NAME
Move-SPSiteSYNTAX
Move-SPSite [-Identity] <SPSitePipeBind> -DestinationDatabase <SPContentDatabasePipeBind> [-AssignmentCollection <S
PAssignmentCollection>] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-WarningAction <ActionPreference>] [
-ErrorVariable <String>] [-WarningVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confi
rm]PS C:Usersmrhodes> Move-SPSite -Identity http://mysharepointsite.com.au/sites/user -destinationdatabase WSS-Content-NewUserDB
Confirm
Are you sure you want to perform this action?
Performing operation "Move-SPSite" on Target "http://mysharepointsite.com.au/sites/user".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y
WARNING: IIS must be restarted before this change will take effect. To restart IIS, open a command prompt window and
type iisreset.
And just that easily, my Site Collection has now been moved to a new Content Database!

Pingback: 2010 in review « Mark Rhodes