Set-SPServerScaleOutDatabaseDataSubRange
建立指定之向外延展資料庫的子範圍。
Syntax
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>]
Description
此 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 參數時,所有物件都會包含在全域存放區中。 若未立即使用物件,或未使用 Stop-SPAssignment 命令處置物件,將會發生記憶體不足的狀況。
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