Skip to content

Latest commit

 

History

History
313 lines (228 loc) · 8.78 KB

File metadata and controls

313 lines (228 loc) · 8.78 KB
external help file Microsoft.SharePoint.PowerShell.dll-help.xml
Module Name SharePointServer
online version https://learn.microsoft.com/powershell/module/sharepoint-server/split-spscaleoutdatabase
applicable SharePoint Server Subscription Edition
title Split-SPScaleOutDatabase
schema 2.0.0

Split-SPScaleOutDatabase

SYNOPSIS

Moves a specified percentage of partitions from one scale-out database to another.

SYNTAX

NewDatabase

Split-SPScaleOutDatabase -NewDatabaseName <String> -SourceDatabase <SPDatabasePipeBind>
 -SourceServiceApplication <SPServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
 [-Confirm] [-MoveLowerHalf] [-NewDatabaseCredentials <PSCredential>] [-NewDatabaseFailoverServer <String>]
 [-NewDatabaseServer <String>] [-SourcePercentage <Int32>] [-WhatIf] [<CommonParameters>]

ExistingDatabase

Split-SPScaleOutDatabase -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-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.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at SharePoint Server Cmdlets.

EXAMPLES

EXAMPLE 1

$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% of the data from the upper side of the data range in the first scale-out database of the given service application.

EXAMPLE 2

$ssa = Get-SPEnterpriseSearchServiceApplication
$newReportingDb = "Search_AnalyticsReporting2"
$reportingDb = Get-SPScaleOutDatabase -SearchApplication $ssa
Split-SPServerScaleOutDatabase -SourceServiceApplication $ssa -SourceDatabase $reportingDb -NewDatabaseName $newReportingDb -SourcePercentage 33

This example scales out the Search Analytics database, moving 33% of data to the new databases.

PARAMETERS

-NewDatabaseName

Applicable: SharePoint Server Subscription Edition

Specifies the name of a new scale-out database that you are creating.

Type: String
Parameter Sets: NewDatabase
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceDatabase

Applicable: SharePoint Server Subscription Edition

The source scale-out database to move data from.

Type: SPDatabasePipeBind
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceServiceApplication

Applicable: SharePoint Server Subscription Edition

The service application in which the data move operation will take place.

Type: SPServiceApplicationPipeBind
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetDatabase

Applicable: SharePoint Server Subscription Edition

The target scale-out database to move data to.

Type: SPDatabasePipeBind
Parameter Sets: ExistingDatabase
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection

Applicable: SharePoint Server Subscription Edition

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.

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.

Type: SPAssignmentCollection
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm

Applicable: SharePoint Server Subscription Edition

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MoveLowerHalf

Applicable: SharePoint Server Subscription Edition

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.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewDatabaseCredentials

Applicable: SharePoint Server Subscription Edition

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.

Type: PSCredential
Parameter Sets: NewDatabase
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewDatabaseFailoverServer

Applicable: SharePoint Server Subscription Edition

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.

Type: String
Parameter Sets: NewDatabase
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewDatabaseServer

Applicable: SharePoint Server Subscription Edition

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.

Type: String
Parameter Sets: NewDatabase
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourcePercentage

Applicable: SharePoint Server Subscription Edition

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.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Applicable: SharePoint Server Subscription Edition

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

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

NOTES

RELATED LINKS

Add-SPScaleOutDatabase

Get-SPScaleOutDatabase

Remove-SPScaleOutDatabase