Wednesday, November 9, 2016

Blocking a Database Copy/Server from being activated

Hi Everyone ,

Hope it will help you so much in your working enviroment and so many times asked by guys from me so i posted here by taking help of other websites.


There are situations where you might want to block a passive database copy (or even server) in a DAG from being changed activated (changed to the active database copy). Good thing is the Exchange Product group thought about this kind of scenario. You can do exactly that using a so called activation policy. It’s not possible to use the EMC to set this, but using the EMS, you can use the Suspend-MailboxDatabaseCopy cmdlet for this purpose. Yes correct, this cmdlet is typically used for suspending replication for a database copy, but when run with a special ActivationOnly parameter, you can block a database copy from being changed to the active database copy during a failover. For instance, if we want to block MDB01 on E14EX02 from ever being activated during a failover, we can use the following command:
Suspend-MailboxDatabaseCopy –Identity MDB01\E14EX02 -ActivationOnly

When this cmdlet is run with the ActivationOnlyparameter, the database copy cannot be activated until the following command is run:
Resume-MailboxDatabaseCopy –Identity MDB01\E14EX02

Ok so what if I wish to block all databases on a DAG member server? Will I then need to run the above command on all database copies on the particular server? Luckily not. We have a similar command that works on the server level. If oyu want to block a DAG member instead use the Set-MailboxServer with theDatabaseCopyAutoActivationPolicy Blockedparameter.
For instance if I wanted to block DAG member E14EX02 from having database copies activated, I would use the following command:
Set-MailboxServer –Identity E14EX02 -DatabaseCopyAutoActivationPolicy Blocked
To allow database copies to be activated again, I would replace “Blocked” with “Unrestricted”:
Set-MailboxServer –Identity E14EX02 -DatabaseCopyAutoActivationPolicy Unrestricted

No comments:

Post a Comment