Split-SPServerScaleOutDatabase

将指定百分比的分区从一个向外扩展数据库移动到另一个向外扩展数据库。

语法

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>]

说明

此 cmdlet 包含多个参数集。 您可以只使用来自一个参数集的参数,也可以不合并来自不同参数集的参数。 有关如何使用参数集的详细信息,请参阅 Cmdlet 参数集

使用 Split-SPServerScaleOutDatabase cmdlet 从源数据库向现有目标数据库或向使用指定参数创建的新数据库中移动指定百分比的分区。

示例

$databases = Get-SPServerScaleOutDatabase -ServiceApplication $serviceApplication
$database = $databases[0]
Split-SPServerScaleOutDatabase -NewDatabaseName Database2 -NewDatabaseServer MyDatabaseServer -SourceDatabase $database -SourceServiceApplication $serviceApplication -SourcePercentage 30

此示例在 MyDatabaseServer 数据库服务器上的给定服务应用程序中创建名为 Database2 的新扩展数据库。 此示例还从给定服务应用程序的第一个扩展数据库的数据范围上限中移动 30% 的数据。

参数

-AssignmentCollection

适用:SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

管理对象以便正确进行处理。 使用 SPWeb 或 SPSite 等对象可能会耗用大量内存,而且在 Windows PowerShell 脚本中使用这些对象需要正确管理内存。 通过使用 SPAssignment 对象,可以将对象分配给变量,然后在不需要这些对象时对它们进行处理,以释放内存。 在使用 SPWeb、SPSite 或 SPSiteAdministration 对象时,如果不使用分配集合或 Global 参数,则会自动处理这些对象。

注意:使用 Global 参数时,所有对象都包含在全局存储中。 If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

参数属性

类型:SPAssignmentCollection
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Confirm

适用:SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

提示你在运行 cmdlet 之前进行确认。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:cf

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-MoveLowerHalf

适用:SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定是从源向外扩展数据库中移动数据范围的下半部分还是上半部分。 如果未指定此参数,则默认行为是移动源向外扩展数据库数据范围的上半部分。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-NewDatabaseCredentials

适用:SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定在创建扩展数据库时要使用的凭据。 这些凭据在新的扩展数据库上将具有所有者权限。 如果未提供值,将使用登录用户的凭证。

参数属性

类型:PSCredential
默认值:None
支持通配符:False
不显示:False

参数集

NewDatabase
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-NewDatabaseFailoverServer

适用:SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定新扩展数据库的故障转移服务器名称。 如果未提供值,则新的扩展数据库将不具有故障转移服务器。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

NewDatabase
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-NewDatabaseName

适用:SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定要创建的新扩展数据库的名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

NewDatabase
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-NewDatabaseServer

适用:SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定新扩展数据库的服务器名称。 如果未提供值, 将使用默认数据库服务器名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

NewDatabase
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-SourceDatabase

适用:SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

要从中移动数据的源扩展数据库。

参数属性

类型:SPDatabasePipeBind
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-SourcePercentage

适用:SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定要移动的源扩展数据库的数据百分比。 如果未提供值,则使用默认值 50%。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-SourceServiceApplication

适用:SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

将在其中执行数据移动操作的服务应用程序。

参数属性

类型:SPServiceApplicationPipeBind
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-TargetDatabase

适用:SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

要向其中移动数据的目标扩展数据库。

参数属性

类型:SPDatabasePipeBind
默认值:None
支持通配符:False
不显示:False

参数集

ExistingDatabase
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-WhatIf

适用:SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

显示在 cmdlet 运行时发生的情况。 此 cmdlet 未运行。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:无线

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters

输入

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

输出

System.Object