Tuesday 10 July 2012

Database availability group (DAG) Setup

A database availability group (DAG) is the base component of the high availability and site resilience framework built into Microsoft Exchange Server 2010. A DAG is a group of up to 16 Mailbox servers that hosts a set of databases and provides automatic database-level recovery from failures that affect individual servers or databases.

A DAG is a boundary for mailbox database replication, database and server switchovers, failovers, and an internal Exchange 2010 component called Active Manager. Active Manager, which runs on every server in a DAG, manages switchovers and failovers. For more information about Active Manager, see Understanding Active Manager.

Any server in a DAG can host a copy of a mailbox database from any other server in the DAG. When a server is added to a DAG, it works with the other servers in the DAG to provide automatic recovery from failures that affect mailbox databases, such as a disk failure or server failure.

 You can also create DAG group using the GUI option. But, if you use the Exchange Management Console (EMC) to create the DAG the task will configure the DAG to use Dynamic Host Configuration Protocol (DHCP) to obtain the necessary IP addresses. If you don't want the DAG to use DHCP, you can use the Set-DatabaseAvailabilityGroup cmdlet to configure one or more IP addresses for the DAG & also set the primary OR secondary file share witness.

Setup Steps

·         To create a Database Availability Group (DAG)- Login with appropriate login permissions - Start Exchange Management Shell.
·         Run the shell command
"Get-DatabaseAvailabilityGroup" 
New-DatabaseAvailabilityGroup –Name “DAGName” –WitnessServer “Server Name” –WitnessDirectory “Path” –DatabaseAvailabilityGroupIPAddresses Primary, DR”
o   -Name (DAG Name)
o   -WitnessServer (Prefrebally HubTransport Server – Recommended for  even number cluster)
o   -WitnessDirectory (Directory Path on the HubTransport Server)
o   -DAG IP Addresses (IP addresses from the Primary & DR sites)


Type a name for the DAG. Remember that the DAG must be unique within the Exchange organization and it can consist of up to 15 characters. I will select the server that hosts the Hub Transport and as a witness server, and define C:\DAG1-WS as the witness directory. Click Next to create the DAG.


After DAG is created, run the command "Get-DatabaseAvailabilityGroup DAG1 | FL" to check the default properties of the DAG:
Note that the DAG has no IP addresses configured. It is recommended to assign static address to the DAG. We can run the below command to set IP address to the DAG. Set-DatabaseAvailabilityGroup DAG1 -DatabaseAvailabilityGroupIpAddresses 20.20.0.6


To add members to the DAG group. Open Exchange 2010 Management Console-> Organization Configuration-> Mailbox-> Database Availability Group-> Right Click on the DAG Name and Select Manage Database Availability Group Membership to add additional DAG members.

 Click the Add button in the next screen to add the required DAG members.  Select all the required servers to be part of this DAG group, and then click Manage.  
(Note: The DHCP Client service must be enabled & running on all the DAG members before this step)
Click Finish, Once completed
  • Click Finish, once completed.  Continue same steps until all the remaining members are added.
  • To check the DAG members. Run this “Get-DatabaseAvailabilityGroup” command

-----------------------------------------------------------------------------------------------------------
DAC mode can be turned on by running the shell command below.

Set-DatabaseAvailabilityGroup –identity “dagname” –DatacenterActivationMode DagOnly

http://www.servermigrationlabin.com/2011/07/how-to-work-on-cross-site-failure-in.html

No comments:

Post a Comment