SPContentDatabase.Move method (SPContentDatabase, List<SPSite>, Dictionary<String, String>, Dictionary<SPSite, String>)
Moves the specified sites from this content database to the specified content database and optionally specifies the source and destination storage providers.
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Sub Move ( _
destinationDb As SPContentDatabase, _
sitesToMove As List(Of SPSite), _
rbsProviderMap As Dictionary(Of String, String), _
<OutAttribute> ByRef failedSites As Dictionary(Of SPSite, String) _
)
'Usage
Dim instance As SPContentDatabase
Dim destinationDb As SPContentDatabase
Dim sitesToMove As List(Of SPSite)
Dim rbsProviderMap As Dictionary(Of String, String)
Dim failedSites As Dictionary(Of SPSite, String)
instance.Move(destinationDb, sitesToMove, _
rbsProviderMap, failedSites)
public void Move(
SPContentDatabase destinationDb,
List<SPSite> sitesToMove,
Dictionary<string, string> rbsProviderMap,
out Dictionary<SPSite, string> failedSites
)
Parameters
destinationDb
Type: Microsoft.SharePoint.Administration.SPContentDatabaseThe destination content database.
sitesToMove
Type: System.Collections.Generic.List<SPSite>The list of sites to move.
rbsProviderMap
Type: System.Collections.Generic.Dictionary<String, String>The mapping of source to destination providers for remote blob storage for shallow copy. This parameter can be null .
failedSites
Type: System.Collections.Generic.Dictionary<SPSite, String>When this method returns, contains a dictionary of the sites that failed to be moved.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | destinationDb is null . |
SPException | This content database and the destination content database are not on the same server, or not in the same Web application. -or- The destination content database is the current content database. -or- The destination content database is full. |
Remarks
This method moves the specified site collection from this content database to the specified destination content database, using the map specified by the rbsProviderMap parameter that defines the mapping for remote blob storage providers between the source and destination database for the shallow copy operations, and saves the sites failed to be moved in the failedSites parameter.