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
此示例在指定的服务应用程序的第一个扩展数据库上创建一个只读子范围,该范围始于数据范围起始点,结束于数据范围结束点。
参数
-AssignmentCollection
管理对象以便正确进行处理。 使用 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.
Type: | SPAssignmentCollection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-Confirm
提示你在运行 cmdlet 之前进行确认。
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-ConnectionString
指定扩展数据库的连接字符串以创建新的数据子范围。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-Database
指定扩展数据库以创建数据子范围。
Type: | SPDatabasePipeBind |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-IgnoreSubRangePointOnBoundary
指定在新子范围起点和终点相同时是否完成而不出现任何错误。 如果指定此参数,则不显示任何错误。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-IsAzureDatabase
指定数据库是否驻留在 SQL Azure 上。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-IsUpperSubRange
指定是在数据范围的上半部分还是下半部分创建数据子范围。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-Range
指定执行此操作之前扩展数据库的预期当前范围。
Type: | SPScaleOutDataRange |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-SubRangeMode
Type: | SPScaleOutDatabaseSubRangeMode |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-SubRangePoint
指定要按以下条件的定义创建的数据子范围的起始点和结束点:
--如果在数据范围的上半部分创建数据子范围,则为起始点。 --如果在数据范围的下半部分创建数据子范围,则为结束点。
最大值为 NULL。
Type: | Byte[] |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
输入
Microsoft.SharePoint.PowerShell.SPDatabasePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection
输出
System.Object