Export (0) Print
Expand All

New-DatabaseAvailabilityGroup

Exchange 2010
[This topic is in progress.]  

Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2

Topic Last Modified: 2011-05-05

Use the New-DatabaseAvailabilityGroup cmdlet to create a database availability group (DAG). A DAG is a set of Mailbox servers that provide automatic database-level recovery from database, server, and network failures. When a Mailbox server is added to a DAG, it works with the other servers in the DAG to provide automatic, database-level recovery from failures.


New-DatabaseAvailabilityGroup -Name <String> [-Confirm [<SwitchParameter>]] [-DatabaseAvailabilityGroupIpAddresses <IPAddress[]>] [-DomainController <Fqdn>] [-ThirdPartyReplication <Disabled | Enabled>] [-WhatIf [<SwitchParameter>]] [-WitnessDirectory <NonRootLocalLongFullPath>] [-WitnessServer <FileShareWitnessServerName>]

When creating a DAG, you need to specify a valid computer name for the DAG no longer than 15 characters that is unique within the Active Directory forest. In addition, each DAG is configured with a witness server and witness directory. The witness server and its directory are used only for quorum purposes where there's an even number of members in the DAG. You don't need to create the witness directory in advance. Exchange will automatically create and secure the directory for you on the witness server. The directory shouldn't be used for any purpose other than for the DAG witness server.

The requirements for the witness server are as follows:

  • The witness server can't be a member of the DAG.
  • The witness server must be in the same Active Directory forest as the DAG.
  • The witness server must be running the Windows Server 2008 R2, Windows Server 2008, Windows Server 2003 R2, or Windows Server 2003 operating system.
  • A single server can serve as a witness for multiple DAGs; however, each DAG requires its own witness directory.

We recommend that you use a Hub Transport server running on Microsoft Exchange Server 2010 in the Active Directory site containing the DAG. This allows the witness server and directory to remain under the control of an Exchange administrator.

The following combinations of options and behaviors are available:

  • You can specify only a name for the DAG. In this scenario, the task will search for a Hub Transport server that doesn't have the Mailbox server role installed, and it will automatically create the default directory and share on that server and use that Hub Transport server as the witness server.
  • You can specify a name for the DAG, the witness server that you want to use, and the directory you want created and shared on the witness server.
  • You can specify a name for the DAG and the witness server that you want to use. In this scenario, the task will create the default directory on the specified witness server.
  • You can specify a name for the DAG and specify the directory you want created and shared on the witness server. In this scenario, the task will search for a Hub Transport server in the local Active Directory site that doesn't have the Mailbox server role installed, and it will automatically create the specified directory on that server, share the directory, and use that Hub Transport server as the witness server.
importantImportant:
If the witness server you specify isn't an Exchange 2010 server, you must add the Exchange Trusted Subsystem USG to the local Administrators group on the witness server. If the witness server is a directory server, you must add the Exchange Trusted Subsystem USG to the Builtin\Administrators group. These security permissions are necessary to ensure that Exchange can create a directory and share on the witness server as needed.

In addition to providing a name for the DAG, one or more IP addresses must also be assigned to the DAG. You can assign static IP addresses to the DAG by using the DatabaseAvailabilityGroupIpAddresses parameter. If you omit this parameter, the task will attempt to use Dynamic Host Configuration Protocol (DHCP) to obtain the necessary IP addresses.

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the"Database availability groups" entry in the High Availability Permissions topic.

 

Parameter Required Type Description

Name

Required

System.String

The Name parameter specifies a unique name for the new DAG of up to 15 characters. The name you use must not conflict with any computer name in the organization.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm switch causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm switch.

DatabaseAvailabilityGroupIpAddresses

Optional

System.Net.IPAddress[]

