Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Set-SPAccessServicesDatabaseServer

SharePoint 2013

Published: July 16, 2012

Applies to:  SharePoint Server 2013 Enterprise 

Specifies whether or not a database in SQL Server is available.

Set-SPAccessServicesDatabaseServer [-ServiceContext] <SPServiceContextPipeBind> -DatabaseServer <AccessServicesDatabaseServerPipeBind> -DatabaseServer <AccessServicesDatabaseServerPipeBind> -DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind> -DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-DatabaseServerCredentials <PSCredential>] [-DatabaseServerName <String>] [-WhatIf [<SwitchParameter>]]
Set-SPAccessServicesDatabaseServer [-ServiceContext] <SPServiceContextPipeBind> -DatabaseServer <AccessServicesDatabaseServerPipeBind> -DatabaseServer <AccessServicesDatabaseServerPipeBind> -DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind> -DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind> -Encrypt <$true | $false> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]
Set-SPAccessServicesDatabaseServer [-ServiceContext] <SPServiceContextPipeBind> -AvailableForCreate <$true | $false> -DatabaseServer <AccessServicesDatabaseServerPipeBind> -DatabaseServer <AccessServicesDatabaseServerPipeBind> -DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind> -DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Exclusive <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

Parameters

1

Parameter

Required

Type

Description

ServiceContext

Required

Microsoft.SharePoint.PowerShell.SPServiceContextPipeBind

Specifies the service context for the Access Services database server to be set.

DatabaseServer

Required

Microsoft.Office.Access.Services.PowerShell.AccessServicesDatabaseServerPipeBind

Specifies the ServerID of the server running SQL Server to update.

DatabaseServerGroup

Required

Microsoft.Office.Access.Services.PowerShell.AccessServicesDatabaseServerGroupPipeBind

Specifies the Access Services database server group to be set.

AssignmentCollection

Optional

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

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.

noteNote:

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.

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

DatabaseServerCredentials

Optional

System.Management.Automation.PSCredential

Specifies the Credential object for the database user. Use this parameter if you use SQL Server Authentication. If no database credentials are provided, Windows authentication is used.

DatabaseServerName

Optional

System.String

Specifies the database server name.

WhatIf

Optional

System.Management.Automation.SwitchParameter

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

2

Parameter

Required

Type

Description

ServiceContext

Required

Microsoft.SharePoint.PowerShell.SPServiceContextPipeBind

Specifies the service context for the Access Services database server to be set.

DatabaseServer

Required

Microsoft.Office.Access.Services.PowerShell.AccessServicesDatabaseServerPipeBind

Specifies the ServerID of the server running SQL Server to update.

DatabaseServerGroup

Required

Microsoft.Office.Access.Services.PowerShell.AccessServicesDatabaseServerGroupPipeBind

Specifies the Access Services database server group to be set.

Encrypt

Required

System.Boolean

Specifies all connections to the database server will use Secure Sockets Layer (SSL) if the database supports it.

AssignmentCollection

Optional

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

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.

noteNote:

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.

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

WhatIf

Optional

System.Management.Automation.SwitchParameter

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

3

Parameter

Required

Type

Description

ServiceContext

Required

Microsoft.SharePoint.PowerShell.SPServiceContextPipeBind

Specifies the service context for the Access Services database server to be set.

AvailableForCreate

Required

System.Boolean

Specifies whether the new server should be available for new database creation.

The default value is True. Setting the value to True will set all other servers in the list to False.

DatabaseServer

Required

Microsoft.Office.Access.Services.PowerShell.AccessServicesDatabaseServerPipeBind

Specifies the ServerID of the server running SQL Server to update.

DatabaseServerGroup

Required

Microsoft.Office.Access.Services.PowerShell.AccessServicesDatabaseServerGroupPipeBind

Specifies the Access Services database server group to be set.

AssignmentCollection

Optional

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

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.

noteNote:

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.

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

Exclusive

Optional

System.Management.Automation.SwitchParameter

Enables the AvailableForCreate flag for this server and disables it for all other servers in the DatabaseServerGroup.

WhatIf

Optional

System.Management.Automation.SwitchParameter

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

Detailed 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.

Use the Set-SPAccessServicesDatabaseServer cmdlet to specify whether or not a database in SQL Server is available for creation of new Access Services applications.

If you use the Set-SPAccessServicesDatabaseServer cmdlet in hosted mode, you receive the following error message:

This operation is not supported when Access Services is running in hosted mode.

Input Types

Return Types

$context = [Microsoft.SharePoint.SPServiceContext]::GetContext($app.ServiceApplicationProxyGroup, [Microsoft.SharePoint.SPSiteSubscriptionIdentifier]::Default)
$sqlServerName = "SQLServer2012AppDbServer"
$serverGroupName = 'DEFAULT'
$newdbserver = New-SPAccessServicesDatabaseServer -ServiceContext $context -DatabaseServerName $sqlServerName -DatabaseServerGroup $serverGroupName -AvailableForCreate $true
Set-SPAccessServicesDatabaseServer $context -DatabaseServer $newdbserver -DatabaseServerGroup "DEFAULT" -AvailableForCreate $false

This example sets the Access Services database server by using the $context and $newdbserver variables.

Change History

Date Description

July 16, 2012

Initial publication

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.