Export (0) Print
Expand All

Restore-DatabaseAvailabilityGroup

Applies to: Exchange Server 2010

Topic Last Modified: 2011-03-19

Use the Restore-DatabaseAvailabilityGroup cmdlet to activate database availability group (DAG) member servers in a secondary or standby datacenter. This process is typically performed after the failure or deactivation of the active DAG member servers in a primary production datacenter.

The Restore-DatabaseAvailabilityGroup can be run against a DAG only when the DAG is configured with a DatacenterActivationMode value of DagOnly. For more information about DatacenterActivationMode, see Understanding Datacenter Activation Coordination Mode. You can use the Set-DatabaseAvailabilityGroup cmdlet to configure the value for DatacenterActivationMode.

The Restore-DatabaseAvailabilityGroup cmdlet performs several operations that affect the structure and membership of the DAG. This task will:

  • Force quorum for the DAG to enable the surviving members of the DAG to start and provide service;
  • Change the DAG witness from the primary witness server to an alternate witness server; and
  • Remove any failed members from the DAG.


Restore-DatabaseAvailabilityGroup -Identity <DatabaseAvailabilityGroupIdParameter> -ActiveDirectorySite <AdSiteIdParameter> [-AlternateWitnessDirectory <NonRootLocalLongFullPath>] [-AlternateWitnessServer <String>] [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-WhatIf [<SwitchParameter>]]

Parameter Required Type Description

ActiveDirectorySite

Required

Microsoft.Exchange.Configuration.Tasks.AdSiteIdParameter

The ActiveDirectorySite parameter specifies which Active Directory site should be activated.

Identity

Required

Microsoft.Exchange.Configuration.Tasks.DatabaseAvailabilityGroupIdParameter

The Identity parameter specifies the name of the DAG being manipulated.

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.

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.

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.

AlternateWitnessDirectory

Optional

Microsoft.Exchange.Data.NonRootLocalLongFullPath

The AlternateWitnessDirectory parameter specifies the name of an alternate directory that's used to store witness data. The specified directory must not be in use by any other DAGs or used for any other purpose. This value can be pre-populated ahead of time by using the Set-DatabaseAvailabilityGroup cmdlet.

AlternateWitnessServer

Optional

System.String

The AlternateWitnessServer parameter is used to specify the name of a new witness server for the DAG as part of a site activation process. This value can be pre-populated ahead of time by using the Set-DatabaseAvailabilityGroup cmdlet.

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 group" entry in the High Availability Permissions topic.

Error Description

This command can only be run on a database availability group (DAG) when the DatacenterActivationMode parameter for the DAG is set to DagOnly. (Error 3EBE1F79).

Indicates that datacenter activation mode is not enabled for the DAG. Use the Set-DatabaseAvailabilityGroup cmdlet to set the DatacenterActivationMode parameter for the DAG is set to DagOnly.

This example activates member servers in a DAG named DAG1 for an Active Directory site named Portland. In this example, the values for AlternateWitnessServer and AlternateWitnessDirectory had been previously set ahead of time by using the Set-DatabaseAvailabilityGroup cmdlet. Thus, there is no need to specify them here.

Restore-DatabaseAvailabilityGroup -Identity DAG1 -ActiveDirectorySite Portland

This example activates member servers in a DAG named DAG1 for an Active Directory site named Redmond. In this example, the values for AlternateWitnessServer and AlternateWitnessDirectory are being set as part of the activation process.

Restore-DatabaseAvailabilityGroup -Identity DAG1 -ActiveDirectorySite Redmond -AlternateWitnessServer EXHUB1 -AlternateWitnessDirectory D:\DAG1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft