Split-SPScaleOutDatabase

將分割區的指定百分比從某個向外延展資料庫移至另一個資料庫。

Syntax

Split-SPScaleOutDatabase
     -NewDatabaseName <String>
     -SourceDatabase <SPDatabasePipeBind>
     -SourceServiceApplication <SPServiceApplicationPipeBind>
     [-AssignmentCollection <SPAssignmentCollection>]
     [-Confirm]
     [-MoveLowerHalf]
     [-NewDatabaseCredentials <PSCredential>]
     [-NewDatabaseFailoverServer <String>]
     [-NewDatabaseServer <String>]
     [-SourcePercentage <Int32>]
     [-WhatIf]
     [<CommonParameters>]
Split-SPScaleOutDatabase
     -SourceDatabase <SPDatabasePipeBind>
     -SourceServiceApplication <SPServiceApplicationPipeBind>
     -TargetDatabase <SPDatabasePipeBind>
     [-AssignmentCollection <SPAssignmentCollection>]
     [-Confirm]
     [-MoveLowerHalf]
     [-SourcePercentage <Int32>]
     [-WhatIf]
     [<CommonParameters>]

Description

This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet parameter sets.

使用 Cmdlet Split-SPScaleOutDatabase 將指定的分割區百分比從源資料庫移至現有的目標資料庫,或移至您使用指定參數建立的新資料庫。

如需適用於 SharePoint 產品的 Windows PowerShell 權限及最新資訊,請參閱線上文件 SharePoint Server Cmdlet

範例

---------------範例 1---------------

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

此範例會在指定服務應用程式的 MyDatabaseServer 資料庫伺服器上,建立名為 Database2 的新向外延展資料庫。

此範例也會將 30% 的資料從指定服務應用程式的第一個向外延展資料庫的資料範圍上方移動。

---------------範例 2---------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$newReportingDb = "Search_AnalyticsReporting2"
$reportingDb = Get-SPScaleOutDatabase -SearchApplication $ssa
Split-SPServerScaleOutDatabase -SourceServiceApplication $ssa -SourceDatabase $reportingDb -NewDatabaseName $newReportingDb -SourcePercentage 33

此範例會相應放大搜尋分析資料庫,將 33% 的資料移至新的資料庫。

參數

-AssignmentCollection

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.

When the Global parameter is used, all objects are contained in the global store. 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

-Confirm

在執行命令之前,提示您確認操作。 如需詳細資訊,請輸入下列命令:get-help about_commonparameters

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

-MoveLowerHalf

Specifies whether to move the lower or the upper side of the data range from the source scale-out database. If this parameter is not specified, the default behavior is to move the upper side of the source scale-out database data range.

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

-NewDatabaseCredentials

指定建立向外延展資料庫時要使用的認證。 這些認證將擁有新建立向外延展資料庫的擁有者權利。 如果未提供值,預設會使用目前使用者的認證。

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

-NewDatabaseFailoverServer

Specifies the failover server name of the new scale-out database to be created. If a value is not provided, the new scale-out database does not have a failover server.

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

-NewDatabaseName

指定您要建立的新向外延展資料庫的名稱。

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

-NewDatabaseServer

Specifies the name of the server of the new scale-out database to be created. If a value is not provided, the default database server is used.

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

-SourceDatabase

要移動資料的來源向外延展資料庫。

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

-SourcePercentage

Specifies the percentage of data in the source scale-out database to move. If a value is not provided, the default value of 50 percent is used.

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

-SourceServiceApplication

資料移動作業執行所在的服務應用程式。

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

-TargetDatabase

要移動資料的目標向外延展資料庫。

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

-WhatIf

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters

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