I have two SharePoint farms, an active and a DR farm, using SQL Availability groups to sync content and some service DBs. In the event of a manual failover, how do I prevent the primary farm from trying to write anything to the now-active databases that are now being used by the DR farm?

More details: I have a three node AOAG, nodes A and B are in the main site and are in sync mode, node C is in the DR site and is an async node. The primary farm was configured with the listener name, so sync-failovers are working perfectly between the sync nodes A and B. The DR farm is configured with a local SQL alias to the read-only async node, so the DR farm will never try to write anything directly to the SQL databases in the main site. After a failover, Node C becomes read-write, and so the DR farm is then in read-write mode, which is great. But how do I prevent the Main farm from trying to write anything to the now active node C?

  • You can write a powershell script to set all SharePoint database to read-only when in failover mode, but then you'd have to switch it back: sharepointdiary.com/2016/01/…
    – willman
    Jan 30, 2020 at 14:22
  • I would prefer to keep the DR farm in read/write mode to support users.
    – Mike2500
    Jan 30, 2020 at 15:00
  • I am confused, if it fails-over to Node C, the only way for the Farm to be read-write is for Node C to be read-write. How can a farm be in read-write if its active SQL Node is not?
    – willman
    Jan 30, 2020 at 15:11
  • There are two farms: the dr farm should be read/write with node C (since the AG failed over, node C will be read/write), the main farm should be read-only.
    – Mike2500
    Jan 30, 2020 at 15:27


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.