Split-SPScaleOutDatabase
Published: July 16, 2012
Applies to: SharePoint Foundation 2013 | SharePoint Server 2013 Enterprise
Moves a specified percentage of partitions from one scale-out database to another.
Split-SPScaleOutDatabase -NewDatabaseName <String> -SourceDatabase <SPDatabasePipeBind> -SourceServiceApplication <SPServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-MoveLowerHalf <SwitchParameter>] [-NewDatabaseCredentials <PSCredential>] [-NewDatabaseFailoverServer <String>] [-NewDatabaseServer <String>] [-SourcePercentage <Int32>] [-WhatIf [<SwitchParameter>]]
Split-SPScaleOutDatabase -SourceDatabase <SPDatabasePipeBind> -SourceServiceApplication <SPServiceApplicationPipeBind> -TargetDatabase <SPDatabasePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-MoveLowerHalf <SwitchParameter>] [-SourcePercentage <Int32>] [-WhatIf [<SwitchParameter>]]
Parameters
1| Parameter | Required | Type | Description | ||
| NewDatabaseName | Required | System.String | Specifies the name of a new scale-out database that you are creating. | ||
| SourceDatabase | Required | Microsoft.SharePoint.PowerShell.SPDatabasePipeBind | The source scale-out database to move data from. | ||
| SourceServiceApplication | Required | Microsoft.SharePoint.PowerShell.SPServiceApplicationPipeBind | The service application in which the data move operation will take place. | ||
| AssignmentCollection | Optional | Microsoft.SharePoint.PowerShell.SPAssignmentCollection | Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.
| ||
| Confirm | Optional | System.Management.Automation.SwitchParameter | Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters | ||
| MoveLowerHalf | Optional | System.Management.Automation.SwitchParameter | Specifies whether to move the lower or the upper side of the data range from the source scale-out database. If this parameter is not specified, the default behavior is to move the upper side of the source scale-out database data range. | ||
| NewDatabaseCredentials | Optional | System.Management.Automation.PSCredential | Specifies the credentials to use when creating the scale-out database. These credentials will have owner rights on the newly created scale-out database. If a value is not provided, the current user’s credentials will be used by default. | ||
| NewDatabaseFailoverServer | Optional | System.String | Specifies the failover server name of the new scale-out database to be created. If a value is not provided, the new scale-out database does not have a failover server. | ||
| NewDatabaseServer | Optional | System.String | Specifies the name of the server of the new scale-out database to be created. If a value is not provided, the default database server is used. | ||
| SourcePercentage | Optional | System.Int32 | Specifies the percentage of data in the source scale-out database to move. If a value is not provided, the default value of 50 percent is used. | ||
| WhatIf | Optional | System.Management.Automation.SwitchParameter | Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters |
| Parameter | Required | Type | Description | ||
| SourceDatabase | Required | Microsoft.SharePoint.PowerShell.SPDatabasePipeBind | The source scale-out database to move data from. | ||
| SourceServiceApplication | Required | Microsoft.SharePoint.PowerShell.SPServiceApplicationPipeBind | The service application in which the data move operation will take place. | ||
| TargetDatabase | Required | Microsoft.SharePoint.PowerShell.SPDatabasePipeBind | The target scale-out database to move data to. | ||
| AssignmentCollection | Optional | Microsoft.SharePoint.PowerShell.SPAssignmentCollection | Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.
| ||
| Confirm | Optional | System.Management.Automation.SwitchParameter | Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters | ||
| MoveLowerHalf | Optional | System.Management.Automation.SwitchParameter | Specifies whether to move the lower or the upper side of the data range from the source scale-out database. If this parameter is not specified, the default behavior is to move the upper side of the source scale-out database data range. | ||
| SourcePercentage | Optional | System.Int32 | Specifies the percentage of data in the source scale-out database to move. If a value is not provided, the default value of 50 percent is used. | ||
| WhatIf | Optional | System.Management.Automation.SwitchParameter | Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters |
Detailed Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet Parameter Sets.
Use the Split-SPScaleOutDatabase cmdlet to move a specified percentage of partitions from a source database to an existing target database or to a new database that you create with the specified parameters.
Input Types
Return Types
---------------EXAMPLE---------------
$databases = Get-SPScaleOutDatabase -ServiceApplication $serviceApplication
database = $databases[0]
Split-SPScaleOutDatabase -NewDatabaseName Database2 -NewDatabaseServer MyDatabaseServer -SourceDatabase $database -SourceServiceApplication $serviceApplication -SourcePercentage 30
This example creates a new scale-out database named Database2 on the MyDatabaseServer database server in the given service application. The example also moves 30 percent of the data from the upper side of the data range in the first scale-out database of the given service application.
Change History
| Date | Description |
|---|---|
| July 16, 2012 | Initial publication |

Note: