DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Split-Brain in Distributed Systems
  • How to Build Your Exchange Server Recovery Strategy to Overcome Ransomware Attacks
  • Manage Microservices With Docker Compose
  • A Robust Distributed Payment Network With Enchanted Audit Functionality - Part 2: Spring Boot, Axon, and Implementation

Trending

  • Scalable System Design: Core Concepts for Building Reliable Software
  • Unlocking AI Coding Assistants Part 3: Generating Diagrams, Open API Specs, And Test Data
  • Accelerating AI Inference With TensorRT
  • DGS GraphQL and Spring Boot
  1. DZone
  2. Data Engineering
  3. Databases
  4. How to Manage Database Availability Groups(DAG) In Exchange Server

How to Manage Database Availability Groups(DAG) In Exchange Server

In this article, we'll learn to manage and administer the Database Availability Groups (DAG) in Microsoft Exchange Server to ensure an optimal DAG environment.

By 
Shelly Bhardwaj user avatar
Shelly Bhardwaj
·
Feb. 09, 22 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
6.9K Views

Join the DZone community and get the full member experience.

Join For Free

Before DAG, Exchange Server 2007 was using multiple services for high availability, such as Local Continuous Replication (LCR), Single Copy Clustering (SCC), Standby Continuous Replication (SCR), and Cluster Continuous Replication (CCR). However, it lacked automatic failover protection, and there was no graphical user interface to manage or control the operations. 

Database Availability Groups or DAG is a unified high availability feature that was introduced with the release of Microsoft Exchange Server 2010 to automate the database-level recovery and prevent data loss in the event of a database, server, or network failure. And to manage the DAG, you can use GUI-based Exchange Management Console in Exchange 2010 or the Exchange Admin Center in Exchange 2013 and later. You may also use Exchange management Shell, a command-line-based Exchange Server tool, to manage DAG.

In this article, you will learn how to manage and administer the Database Availability Groups (DAG) in Microsoft Exchange Server to ensure continuous replication, high availability and prevent issues or errors that may compromise or break your DAG environment. 

Managing Database Availability Group in Exchange Server

After an Exchange Server DAG is built and configured, it’s time to manage the member servers and the databases. As an administrator, you may often require adding or removing member server or database copies to the DAG, performing an update, recovering lost DAG members, or removing the DAG. 

Besides, you may also configure various DAG properties after the deployment to make changes to witness server/directory, encryption, network, active databases, etc.

Below are the best practices you may follow and apply to manage and maintain your DAG Exchange Server infrastructure efficiently. 

Add or Remove Servers

You may require to add a new mailbox server to DAG or remove a lost mailbox server from the DAG to replace it with another and perform recovery on the lost one. 

To add or remove Exchange Servers in DAG, you can use the Database Availability Group wizard in Exchange Admin Center (EAC). You may also use Add-DatabaseAvailaibilityGroupServer or Remove-DatabaseAvailaibilityGroupServer PowerShell cmdlets in Exchange Management Shell.  

To add Exchange Server to DAG via EAC:

  • Go to servers> database availability groups and tap + icon.
  • Select the servers from the list and click Add> OK.
  • This can take a while to finish. After the process completes, click Close.

Similarly, to remove a member Exchange Server from DAG:

  • Go to servers> database availability groups and select the mailbox server from the list.
  • Click on the – (minus) icon, confirm, and then click Save to save the changes.  
  • Click Close once the mailbox server is removed from the DAG.

To add or remove member mailbox servers from DAG, execute the following command in the EMS:

Add-DatabaseAvailabilityGroupServer -Identity DAG1 -MailboxServer MBX1 

Remove-DatabaseAvailabilityGroupServer -Identity DAG1 -MailboxServer MBX1 

Change/Update DAG Properties 

After setting up and configuring the DAG Exchange Server, you can use the Exchange Admin Center or Exchange Management Shell to configure, change or update the DAG properties, such as witness server/directory, network, encryption, active databases, etc.

To edit or change the DAG properties, you can follow these steps in EAC:

  • Go to servers> database availability groups and select the DAG you want to reconfigure, update or change the properties.
  • Click on the edit (pencil) icon.
  • Under the General page, you can view the DAG status and membership status. You can also configure or reconfigure witness server or directory and other network configurations. 
  • The IP addresses page allows you to change or modify the IP addresses assigned to the Database Availability Group.

To perform these changes and actions via EMS, you can use the following cmdlets:

