Practice Test

True or False: PowerShell is a cross-platform task automation solution from Microsoft.

  • True
  • False

Answer: True

Explanation: PowerShell is a task-based scripting technology and automation framework from Microsoft that is built on the .NET Framework.

Can you use Azure CLI to initiate a regional failover process in Azure Cosmos DB?

  • Yes
  • No

Answer: Yes

Explanation: Azure CLI (command-line-interface) is a set of commands used to create and manage Azure resources. You can use it to start a regional failover for Azure Cosmos DB.

Which of the following can you use to automate tasks in Microsoft Azure? (multiple select)

  • – Azure CLI
  • – PowerShell
  • – Bash
  • – None of the above

Answer: Azure CLI, PowerShell

Explanation: Both Azure CLI and PowerShell can be used to automate tasks in Microsoft Azure. Bash is a Unix shell and command language, which is not specific to Azure.

True or False: You cannot migrate the Azure Cosmos DB to another region using PowerShell.

  • True
  • False

Answer: False

Explanation: With the help of PowerShell, users can migrate the Azure Cosmos DB to another region.

To perform a manual failover for your Azure Cosmos account, which of the following command you would use with Azure CLI?

  • -AccountFailover
  • -ManualFailover
  • -region-failover
  • -None of the above

Answer: None of the above

Explanation: The az cosmosdb failover-priority-change command is used to perform a manual failover for Azure Cosmos DB account using Azure CLI.

True or False: When you initiate a failover, the changes replicate to all regions associated with your Azure Cosmos DB account.

  • True
  • False

Answer: True

Explanation: When a failover is performed, the changes that were made are replicated across all associated regions of your Azure Cosmos DB account.

Which command is used in PowerShell to change the failover priority of Azure Cosmos DB account?

  • -Change-FailoverPriority
  • -Set-CosmosDbAccountFailoverPriority
  • -Set-AzureRmCosmosDBAccountFailoverPriority
  • -None of the above

Answer: Set-AzureRmCosmosDBAccountFailoverPriority

Explanation: Set-AzureRmCosmosDBAccountFailoverPriority is the command used in PowerShell to change the failover priority of Azure Cosmos DB account.

What is the default mode for regional failover in Azure Cosmos DB?

  • -Manual
  • -Automatic
  • -None

Answer: Automatic

Explanation: The default mode for regional failover in Azure Cosmos DB is automatic. You can however change it to manual if needed.

True or False: You need to enable multiple write regions to manually initiate a failover in Azure Cosmos DB.

  • True
  • False

Answer: True

Explanation: To manually failover, you need to have multiple write regions enabled in your Azure Cosmos DB account.

What is the maximum number of regions that Azure Cosmos DB can associate with your account?

  • -99
  • -50
  • -20
  • -10

Answer: 99

Explanation: Azure Cosmos DB can associate a maximum of 99 regions with your Azure Cosmos DB account.

Interview Questions

What is a regional failover in the context of Microsoft Azure Cosmos DB?

A regional failover refers to the process of switching from the primary region to the secondary region for read and write operations in Microsoft Azure Cosmos DB when the primary region becomes unavailable due to certain issues like a natural disaster or network failure.

What are the prerequisites for initiating a regional failover in Azure Cosmos DB?

Before initiating a region failover, you must have multiple regions enabled in your Azure Cosmos account, and your Cosmos DB must be set up for multi-region writes.

How can PowerShell be used to initiate a failover in Azure Cosmos DB?

PowerShell can be used to initiate a regional failover by invoking the Failover-PriorityChange command in the Az.CosmosDB PowerShell module, where the regions are reordered based on their failover priorities.

What is the Azure CLI command to initiate a manual failover in Azure Cosmos DB?

The Azure CLI command to initiate a manual failover is “az cosmosdb failover-priority-change”, followed by the necessary parameters for the account name, resource group and failover policies.

What is the role of Azure PowerShell module for a manual failover process?

Azure PowerShell module provides commands for Azure Cosmos DB management operations such as invoking Failover-PriorityChange command to change the failover priority of Cosmos DB regions for initiating a manual failover.

When using Azure CLI to initiate a regional failover, what does the –failover-policies parameter represent?

The –failover-policies parameter specifies a space-separated list of region=failoverPriority pairs, where ‘region’ is the region name and ‘failoverPriority’ is the failover priority for that region.

What is Microsoft’s recommendation for failover priority in Azure Cosmos DB?

Microsoft recommends setting a lower failover priority value for the most preferred region, as this value determines the failover order. In the event of regional outage, Azure Cosmos DB will failover to the region with the next highest priority.

Can you initiate a manual failover in Azure Cosmos DB if you only have a single region enabled?

No, you need to have multiple regions enabled in your Azure Cosmos account in order to initiate a manual failover.

Is it possible to automate the regional failover process in Azure Cosmos DB?

Yes, Azure Cosmos DB provides automatic failover capabilities which can be enabled or disabled as per requirements. However, manual failovers need to be initiated as needed.

What is the syntax for reordering failover priorities using Azure CLI?

The syntax is “az cosmosdb failover-priority-change –account-name –resource-group –failover-policies” followed by a list of region=failoverPriority pairs in the order of their priority.

What is the result of running the PowerShell command “Failover-PriorityChange”?

Running the PowerShell command “Failover-PriorityChange” initiates a manual failover by changing the failover priority order of the Azure regions in the Cosmos DB account.

Using Azure CLI, how can you check the regional failover progress?

You can check regional failover progress using the command “az cosmosdb show –name –resource-group” which returns the current service level objectives.

Can you cancel a failover process once it has been initiated?

No, once a failover process has been initiated in Azure Cosmos DB, it cannot be canceled.

What is the purpose of Azure CLI in Azure Cosmos DB?

Azure CLI provides a set of commands used to create, manage, and scale applications that take full advantage of all the capabilities of Azure Cosmos DB.

Are there any potential data losses when a failover occurs?

No, Azure Cosmos DB guarantees zero data loss in the case of regional failovers because it uses synchronous replication within and across multiple geographical regions to offer high availability.

Leave a Reply

Your email address will not be published. Required fields are marked *