Microsoft AZ-204 Practice Test Questions and Exam Dumps Part 12 Q221-240

View Full Microsoft AZ-204 Exam Dumps and Practice Test Dumps

 

Q221. Which Azure storage option is best suited for mounting shared file storage to multiple application instances?

1) Azure Queue Storage
2) Azure Blob Storage
3) Azure Files
4) Azure Table Storage

Correct Answer: 3)

Explanation:

Azure Files provides managed cloud file shares that can be accessed by multiple application instances using standard file-sharing protocols. It is useful when applications require a shared filesystem rather than object-based Blob Storage. Azure Files can be integrated with virtual machines, containers, and other Azure services depending on the workload requirements. Blob Storage is primarily designed for object data, Queue Storage handles messages, and Table Storage provides NoSQL key-value storage. When several application instances need access to common files, Azure Files is generally the appropriate choice. It can also support scenarios where applications need persistent shared storage without managing their own file server infrastructure.

Q222. Which Azure Storage feature allows an application to recover a blob after it has been accidentally deleted?

1) Blob soft delete
2) Blob index tags
3) Storage firewall
4) Azure Files

Correct Answer: 1)

Explanation:

Blob soft delete protects blob data from accidental deletion by retaining deleted blobs for a configured retention period. During that period, a deleted blob can be restored, helping protect against accidental user actions, application errors, or unintended deletion operations. This feature is especially useful for applications where recovering deleted data is important. Blob index tags are used for categorizing and querying blobs, while storage firewalls control network access. Azure Files provides managed file shares rather than blob deletion protection. Therefore, Blob soft delete is the appropriate feature when an application needs the ability to recover recently deleted blob data.

Q223. Which Azure Blob Storage feature can maintain previous versions of a blob when it is modified?

1) Blob lease
2) Blob versioning
3) Storage firewall
4) SAS token

Correct Answer: 2)

Explanation:

Blob versioning automatically maintains previous versions of a blob whenever the blob is modified or overwritten. This allows applications to access or restore earlier versions of data when necessary. Versioning is useful for protecting important files from accidental overwrites and maintaining historical copies of object data. A blob lease is primarily used to manage exclusive access and coordinate writes, while a storage firewall controls network access. A SAS token provides delegated access to storage resources. Therefore, Blob versioning is the correct choice when the requirement is to preserve previous versions of blobs after modifications.

Q224. An application needs temporary read and write access to a specific Blob Storage container without sharing the storage account key. What should be used?

1) SAS token
2) Storage account name
3) Blob index tag
4) Lifecycle policy

Correct Answer: 1)

Explanation:

A Shared Access Signature, or SAS, provides delegated access to Azure Storage resources without requiring the recipient to know the storage account key. A SAS can specify the permitted resource, permissions, and validity period. For example, an application can generate a SAS that allows read and write operations on a particular container for a limited period. This supports controlled and temporary access while reducing the need to distribute highly privileged account keys. Blob index tags are used for organization and querying, while lifecycle policies automate data management. Therefore, SAS is the appropriate mechanism for granting temporary, scoped access to storage resources.

Q225. Which Azure Storage redundancy option replicates data synchronously across availability zones within a region?

1) LRS
2) GRS
3) ZRS
4) RA-GRS

Correct Answer: 3)

Explanation:

Zone-redundant storage, or ZRS, synchronously replicates data across multiple availability zones within an Azure region. This provides protection against the failure of a single availability zone while keeping data available within the region. Locally redundant storage, or LRS, maintains multiple copies within a single physical location. Geo-redundant storage options such as GRS replicate data to another geographic region and are designed for regional disaster recovery. Therefore, ZRS is the correct choice when an application requires synchronous replication across availability zones in the same Azure region.

Q226. Which Cosmos DB feature determines how data is distributed across logical partitions?

1) Consistency level
2) Partition key
3) TTL
4) Stored procedure

Correct Answer: 2)

Explanation:

The partition key is a fundamental design choice in Azure Cosmos DB because it determines how items are distributed across logical partitions. A well-designed partition key helps distribute requests and storage evenly, improving scalability and performance. Applications should generally choose a property with sufficient cardinality and a distribution pattern appropriate for their workload. Consistency levels control how strongly reads reflect writes, TTL automatically removes expired items, and stored procedures execute server-side JavaScript within a logical partition. Therefore, the partition key is the feature directly responsible for determining the logical partitioning strategy of Cosmos DB data.

Q227. An application frequently reads the same data from Cosmos DB and needs to reduce database request volume. Which service can provide a distributed cache?

1) Azure Cache for Redis
2) Azure Queue Storage
3) Azure Event Grid
4) Azure Files

Correct Answer: 1)

Explanation:

