Set-SPAccessServicesDatabaseServer
設定與裝載 Access Services 資料庫之資料庫伺服器相關聯的參數。
Syntax
Set-SPAccessServicesDatabaseServer
[-ServiceContext] <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>]
-AvailableForCreate <Boolean>
[-Confirm]
-DatabaseServer <AccessServicesDatabaseServerPipeBind>
-DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind>
[-Exclusive <Boolean>]
[-WhatIf]
[<CommonParameters>]
Set-SPAccessServicesDatabaseServer
[-ServiceContext] <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
-DatabaseServer <AccessServicesDatabaseServerPipeBind>
[-DatabaseServerCredentials <PSCredential>]
-DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind>
[-DatabaseServerName <String>]
[-WhatIf]
[<CommonParameters>]
Set-SPAccessServicesDatabaseServer
[-ServiceContext] <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
-DatabaseServer <AccessServicesDatabaseServerPipeBind>
-DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind>
-Encrypt <Boolean>
-TrustServerCertificate <Boolean>
[-WhatIf]
[<CommonParameters>]
Set-SPAccessServicesDatabaseServer
[-ServiceContext] <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
-DatabaseServer <AccessServicesDatabaseServerPipeBind>
-DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind>
-Failover <Boolean>
[-WhatIf]
[<CommonParameters>]
Set-SPAccessServicesDatabaseServer
[-ServiceContext] <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
-DatabaseServer <AccessServicesDatabaseServerPipeBind>
-DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind>
[-SecondaryDatabaseServerName <String>]
[-WhatIf]
[<CommonParameters>]
Set-SPAccessServicesDatabaseServer
[-ServiceContext] <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
-DatabaseServer <AccessServicesDatabaseServerPipeBind>
-DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind>
-UserDomain <String>
[-WhatIf]
[<CommonParameters>]
Set-SPAccessServicesDatabaseServer
[-ServiceContext] <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
-DatabaseServer <AccessServicesDatabaseServerPipeBind>
-DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind>
-State <DatabaseServerStates>
-StateOwner <ServerStateOwner>
[-WhatIf]
[<CommonParameters>]
Description
設定與裝載 Access Services 資料庫的資料庫伺服器相關聯的參數,可讓您控制資料庫建立、認證和容錯移轉資料庫伺服器。
範例
--------------------範例---------------------
$site = (Get-SPWebApplication -IncludeCentralAdministration | ?{$_.IsAdministrationWebApplication -eq $true}).Sites[0]
$dbsvr = (Get-SPAccessServicesDatabaseServer -ServiceContext $site -DatabaseServerGroup DEFAULT)[0]
Set-SPAccessServicesDatabaseServer -ServiceContext $site -DatabaseServerGroup DEFAULT -DatabaseServer $dbsvr -Exclusive $true -AvailableForCreate $false
將資料庫伺服器群組中名為 DEFAULT 的第一個資料庫設定為獨佔模式,並不允許在選取的資料庫伺服器上建立新的 Access Services 資料庫。
參數
-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 2013, SharePoint Server 2016, SharePoint Server 2019 |
-AvailableForCreate
指出是否可以在指定的SQL Server上建立新的 Access Services 資料庫。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-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 2013, SharePoint Server 2016, SharePoint Server 2019 |
-DatabaseServer
指定裝載 Access Services 資料庫SQL Server。
Type: | AccessServicesDatabaseServerPipeBind |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-DatabaseServerCredentials
指定資料庫使用者的 Credential 物件。 若使用 SQL Server 驗證,請使用此參數。 若未提供資料庫認證,即使用 Windows 驗證。
Type: | PSCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-DatabaseServerGroup
Access Services 資料庫伺服器群組的名稱,其中包含要設定的SQL Server物件。
Type: | AccessServicesDatabaseServerGroupPipeBind |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-DatabaseServerName
指定裝載 Access Services 資料庫的資料庫伺服器。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Encrypt
加密資料庫伺服器連接。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Exclusive
將資料庫伺服器設定為獨佔模式。 不允許在資料庫伺服器上建立進一步的 Access Services 資料庫。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Failover
啟用或停用 Access Services 資料庫伺服器的容錯移轉。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-SecondaryDatabaseServerName
指定容錯移轉資料庫伺服器名稱。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-ServiceContext
指定 SPServiceContext 物件執行個體形式的服務內容、 SPSiteAdministration 物件識別碼或 SPSite 物件。 服務內容值範例包括:來自識別碼欄位的識別碼、字串識別碼、URI 或 GUID 的字串表示法。
Type: | SPServiceContextPipeBind |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-State
設定資料庫伺服器狀態。 有效值:
作用中
鎖定
保留
Type: | DatabaseServerStates |
Accepted values: | Active, Locked, Reserved |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2016, SharePoint Server 2019 |
-StateOwner
設定狀態擁有者。
有效值:
NoOwner
TenantMove
Type: | ServerStateOwner |
Accepted values: | NoOwner, TenantMove |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2016, SharePoint Server 2019 |
-TrustServerCertificate
設定值,指出通道是否會在略過憑證鏈結以驗證信任時加密。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-UserDomain
設定指定之資料庫伺服器的使用者網域。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-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 2013, SharePoint Server 2016, SharePoint Server 2019 |
輸入
Microsoft.SharePoint.PowerShell.SPServiceContextPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection
輸出
System.Object