Set-SPAccessServicesDatabaseServer
设置与托管 Access Services 数据库的数据库服务器关联的参数。
语法
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>]
说明
设置与托管 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 参数,则会自动处理这些对象。
使用全局参数时,所有对象均包含在全局存储中。
如果未立即使用对象,或未通过使用 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
包含要设置的 SQL Server 对象的 Access Services 数据库服务器组的名称。
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 对象的实例。 服务上下文值的示例是来自 ID 字段的标识符、字符串标识符、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
设置数据库服务器状态。 有效值:
活动
已锁定
Reserved
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