Azure Cache for Redis provides an in-memory distributed cache that can reduce the number of repeated database requests made by an application. Frequently accessed data can be stored in the cache and retrieved much faster than repeatedly querying the primary database. A common implementation is the cache-aside pattern, where an application checks the cache first and queries Cosmos DB only when the required item is not already cached. Queue Storage is intended for message processing, Event Grid handles event routing, and Azure Files provides file shares. Therefore, Azure Cache for Redis is the most appropriate choice for reducing repeated Cosmos DB reads.

Q228. Which Cosmos DB consistency level provides the strongest guarantee that reads return the most recent committed write?

1) Eventual
2) Consistent prefix
3) Session
4) Strong

Correct Answer: 4)

Explanation:

Strong consistency provides the strongest consistency guarantee available in Azure Cosmos DB. With strong consistency, a read is guaranteed to return the most recent committed write according to the consistency model. This is useful for applications where immediate visibility of updates is more important than maximizing geographic distribution or availability characteristics. Eventual consistency provides weaker guarantees but can offer greater performance and availability characteristics. Session consistency is often useful for user-centric applications because it provides read-your-writes behavior within a session. Consistent prefix ensures reads never see writes out of order. Therefore, Strong is the correct answer when the strongest read consistency is required.

Q229. Which Cosmos DB feature automatically removes items after a specified amount of time?

1) Change feed
2) TTL
3) Partition key
4) Indexing policy

Correct Answer: 2)

Explanation:

Time to Live, or TTL, allows Azure Cosmos DB to automatically delete items after a configured period. TTL is useful when data should exist only temporarily, such as session records, temporary events, cached information, or short-lived telemetry. The expiration period can be configured according to application requirements. The Cosmos DB service handles expiration rather than requiring application code to periodically locate and delete expired records. Change feed tracks changes to items, partition keys determine logical data distribution, and indexing policies control which properties are indexed. Therefore, TTL is the correct feature for automatically removing items after a specified lifetime.

Q230. Which Cosmos DB capability allows an application to process inserts and updates as they occur?

1) Change feed
2) TTL
3) Strong consistency
4) Point-in-time restore

Correct Answer: 1)

Explanation:

The Cosmos DB change feed provides a persistent record of changes made to items in a container. Applications can consume the change feed to react to inserts and updates without repeatedly scanning the entire container. This is useful for event-driven processing, synchronization, analytics pipelines, materialized views, and downstream processing. The change feed can be consumed by supported Azure services and application components according to the workload requirements. TTL automatically removes expired data, consistency levels control read behavior, and point-in-time restore is designed for data recovery. Therefore, Change Feed is the appropriate choice when an application needs to process data changes as they occur.

Q231. Which Azure SQL Database feature allows multiple databases to share a pool of compute resources?

1) Elastic pool
2) Private Endpoint
3) Database firewall
4) Backup storage

Correct Answer: 1)

Explanation:

Azure SQL Database elastic pools allow multiple databases to share a common set of compute and storage resources. They are particularly useful when databases have variable or unpredictable usage patterns and do not all require their maximum capacity at the same time. Instead of provisioning each database independently for peak demand, an elastic pool can provide shared resources across the group. This can improve resource utilization and simplify capacity management. Private Endpoints provide private network connectivity, database firewalls control network access, and backup storage supports recovery. Therefore, an elastic pool is the appropriate feature for sharing compute resources among multiple Azure SQL databases.

Q232. An application hosted in Azure App Service needs to authenticate to Azure SQL Database without storing a database password. What should be used?

1) Storage SAS
2) Managed identity with Microsoft Entra authentication
3) Blob lease
4) Queue message

Correct Answer: 2)

Explanation:

A managed identity combined with Microsoft Entra authentication allows an Azure App Service application to authenticate to Azure SQL Database without storing database credentials in application configuration. Azure creates and manages the identity, and the application can use it to request access tokens for supported Azure services. Appropriate permissions must still be granted to the identity in the target database. This approach reduces the risk associated with hard-coded passwords and manually managed secrets. SAS tokens are intended for Azure Storage, while blob leases and queue messages serve storage coordination and messaging purposes. Therefore, managed identity with Microsoft Entra authentication is the preferred approach.

Q233. Which Azure SQL Database feature provides private network connectivity without exposing the database through a public endpoint?

1) Private Endpoint
2) Elastic pool
3) Query Store
4) Database indexing

Correct Answer: 1)

Explanation:

An Azure SQL Database Private Endpoint provides private connectivity to the database through an Azure virtual network. It creates a private IP address for the database resource, allowing applications in connected networks to communicate with the database without relying on a public endpoint. This is useful for workloads requiring network isolation and controlled access. Elastic pools are designed for resource sharing among databases, Query Store captures query performance information, and indexing improves query performance. Therefore, Private Endpoint is the correct choice when an application needs to connect to Azure SQL Database through private network connectivity.

Q234. Which Azure SQL capability helps developers identify query performance changes and analyze query execution behavior over time?

1) Query Store
2) Private Endpoint
3) Firewall rule
4) Elastic pool

Correct Answer: 1)

Explanation:

