Set-SPServerScaleOutDatabaseDataSubRange

为指定的扩展数据库创建子范围。

语法

Set-SPServerScaleOutDatabaseDataSubRange
   -ConnectionString <String>
   -IsUpperSubRange <Boolean>
   -Range <SPScaleOutDataRange>
   -SubRangeMode <SPScaleOutDatabaseSubRangeMode>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   [-IgnoreSubRangePointOnBoundary]
   [-IsAzureDatabase]
   [-SubRangePoint <Byte[]>]
   [-WhatIf]
   [<CommonParameters>]
Set-SPServerScaleOutDatabaseDataSubRange
   -Database <SPDatabasePipeBind>
   -IsUpperSubRange <Boolean>
   -Range <SPScaleOutDataRange>
   -SubRangeMode <SPScaleOutDatabaseSubRangeMode>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   [-IgnoreSubRangePointOnBoundary]
   [-SubRangePoint <Byte[]>]
   [-WhatIf]
   [<CommonParameters>]

说明

此 cmdlet 包含多个参数集。 您可以只使用来自一个参数集的参数,也可以不合并来自不同参数集的参数。 有关如何使用参数集的详细信息,请参阅 [Cmdlet 参数集] (https://msdn.microsoft.com/library/dd878348(VS.85).aspx)。

示例

--------------------示例---------------------

$databases = Get-SPServerScaleOutDatabase -ServiceApplication $serviceApplication
$database = $databases[0]
$state = Get-SPServerScaleOutDatabaseDataState -Database $database
Set-SPServerScaleOutDatabaseDataSubRange -Database $database -Range $state.Range -SubRangePoint $state.Range.RangeEnd -SubRangeMode ReadOnly -IsUpperSubRange $false

此示例在指定的服务应用程序的第一个扩展数据库上创建一个只读子范围,该范围始于数据范围起始点,结束于数据范围结束点。

参数

-Confirm

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

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-ConnectionString

指定扩展数据库的连接字符串以创建新的数据子范围。

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Database

指定扩展数据库以创建数据子范围。

Type:SPDatabasePipeBind
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-IgnoreSubRangePointOnBoundary

指定如果新子范围的起始点和终点相同,是否完成而不发生任何错误。 如果指定此参数,则不显示任何错误。

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-IsAzureDatabase

指定数据库是否驻留在 SQL Azure 上。

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-IsUpperSubRange

指定是在数据范围的上半部分还是下半部分创建数据子范围。

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Range

指定执行此操作之前扩展数据库的预期当前范围。

Type:SPScaleOutDataRange
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-SubRangeMode

Type:SPScaleOutDatabaseSubRangeMode
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-SubRangePoint

指定要按以下条件的定义创建的数据子范围的起始点和结束点:

--如果在数据范围的上半部分创建数据子范围,则为起始点。 --如果在数据范围的下半部分创建数据子范围,则为结束点。

最大值为 NULL。

Type:Byte[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to: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.

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

Type:SPAssignmentCollection
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

输入

Microsoft.SharePoint.PowerShell.SPDatabasePipeBind

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

输出

System.Object