Changing feature on a database that is a member of SQL Server AlwaysOn availability group Our developers need a change on a database that is in the Availability group (they need Service broker in one of the databases to be enabled) but when I try to do it I am getting error saying that I can’t make the change since this database is a member of an Availability group….

Is there a way to change it without taking this database out of availability group or I have to take it out (and how to do it if I have to and not to have to re-install the database again on the secondary node).

I see that source database we copied from on our current Live server has this Service broker enabled but after restoring it's backup on Azure it picked up the False state for Enabled Service Broker feature).
There is no other way to enable service broker except taking that database out of AlwaysON Availability group, enabling service broker and then joining it back.

If you know that your source database has service broker enabled, then when you restore the database, use RESTORE .. with ENABLE_BROKER, so that you dont have to go with such trouble again.

If you try to enable service broker for a database involved in AG, you will get below error :


  Msg 1468, Level 16, State 1, Line 3
  The operation cannot be performed on database "AdventureWorks2012" because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.
  Msg 5069, Level 16, State 1, Line 3
  ALTER DATABASE statement failed.