Query Store captures information about queries, execution plans, and performance statistics in Azure SQL Database. It allows developers and database administrators to analyze query performance over time and investigate changes in execution behavior. Query Store can be especially useful when a query becomes slower after a database change or when different execution plans produce different performance characteristics. Private Endpoints provide networking capabilities, firewall rules control access, and elastic pools manage shared database resources. Therefore, Query Store is the appropriate Azure SQL feature when the objective is to analyze query performance history and execution behavior.

Q235. Which Azure Service Bus feature ensures that messages with the same session identifier are processed in order?

1) Topics
2) Sessions
3) Dead-letter queues
4) Duplicate detection

Correct Answer: 2)

Explanation:

Azure Service Bus sessions provide a mechanism for grouping related messages and maintaining ordered processing for messages that share the same session identifier. This is useful when message order is important, such as processing events belonging to a particular customer, order, or transaction. A receiver can accept a session and process its messages according to the session semantics. Topics and subscriptions provide publish-subscribe messaging, dead-letter queues isolate messages that cannot be successfully processed, and duplicate detection helps prevent duplicate message delivery. Therefore, Service Bus sessions are the correct feature when ordered processing of related messages is required.

Q236. What happens to an Azure Service Bus message that cannot be successfully processed after the configured delivery attempts are exceeded?

1) It is automatically converted into a Cosmos DB item
2) It is moved to the dead-letter queue
3) It is permanently deleted immediately
4) It is sent to Azure CDN

Correct Answer: 2)

Explanation:

Azure Service Bus can move messages to a dead-letter queue when they cannot be successfully delivered or processed according to the configured conditions. The dead-letter queue provides a separate location where problematic messages can be inspected, analyzed, and potentially handled through recovery procedures. This prevents repeatedly failing messages from blocking normal message processing indefinitely. Developers can investigate the reason for dead-lettering and decide whether the message should be corrected, retried, or otherwise handled. Azure CDN does not process Service Bus messages, and messages are not automatically converted into Cosmos DB items. Therefore, the dead-letter queue is the correct destination for such messages.

Q237. Which Azure Event Grid feature allows events to be delivered only when they match specified event properties?

1) Event filtering
2) Retry policy
3) Dead-letter destination
4) Topic partitioning

Correct Answer: 1)

Explanation:

Azure Event Grid event filtering allows subscribers to receive only events that meet specified criteria. Filters can be configured using event properties and values, helping reduce unnecessary event processing and network traffic. For example, a subscriber may only need events related to a specific resource type or event type. Retry policies control how Event Grid handles delivery failures, while dead-letter destinations provide a place for events that cannot be delivered successfully after retries. Therefore, event filtering is the appropriate feature when an application should receive only selected events that match defined conditions.

Q238. What is the purpose of an Event Grid dead-letter destination?

1) Store successfully processed events
2) Store events that cannot be delivered successfully
3) Increase Cosmos DB consistency
4) Cache HTTP responses

Correct Answer: 2)

Explanation:

An Event Grid dead-letter destination provides a location for events that could not be delivered successfully after Event Grid’s retry processing. It helps prevent failed events from being permanently lost and allows developers to inspect and process them later. A supported storage destination can be configured according to the Event Grid setup. Dead-lettering is especially valuable for applications where every event is important and delivery failures require investigation or recovery. Successfully processed events do not normally need to be placed in a dead-letter destination. Therefore, its primary purpose is to preserve events that Event Grid could not successfully deliver.

Q239. Which Azure Monitor component is commonly used to query and analyze logs collected from Azure resources?

1) Log Analytics workspace
2) Azure CDN
3) Azure Queue Storage
4) Azure Files

Correct Answer: 1)

Explanation:

A Log Analytics workspace provides a centralized environment for collecting, storing, and querying log data from supported Azure resources and applications. Developers and administrators can use Kusto Query Language, or KQL, to analyze collected data, identify trends, investigate failures, and create monitoring solutions. Azure Monitor integrates with Log Analytics to provide broader observability capabilities across resources. Azure CDN is used for content delivery, Queue Storage handles asynchronous messages, and Azure Files provides shared file storage. Therefore, a Log Analytics workspace is the appropriate component when the requirement is to query and analyze centralized Azure monitoring logs.

Q240. Which Application Insights capability helps identify calls between an application and external dependencies such as databases or APIs?

1) Dependency tracking
2) Blob versioning
3) Storage lifecycle management
4) Service Bus sessions

Correct Answer: 1)

Explanation:

Application Insights dependency tracking identifies interactions between an application and external dependencies such as databases, HTTP services, storage services, and other components. This telemetry helps developers understand how dependencies affect application performance and troubleshoot failures across distributed applications. Dependency information can contribute to end-to-end transaction analysis and make it easier to identify slow or failing external calls. Blob versioning protects previous storage object versions, lifecycle management automates storage transitions, and Service Bus sessions provide ordered message processing. Therefore, dependency tracking is the correct Application Insights capability when developers need visibility into external service calls.