Split-SPServerScaleOutDatabase
Moves a specified percentage of partitions from one scale-out database to another.
Syntax
NewDatabase
Split-SPServerScaleOutDatabase
-NewDatabaseName <String>
-SourceDatabase <SPDatabasePipeBind>
-SourceServiceApplication <SPServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
[-MoveLowerHalf]
[-NewDatabaseCredentials <PSCredential>]
[-NewDatabaseFailoverServer <String>]
[-NewDatabaseServer <String>]
[-SourcePercentage <Int32>]
[-WhatIf]
[<CommonParameters>]
ExistingDatabase
Split-SPServerScaleOutDatabase
-SourceDatabase <SPDatabasePipeBind>
-SourceServiceApplication <SPServiceApplicationPipeBind>
-TargetDatabase <SPDatabasePipeBind>
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
[-MoveLowerHalf]
[-SourcePercentage <Int32>]
[-WhatIf]
[<CommonParameters>]
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-SPServerScaleOutDatabase 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.
Examples
EXAMPLE
$databases = Get-SPServerScaleOutDatabase -ServiceApplication $serviceApplication
$database = $databases[0]
Split-SPServerScaleOutDatabase -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.
Parameters
-AssignmentCollection
Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
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.
Note: When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Parameter properties
Type: | SPAssignmentCollection |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Confirm
Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-MoveLowerHalf
Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
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.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-NewDatabaseCredentials
Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
Specifies the credentials to use when creating the scale-out database. These credentials will have owner permissions on the new scale-out database. If you do not provide a value, the credentials of the logged on user will be used.
Parameter properties
Type: | PSCredential |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
NewDatabase
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-NewDatabaseFailoverServer
Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
Specifies the failover server name of the new scale-out database. If you do not provide a value, the new scale-out database does not have a failover server.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
NewDatabase
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-NewDatabaseName
Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
Specifies the name of a new scale-out database that you are creating.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
NewDatabase
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-NewDatabaseServer
Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
Specifies the name of the server of the new scale-out database. If you do not provide a value, the name of the default database server is used.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
NewDatabase
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SourceDatabase
Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
The source scale-out database to move data from.
Parameter properties
Type: | SPDatabasePipeBind |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SourcePercentage
Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
Specifies the percentage of data in the source scale-out database to move. If you do not provide a value, the default value, 50 percent, is used.
Parameter properties
Type: | Int32 |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SourceServiceApplication
Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
The service application in which the data move operation will take place.
Parameter properties
Type: | SPServiceApplicationPipeBind |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-TargetDatabase
Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
The target scale-out database to move data to.
Parameter properties
Type: | SPDatabasePipeBind |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ExistingDatabase
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-WhatIf
Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.