Set-DatabaseAvailabilityGroup -Identity DAG01 -WitnessDirectory C:\DAG01 

Set-DatabaseAvailabilityGroup -Identity DAG01 -AlternateWitnessDirectory C:\DAGFSW\DAG01.abc.com -AlternateWitnessServer MBX03 

Set-DatabaseAvailabilityGroup -Identity DAG01 -DatabaseAvailabilityGroupIPAddresses 2555.255.2555.0 

To check the configuration and changes are effectively running:

Get-DatabaseAvailabilityGroup <DAGName> | Format-List 

DAG Networks

DAG networks are automatically created and configured when DAG is deployed in Exchange 2013 or later. However, in Exchange 2010, you need to configure the DAG network manually. 

However, you can always configure or change the DAG networks after enabling the manual DAG network control. To do this, you can run the following command in the EMS:

Set-DatabaseAvailabilityGroup DAG01 -ManualDagNetworkConfiguration $true

Now you can use the New-DatabaseAvailabilityGroupNetwork and Set-DatabaseAvailabilityGroupNetwork cmdlets in EMS to create a new DAG network or configure the existing DAG network properties, such as name, description, subnet, and enable/disable replication. 

Use Set-MailboxServer Cmdlet to Manage DAG

Set-MailboxServer cmdlet can modify and change the mailbox server attributes and mailbox configuration settings. For example, you can use the cmdlet with the below parameters mentioned to manage the mailbox servers in DAG. 

AutomaticDatabaseMountDial

AutoDatabaseMountDial is a parameter used with the Set-MailboxServer cmdlet to specify automatic database mount for continuous replication after failover. You can choose between three different values to specify whether to mount the database immediately after the failover or wait for logs to be copied to the passive copy before mounting. 

The values are as follow:

BestAvailability - When BestAvailability is selected, the database automatically mounts immediately after a failover when the number of logs pending for copy is less than or equal to 12. When queue length is >12, the Exchange replicates the pending logs to passive database copy and then mounts the database. 

GoodAvailability - When GoodAvailability is the default value that automatically mounts the database when the log queue length is less than or equal to 6.

Lossless - The database mounts only after all the logs are copied to the passive copy in the event of a failover. 

To change the value, you can run the following command in EMS:

Set-MailboxServer -Identity EXCHSRV01 -AutoDatabaseMountDial Lossless 

DatabaseCopyActivationPolicy

DatabaseCopyActivationPolicy is another Set-MailboxServer parameter that allows you to specify the automatic activation for mailbox database copies on member DAG servers. You can choose between the following values to define the policy,

Unrestricted - Use this value to remove all restrictions from activating mailbox database copies on mailbox servers. 

Blocked - Use the value to block the databases from automatic activation on selected mailbox servers.

IntrasiteOnly - Use the value to allow the database copy to be activated on mailbox servers in the same AD site and prevent cross-site activation or failover.   

MaximumActiveDatabases

MaximumActiveDatabases parameter allows you to specify the number of databases mounted on a mailbox server to distribute the load and ensure each mailbox server is not overloaded. 

When the specified number of database copies are active on a server, no more copies will be activated in case of a switchover or failover. 

Shutting Down DAG

Shutdown may be required if you have installed an application or updated the server in a DAG. The best practice is to switch over to a member server before performing a shutdown to prevent lossless activation and prevent issues. 

DAG Maintenance and Update

It’s good to put the DAG member servers in maintenance mode before installing the updates or performing any hardware or software maintenance task. This step is critical as several services, including cluster service, are stopped when you update the server or install updates. After the update, you can put the back server to production mode. 

Additionally, you can use the StartDagServerMaintenance.ps1 and StopDagServerMaintenance,ps1 PowerShell scripts with server parameters to put the server in maintenance mode and revert to production mode. 

Conclusion

In this article, we shared some tips and methods to efficiently manage the Database Availability Groups (DAG) in Exchange Server. You may follow these for the maintenance and administration of your DAG Exchange Server infrastructure. Also, maintain a regular VSS backup for your Exchange Server to prevent permanent data loss when a disaster strikes. 

Database Mailbox (application) Network Microsoft Exchange Server

Opinions expressed by DZone contributors are their own.

Related

  • Split-Brain in Distributed Systems
  • How to Build Your Exchange Server Recovery Strategy to Overcome Ransomware Attacks
  • Manage Microservices With Docker Compose
  • A Robust Distributed Payment Network With Enchanted Audit Functionality - Part 2: Spring Boot, Axon, and Implementation

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!