The DatabaseAvailabilityGroupIpAddresses parameter specifies one or more static IP addresses to the DAG when a Mailbox server is added to a DAG. If you omit the DatabaseAvailabilityGroupIpAddresses parameter when creating a DAG, the system attempts to lease one or more IP addresses from a DHCP server in your organization to assign to the DAG. Setting the DatabaseAvailabilityGroupIpAddresses parameter to a value of 0.0.0.0 configures the DAG to use DHCP.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory.

ThirdPartyReplication

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.ThirdPartyReplicationMode

The ThirdPartyReplication parameter is used to configure and enable a DAG to use third-party replication that leverages the Exchange Third Party Replication API instead of the built-in continuous replication. After this mode is enabled, it can't be changed.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf switch instructs the command to simulate the actions that it would take on the object. By using the WhatIf switch, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf switch.

WitnessDirectory

Optional

Microsoft.Exchange.Data.NonRootLocalLongFullPath

The WitnessDirectory parameter specifies the name of the directory on the witness server that's used to store file share witness data. The directory and share should be hosted on an Exchange server other than any of the Mailbox servers that are in the DAG. This allows an Exchange administrator to maintain operational control over the directory. The specified directory must not be in use by any other DAGs or used for any purpose other than for the witness server. If you omit this option, the default witness directory will be used.

WitnessServer

Optional

Microsoft.Exchange.Data.FileShareWitnessServerName

The WitnessServer parameter specifies the name of a server that will be used as a quorum witness when there is an even number of members in the DAG. The selected server must not be a member of the DAG that's configured to use it. If you omit the WitnessServer parameter, the task will try to automatically select a Hub Transport server without the Mailbox server role in the same Active Directory site as the DAG to use as the witness server.

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.

 

Error Description

Specified server does not exist.

The witness server couldn't be found.

Verify the server name and try the task again.

Specified name is already in use.

Each DAG name must be unique in the forest.

Choose a name that isn't in use by another DAG, another server, or another network element and try the task again.

Insufficient authority to perform the task.

The account didn't have sufficient permissions.

Verify that the account you're using has sufficient permissions to perform the task and try the task again.

Failed to configure the automatic server failure detection support.

The task was unable to install or configure Windows failover clustering on the specified Mailbox server.

Check the event log for information about this problem.

Insufficient authority to create the file share witness share.

The account didn't have sufficient permissions.

Verify that the account you're using has sufficient permissions to create the file share witness share and try the task again.

Insufficient authority to create the witness directory.

The account didn't have sufficient permissions.

Verify that the account you're using has sufficient permissions to create the file share witness directory, verify that the intended path exists, and verify that the NTFS file system permissions are correct, and then try the task again.

This example creates a new DAG named DAG1 that's configured to use a witness server of EXHUB1, and a local directory of C:\DAG1. DAG1 is also configured to use DHCP for the DAG's IP addresses.

New-DatabaseAvailabilityGroup -Name DAG1 -WitnessServer EXHUB1 -WitnessDirectory C:\DAG1

This example creates a new DAG named DAG2. The system will automatically select a Hub Transport server without the Mailbox server role in the same site as the DAG to use as the witness server. DAG2 is assigned a single static IP address because all members are on the same subnet.

New-DatabaseAvailabilityGroup -Name DAG2 -DatabaseAvailabilityGroupIPAddresses 10.0.0.8

This example creates a new DAG named DAG3. DAG3 is configured to use a witness server of EXHUB2, and a local directory of C:\DAG3. DAG3 is assigned multiple static IP addresses because its members are or will be on different subnets.

New-DatabaseAvailabilityGroup -Name DAG3 -WitnessServer EXHUB2 -WitnessDirectory C:\DAG3 -DatabaseAvailabilityGroupIPAddresses 10.0.0.8,192.168.0.8

This example creates a new DAG named DAG4 that is configured to use DHCP. In addition, the witness server will be automatically selected by the system and the default witness directory will be created.

New-DatabaseAvailabilityGroup -Name DAG4
 © 2010 Microsoft Corporation. All rights reserved.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft