共用方式為


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

Description

此 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 參數時,所有物件都會包含在全域存放區中。 若未立即使用物件,或未使用 Stop-SPAssignment 命令處置物件,將會發生記憶體不足的狀況。

參數屬性

類型: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