CopyQueue



The Database Availability Group (DAG) is probably the best Exchange 2010 feature from both an impact and technology perspective. Microsoft took a really good decision by not limiting the DAG to enterprise editions of Exchange, even if you can only mount five databases on a server (counting both active and passive) with this edition and still require Windows 2008 Enterprise (because of the dependency on Windows Failover Clustering). The reason why it’s such a good decision is that it allows DAGs to be deployed to protect Exchange 2010 deployments from the very smallest to the very largest, which can’t be a bad thing.

Of course, another good thing about the DAG is that it hides much of the complexity involved behind the Exchange Management Console (EMC). Sure, you can plunge into mano-a-mano combat with the finer points of the DAG through the command line but there’s no good reason to do this unless you really must tune something that cannot be reached through EMC, such as sorting out networks automatically generated when a DAG is formed – the rule is that you can only have one MAPI network while several replication networks are supported.

  1. The std::queue class is a container adapter that gives the programmer the functionality of a queue - specifically, a FIFO (first-in, first-out) data structure. The class template acts as a wrapper to the underlying container - only a specific set of functions is provided.
  2. Where allowed to run All environments (.ALL) Threadsafe Yes. The Copy MQ Queue ( CPYMQMQ) command creates a queue definition of the same type and, for attributes not specified in the command, with the same attribute values as an existing queue definition.
  3. CopyQueue is a utility for managing file transfers. Copy multiple files faster than OS X, pause and resume file transfers, schedule tasks and more. Faster than your ordinary copy Mac OS copies multiple files at the same time, which causes excessive disk seeking and takes more operating system resources to manage.

CopyQueue lets you take control of your file transfers, such as copying to and from USB drives, network shares, downloading from the internet and uploading to FTP sites. Large files and slow connections are where CopyQueue really shines. Never worry about a file transfer being interrupted again, because with CopyQueue you can resume it.

MAPI networks are used to connect DAG member servers to network services such as Active Directory and for connections between a mailbox server and the CAS. These networks are registered in DNS, use the default gateway, and are enabled for Microsoft networks file and print sharing. Replication networks are used to transfer transaction logs between servers and are not registered in DNS, do not use the default gateway, and disable Microsoft networks. A server can survive with just the MAPI network (single NIC) as Exchange will route all traffic across this network, but if the MAPI network fails it forces a server failover within the DAG.

The Add-DatabaseAvailabilityGroupServer cmdlet (run manually or by the EMC Create New DAG wizard) attempts to make things easy for administrators by scanning for network cards known to the cluster service when a server joins a DAG (note that if you add a NIC to a server after it’s in a DAG or change the subnets used by the DAG, you can force Exchange to discover the NIC by running the Set-DatabaseAvailabilityGroup cmdlet with the -DiscoverNetworks parameter. For example:

Set-DatabaseAvailabilityGroup -Identity DAG1 -DiscoverNetworks

During enumeration, each NIC is assigned its own DAG network entry. If a server has multiple NICs, it’s possible that the enumeration and creation of DAG networks will end up with some entries that have a single endpoint and that just won’t work. The DAG will continue to function because Exchange contains fall-back logic that will instruct the DAG to use the only network that’s registered in DNS, meaning that all traffic will be routed across the MAPI network. However, it’s not good to persist with this situation and an administrator will have to sort it out by collapsing the networks so that you end up with the various subnets allocated correctly to the right DAG networks and the superfluous networks removed. This kind of complex one-off work is best done with EMS as you couldn’t expect the EMC UI to cater for every possible situation that might arise. See MSDN for more information about the creation of DAG networks.

CopyQueue

In any case, this post is not about the finer points of DAG networks. In fact, I just wanted to share an unusual hiccup that EMC displayed the other day.

EMC displays a huge copy queue length for a database

Even a hugely active database is hardly likely to create so many transaction logs that it would accumulate such a massive copy queue length (9,223,372,038,654,775 is the figure shown in the screen shot). Of course, this is the result of a transient glitch that EMC took seriously – a quick refresh exposed the true state of affairs and the copy queue length came up with the expected zero value. But isn’t it nice to know that Exchange 2010 is designed to deal with such a long queue – or at least that EMC is ready to display the good news about such a queue to an administrator!

Where would we be without a glitch to make the day go by faster?

– Tony

Today let’s discuss moving the Active Database Copy to another Database.

Moving the Database comes into picture when it’s Planned Outage or Maintenance. Best practice to manually move any active database copies to another DAG member in the DAG.

Example:

  1. Failover – Event is unplanned, such as a failure of the server hosting the active copy.
  2. Switchover – this is a task where an administrator will be driven, such as during server maintenance

This steps or task can be performed in two ways like:

Moving the copies using EMC (Exchange Management Console)

Moving the copies using EMS (Exchange Management Shell)

Now we’ll see moving the copies using EMC (Exchange Management Console).

Select the Database right click and click “Move Active Mailbox Database

Post clicking the Move Active Mailbox Database it will take you to New window to select “hosting server” where you are planning to move.

Click Browse and select the server where you are planning to host the Database copy.

Here in my scenario the Database is in EX01 so I’m moving the Database to EX02.

Now we need to plan for option “Override automatic database mount dial” setting on the target mailbox server.

Before choosing the mount dial type let’s see the type and explanation as shown below:

Lossless: (when selecting Lossless the database will not mount automatically until all logs generated on the active database copy has been copied to the passive database copy)

Good Availability: (when selecting Good Availability, the database will mount automatically as long as you have a copy queue length less than or equal to 6. If the copy queue holds more than 6 log files, the database will not mount)

Best Effort: (with Best Effort the database will mount no matter the copy queue length. Be careful with this setting as you could lose a lot of mailbox data!)

Copy Queue C#

Best Availability: (with Best Availability the database will mount automatically as long as the copy queue length is less than or equal to 12. If the copy queue length is more than 12, the database will not be able to mount)

Unless there’s a specific reason to choose another database mount dial override than the setting currently configured, leave this option at None.

Copy queue length vs replayqueuelength

When you are ready to activate the database copy in the target mailbox server specified, click Move.

So based on the above explanation, you need to plan accordingly.

Here according to my scenario I’ve selected “Good Availability“.

Click on Move.

Click Finish.

Now the Database is in EX02 let’s see moving the Database back to EX01.

Now we’ll see using EMS moving the Database to another Server.

Copy command in windows 10

Command:

Move-ActiveMailboxDatabase EX01-DB02 -ActivateOnServer EX01 -MountDialOverride:GoodAvailability

It will prompt for warning if you want to move Database to another server then to you need to select “A” -> Enter.

Copy Queue Length Exchange 2013

Copy queue length vs replayqueuelength

Below is the output which shows warning with the move status.

To identify the Database in which state of mount dial please find the below the command:

Copy Queue Length 92233

Get-Mailboxserver | FL Name,AutoDatabaseMountDial

For More Info:

Stay tuned for the procedure of Moving the Databases in Exchange Server 2013 🙂

Praveen Kumar

MCTS, MCITP | Exchange Server

Publisher @ Techrid.com