DP-420 practice question 20 of 25

You have an Azure Cosmos DB for NoSQL database named db1 that writes to multiple Azure regions. You need to test the performance of db1 in the secondary region. Which command should you run first?

Full set: 144 questions
Answer options
A: az cosmosdb location show
B: az cosmosdb failover-priority-change Correct answer
C: az cosmosdb network-rule remove
D: az cosmosdb sql database merge
Correct Answer:
B. az cosmosdb failover-priority-change
Explanation

To measure performance from the secondary region you need to promote that region to highest read-priority (or to the single-write region for non-multi-write accounts).
az cosmosdb failover-priority-change initiates the manual failover/priority swap, after which traffic can be directed to the secondary region for testing.

Why Incorrect

A. az cosmosdb location show only lists regions; it does not redirect traffic.
C. az cosmosdb network-rule remove alters firewall rules, unrelated to regional testing.
D. az cosmosdb sql database merge is not a valid CLI verb and has no effect on regions.

References

1. Azure CLI reference – az cosmosdb failover-priority-change: “Changes regional failover priority or triggers manual failover” (https://learn.microsoft.com/cli/azure/cosmosdb#az-cosmosdb-failover-priority-change)

2. Microsoft Learn – Manage failover with CLI

step 1: run az cosmosdb failover-priority-change to move traffic to chosen region (https://learn.microsoft.com/azure/cosmos-db/high-availability#manual-failover-cli)

Scroll to Top