Add-SPServerScaleOutDatabase

將現有的向外延展內容資料庫新增到指定的服務應用程式。

Syntax

Add-SPServerScaleOutDatabase
   -DatabaseName <String>
   -ServiceApplication <SPServiceApplicationPipeBind>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   [-DatabaseCredentials <PSCredential>]
   [-DatabaseFailoverServer <String>]
   [-DatabaseServer <String>]
   [-WhatIf]
   [-DeferUpgradeActions]
   [<CommonParameters>]

Description

使用 Add-SPServerScaleOutDatabase Cmdlet,使用 ServiceApplication 參數將現有的向外延展資料庫新增至指定的服務應用程式,或建立新的向外延展資料庫,並將它新增至指定的服務應用程式。

範例

-------------範例------------

$serviceApplication = Get-SPServiceApplication -Name "AppManagement"
Add-SPServerScaleOutDatabase -ServiceApplication $serviceApplication

此範例會將新的或現有的向外延展資料庫加入特定的服務應用程式。

參數

-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

-DatabaseCredentials

指定要新增至服務應用程式之向外延展資料庫的擁有者認證。

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

-DatabaseFailoverServer

要加入之向外延展資料庫的容錯移轉伺服器名稱。

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

-DatabaseName

指定要新增至指定服務應用程式的資料庫名稱。

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

-DatabaseServer

The name of the server hosting the scale-out database to be added. If a value is not provided, the default database server will be used.

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

-DeferUpgradeActions

指定升級動作是否在升級程式期間延遲。

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

-ServiceApplication

指定向外延展資料庫的服務應用程式。

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

-WhatIf

顯示訊息會描述命令的功效而不執行命令。 如需詳細資訊,請輸入下列命令: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

輸入

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

輸出

系統.物件