2 packs: 15% off with code BUY2. 3 or more: 20% off with code BUY3.

Free Microsoft DP-300 Practice Questions

93 free Microsoft DP-300 practice questions from the CertStash pack of 373, each with the correct answer and a full explanation. The rule is the same for every exam: ten free on the product page, 93 free here, all 373 in the pack, and each step includes the one before it.

Question 1

You have 20 Azure SQL databases provisioned by using the vCore purchasing model. You plan to create an Azure SQL Database elastic pool and add the 20 databases. Which three metrics should you use to size the elastic pool to meet the demands of your workload? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  1. total size of all the databases
  2. geo-replication support
  3. number of concurrently peaking databases * peak CPU utilization per database
  4. maximum number of concurrent sessions for all the databases
  5. total number of databases * average CPU utilization per database
Show answer and explanation

Correct answer: A, C, E. total size of all the databases; number of concurrently peaking databases * peak CPU utilization per database; total number of databases * average CPU utilization per database

To properly size an Azure SQL Database elastic pool, you need three key metrics: A) the total size of all databases to determine storage requirements, C) the number of concurrently peaking databases multiplied by peak CPU utilization per database to understand peak computational demand, and E) the total number of databases multiplied by average CPU utilization per database to understand baseline resource consumption. These three metrics together provide the storage, peak load, and average load dimensions needed for accurate pool sizing.

Why the other options are wrong

  • B. Geo-replication support is a feature configuration, not a sizing metric for the elastic pool itself.
  • D. While concurrent sessions matter for capacity planning, the specific metric of maximum concurrent sessions for all databases is less relevant than CPU utilization metrics for elastic pool sizing.

Question 2

You have a Microsoft SQL Server 2019 database named DB1 that uses the following database-level and instance-level features. • Clustered columnstore indexes • Automatic tuning • Change tracking • PolyBase You plan to migrate DB1 to an Azure SQL database. What feature should be removed or replaced before DB1 can be migrated?

  1. Clustered columnstore indexes
  2. PolyBase
  3. Change tracking
  4. Automatic tuning
Show answer and explanation

Correct answer: B. PolyBase

PolyBase must be removed before migration to Azure SQL Database because Azure SQL Database does not support PolyBase functionality. Clustered columnstore indexes, automatic tuning, and change tracking are all supported features in Azure SQL Database, so they can remain in place during migration.

Why the other options are wrong

  • A. Clustered columnstore indexes are fully supported in Azure SQL Database.
  • C. Change tracking is a supported feature in Azure SQL Database and does not need to be removed.
  • D. Automatic tuning is supported in Azure SQL Database and can be migrated without modification.

Question 3

You have a Microsoft SQL Server 2019 instance in an on-premises datacenter. The instance contains a 4-TB database named DB1. You plan to migrate DB1 to an Azure SQL Database managed instance. What should you use to minimize downtime and data loss during the migration?

  1. distributed availability groups
  2. database mirroring
  3. Always On Availability Group
  4. Azure Database Migration Service
Show answer and explanation

Correct answer: D. Azure Database Migration Service

Azure Database Migration Service (DMS) is specifically designed to minimize downtime and data loss during database migrations to Azure SQL Database managed instances. It provides capabilities for online migrations with continuous synchronization, allowing the source database to remain operational during the migration process. Distributed availability groups, database mirroring, and Always On Availability Groups are SQL Server features that cannot directly migrate to managed instances and are not appropriate for this scenario.

Why the other options are wrong

  • A. Distributed availability groups are on-premises SQL Server features and do not facilitate migration to Azure.
  • B. Database mirroring is a legacy SQL Server feature that cannot be used to migrate to Azure managed instances.
  • C. Always On Availability Groups are on-premises features; while they can be part of a migration strategy, Azure DMS is the proper tool to orchestrate the migration itself.

Question 4

You are designing a streaming data solution that will ingest variable volumes of data. You need to ensure that you can change the partition count after creation. Which service should you use to ingest the data?

  1. Azure Event Hubs Standard
  2. Azure Stream Analytics
  3. Azure Data Factory
  4. Azure Event Hubs Dedicated
Show answer and explanation

Correct answer: D. Azure Event Hubs Dedicated

Azure Event Hubs Dedicated tier allows you to change the partition count after creation, providing flexibility for variable data volumes. Event Hubs Standard tier has a fixed partition limit and does not allow partition count changes after creation. Stream Analytics and Data Factory are processing and orchestration services, not ingestion services for managing partition configuration.

Why the other options are wrong

  • A. Azure Event Hubs Standard does not support changing the partition count after the event hub is created.
  • B. Azure Stream Analytics is a stream processing service, not an ingestion service with partition management capabilities.
  • C. Azure Data Factory is an orchestration service for data movement and transformation, not a streaming ingestion service with partition configuration options.

Question 5

You have an Azure Synapse Analytics Apache Spark pool named Pool1. You plan to load JSON files from an Azure Data Lake Storage Gen2 container into the tables in Pool1. The structure and data types vary by file. You need to load the files into the tables. The solution must maintain the source data types. What should you do?

  1. Load the data by using PySpark.
  2. Load the data by using the OPENROWSET Transact-SQL command in an Azure Synapse Analytics serverless SQL pool.
  3. Use a Get Metadata activity in Azure Data Factory.
  4. Use a Conditional Split transformation in an Azure Synapse data flow.
Show answer and explanation

Correct answer: A. Load the data by using PySpark.

PySpark is the optimal choice for loading JSON files with variable structures and data types into Spark tables while maintaining source data types. PySpark provides schema inference and flexibility to handle varying JSON structures, and it natively preserves data types during the load process. OPENROWSET requires predefined schemas, Data Factory's Get Metadata is for metadata retrieval only, and Conditional Split is for row-level transformations, not data loading.

Why the other options are wrong

  • B. OPENROWSET in a serverless SQL pool requires predefined schemas and cannot effectively handle variable JSON structures and types.
  • C. Get Metadata activity in Data Factory retrieves metadata information only and does not load data into tables.
  • D. Conditional Split transformation in data flows is used for row-level branching logic, not for loading JSON files with variable schemas into tables.

Question 6

You are designing a date dimension table in an Azure Synapse Analytics dedicated SQL pool. The date dimension table will be used by all the fact tables. Which distribution type should you recommend to minimize data movement?

  1. HASH
  2. REPLICATE
  3. ROUND_ROBIN
Show answer and explanation

Correct answer: B. REPLICATE

REPLICATE distribution type is the best choice for a date dimension table that will be used by all fact tables. Replicating the dimension table to all compute nodes eliminates data movement during joins, as every node has a complete copy of the dimension table. This minimizes data shuffling and optimizes query performance across all joins with fact tables.

Why the other options are wrong

  • A. HASH distribution on the date dimension would require data movement when joining with multiple fact tables distributed on different columns.
  • C. ROUND_ROBIN distribution is inefficient for dimension tables that are repeatedly joined, as it causes excessive data movement during each join operation.

Question 7

You have an Azure Synapse Analytics workspace named WS1 that contains an Apache Spark pool named Pool1. You plan to create a database named DB1 in Pool1. You need to ensure that when tables are created in DB1, the tables are available automatically as external tables to the built-in serverless SQL pool. Which format should you use for the tables in DB1?

  1. JSON
  2. CSV
  3. Parquet
  4. ORC
Show answer and explanation

Correct answer: C. Parquet

Parquet format should be used for tables in the Spark pool database to ensure they are automatically available as external tables to the serverless SQL pool. Parquet is the optimal format for interoperability between Apache Spark pools and serverless SQL pools in Synapse Analytics, providing efficient columnar storage and seamless integration.

Why the other options are wrong

  • A. JSON format is not the standard format for Spark-to-serverless SQL pool integration and lacks the performance benefits of columnar formats.
  • B. CSV format is less efficient and does not provide the automatic external table availability that Parquet offers.
  • D. ORC format, while columnar, is not the recommended standard format for Synapse integration; Parquet is the preferred choice.

Question 8

You are designing an anomaly detection solution for streaming data from an Azure IoT hub. The solution must meet the following requirements: • Send the output to an Azure Synapse. • Identify spikes and dips in time series data. • Minimize development and configuration effort. Which should you include in the solution?

  1. Azure SQL Database
  2. Azure Databricks
  3. Azure Stream Analytics
Show answer and explanation

Correct answer: C. Azure Stream Analytics

Azure Stream Analytics is the ideal choice for this solution. It has built-in anomaly detection capabilities for identifying spikes and dips in time series data, can send output directly to Azure Synapse, and requires minimal development effort with its declarative SQL-like query language. It is purpose-built for real-time streaming scenarios with anomaly detection functionality.

Why the other options are wrong

  • A. Azure SQL Database is not suitable for processing streaming data from IoT hubs and lacks built-in anomaly detection capabilities for time series data.
  • B. Azure Databricks, while powerful, requires more development and configuration effort compared to Stream Analytics for this specific anomaly detection scenario.

Question 9

You plan to build a structured streaming solution in Azure Databricks. The solution will count new events in five-minute intervals and report only events that arrive during the interval. The output will be sent to a Delta Lake table. Which output mode should you use?

  1. complete
  2. append
  3. update
Show answer and explanation

Correct answer: B. append

The 'append' mode is correct for this scenario because it writes only new rows that arrived in the current interval to the output sink. Since the requirement specifies reporting only events that arrive during each five-minute interval without updating previous results, append mode is the appropriate choice that minimizes data redundancy.

Why the other options are wrong

  • A. Complete mode would rewrite the entire result set every interval, which is inefficient for this use case and contradicts the requirement to report only new events in each interval.
  • C. Update mode is designed for stateful operations where existing rows need to be modified, but this scenario requires only appending new interval results.

Question 10

You have an Azure subscription that contains an instance of SQL Server on an Azure virtual machine named VM1 and an Azure Active Directory Domain Services (Azure AD DS) domain that contains two users named User1 and User 2. On the default instance of SQL Server on VM1, you create a credential named Credential1 for User1. You need to ensure that User2 can create a SQL Server Agent proxy that will use Credential1. The solution must use the principle of least privilege. Which role should you assign to User2?

  1. SQLAgentUserRole
  2. SQLAgentReaderRole
  3. SQLAgentOperatorRole
  4. sysadmin
Show answer and explanation

Correct answer: D. sysadmin

User2 must be assigned the sysadmin role to create a SQL Server Agent proxy that uses credentials created by another user. Only sysadmin role members have the privilege to create proxies and reference credentials created by other users. This is a special permission required for proxy management that goes beyond the standard SQL Agent roles.

Why the other options are wrong

  • A. SQLAgentUserRole does not have permissions to create proxies.
  • B. SQLAgentReaderRole only allows reading SQL Agent information.
  • C. SQLAgentOperatorRole allows managing existing proxies but cannot create new ones or access credentials from other users.

What people say about the full DP-300 pack 4.8 from 21

I used Certstash for my DP-300 preparation and found the questions very similar to the real exam. The explanations were clear, and this helped me pass on my first attempt. Highly recommended for anyone serious about clearing the certification.
Callum SterlingDP-300
Passed my DP-300 exam with 90% marks. all this happened because of the exam dumps I have used from this website. I will surely order again in the future!
Martin RiveraDP-300
No complaints, passed DP-300.
CHEN NAKAMURADP-300

Question 11

You have an Azure SQL database named db1 on a server named server1. The Intelligent Insights diagnostics log identifies queries that cause performance issues due to tempDB contention. You need to resolve the performance issues. What should you do?

  1. Implement memory-optimized tables.
  2. Run the DBCC FLUSHPROCINDB command.
  3. Replace the sequential index keys with nonsequential keys.
  4. Run the DBCC DBREINDEX command.
Show answer and explanation

Correct answer: A. Implement memory-optimized tables.

Memory-optimized tables reduce tempdb contention because they store data in memory rather than requiring tempdb disk operations. For workloads with high tempdb contention, migrating qualifying tables to in-memory OLTP reduces pressure on tempdb and improves performance. This is particularly effective for temporary objects and frequently accessed data.

Why the other options are wrong

  • B. DBCC FLUSHPROCINDB clears cached query plans, not related to tempdb contention issues
  • C. Index key sequentiality does not directly address tempdb contention problems
  • D. DBCC DBREINDEX rebuilds indexes on user tables, not a solution for tempdb contention

Question 12

You have an Azure subscription that contains an Azure SQL managed instance named SQLMI1 and a Log Analytics workspace named Workspace1. You need to collect performance metrics for SQLMI1 and stream the metrics to Workspace. What should you do first?

  1. Create a private endpoint connection on SQLMI1.
  2. Configure Azure SQL Analytics to use Workspace1.
  3. Modify the Compute + storage settings for SQLMI1.
  4. Modify the diagnostic settings for SQLMI1.
Show answer and explanation

Correct answer: D. Modify the diagnostic settings for SQLMI1.

Modifying diagnostic settings for SQLMI1 is the first step to stream performance metrics to Log Analytics. Diagnostic settings control what data is collected and where it is sent. Once diagnostic settings are configured to send metrics and logs to Workspace1, the streaming will be established. Private endpoints, Azure SQL Analytics configuration, and compute settings are either secondary configurations or not directly related to metric streaming.

Why the other options are wrong

  • A. Private endpoints manage network connectivity but are not the first step for metric streaming.
  • B. Azure SQL Analytics configuration follows after diagnostic settings are established.
  • C. Compute and storage settings do not affect metrics streaming to Log Analytics.

Question 13

You have an Azure SQL managed instance named SQLMI1 that has the following settings: • vCores: 4 • Service tier: General Purpose • Hardware generation: Standard-series (Gen5) You discover that memory pressure on SQLMI1 is high. You need to reduce the memory pressure on SQLMI1. The solution must minimize costs. What should to do?

  1. Enable the Query Store.
  2. Change vCores to 8.
  3. Change Hardware generation to Premium-series.
  4. Change Service tier to Business Critical.
Show answer and explanation

Correct answer: B. Change vCores to 8.

To reduce memory pressure on an Azure SQL managed instance while minimizing costs, increasing vCores is the most cost-effective solution. More vCores directly increases available memory proportionally. Enabling Query Store (A) helps monitor but doesn't reduce pressure. Premium-series (C) and Business Critical tier (D) are more expensive upgrades that would increase costs rather than minimize them.

Why the other options are wrong

  • A. Query Store aids monitoring but does not reduce memory pressure.
  • C. Premium-series hardware is significantly more expensive and not necessary.
  • D. Business Critical tier increases costs substantially without being required for this scenario.

Question 14

You have an Azure SQL database named DB1. You need to query the fragmentation information of data and indexes for the tables in DB1. Which command should you run?

  1. sys.dm_db_index_usage_stats
  2. DBCC CHECKALLOC
  3. DBCC SHOWCONTIG
  4. sts.dm_db_index_physical_stats
Show answer and explanation

Correct answer: D. sts.dm_db_index_physical_stats

sys.dm_db_index_physical_stats is the correct DMV for querying fragmentation information of data and indexes. It returns detailed physical fragmentation metrics for all indexes and heaps in the database. sys.dm_db_index_usage_stats shows usage patterns, DBCC CHECKALLOC checks allocation integrity, and DBCC SHOWCONTIG is a legacy command replaced by the modern DMV approach.

Why the other options are wrong

  • A. sys.dm_db_index_usage_stats shows usage patterns and statistics, not fragmentation metrics.
  • B. DBCC CHECKALLOC validates storage allocation integrity, not fragmentation.
  • C. DBCC SHOWCONTIG is a legacy command superseded by modern DMVs like dm_db_index_physical_stats.

Question 15

You have an Azure subscription that contains an instance of SQL Server on an Azure virtual machine named SQLVM1 and a user named User1. SQLVM1 hosts a database named DB1. You need to ensure that User1 can create a scheduled task to perform a full backup of DB1. The solution must use the principle of least privilege. Which built-in database role should you assign to User1?

  1. db_owner
  2. SQLAgentReaderRole
  3. SQLAgentUserRole
  4. SQLAgentOperatorRole
Show answer and explanation

Correct answer: C. SQLAgentUserRole

SQLAgentUserRole is the least privileged SQL Server Agent role that lets a user create and schedule jobs, including a job that runs a full backup. Members can create, edit and run the jobs they own. The other Agent roles add rights the user does not need.

Why the other options are wrong

  • A. db_owner grants full control of the database and does not by itself grant rights to create SQL Server Agent jobs.
  • B. SQLAgentReaderRole includes SQLAgentUserRole rights plus viewing all jobs, which is more than needed.
  • D. SQLAgentOperatorRole adds rights to manage and run other users' jobs, which exceeds least privilege.

Question 16

You are designing a security model for an Azure Synapse Analytics dedicated SQL pool that will support multiple companies. You need to ensure that users from each company can view only the data of their respective company. Which two objects should you include in the solution? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  1. a column encryption key
  2. asymmetric keys
  3. a function
  4. a custom role-based access control (RBAC) role
  5. a security policy
Show answer and explanation

Correct answer: C, E. a function; a security policy

A security policy (E) implements row-level security logic to restrict data access by company, and a function (C) defines the filtering logic that determines which rows each user can access based on their company context. Together, they enforce company-level data isolation in the dedicated SQL pool. Column encryption keys encrypt columns, asymmetric keys support encryption but don't define access logic, and custom RBAC roles control permissions but don't filter row-level data.

Why the other options are wrong

  • A. Column encryption keys encrypt data at the column level but don't control which rows users can access.
  • B. Asymmetric keys support encryption operations but don't define or enforce row-level access policies.
  • D. Custom RBAC roles control object-level permissions but cannot filter rows based on company context at the data level.

Question 17

You have an instance of SQL Server on Azure Virtual Machines. You need to ensure that a user named User1 can configure proxy accounts for SQL Server Agent jobs. The solution must use the principle of least privilege. Which role should you assign to User1?

  1. sysadmin
  2. SQLAgentUserRole
  3. SQLAgentReaderRole
  4. SQLAgentOperatorRole
Show answer and explanation

Correct answer: A. sysadmin

Creating and configuring SQL Server Agent proxy accounts requires membership in the sysadmin fixed server role. The msdb SQL Server Agent roles can only use proxies they are granted, not create or configure them. So sysadmin is the least privileged role that meets the requirement.

Why the other options are wrong

  • B. SQLAgentUserRole can use proxies it has been granted but cannot create or configure them.
  • C. SQLAgentReaderRole can view jobs but cannot create or configure proxies.
  • D. SQLAgentOperatorRole can manage jobs but still cannot create or configure proxy accounts.

Question 18

You have an Azure subscription that contains an Azure SQL database. The database contains a table named tablet that uses partitioned columnstores. You need to configure table1 to meet the following requirements: • Each partition must be compressed. • The compression ratio must be maximized. • You must be able to index the compressed data. What should you use?

  1. page compression
  2. columnstore compression
  3. GZIP compression
  4. columnstore archival compression
Show answer and explanation

Correct answer: D. columnstore archival compression

Columnstore archival compression provides the maximum compression ratio for partitioned columnstore indexes while maintaining the ability to index compressed data. It offers superior compression compared to regular columnstore compression by using additional CPU cycles during compression and decompression. This meets all three requirements: partition compression, maximized compression ratio, and indexability of compressed data.

Why the other options are wrong

  • A. Page compression is for traditional rowstore tables, not for columnstore indexes.
  • B. Standard columnstore compression provides less compression than archival compression.
  • C. GZIP compression is not a native SQL Server option for columnstore indexes.

Question 19

You have SQL Server 2019 on an Azure virtual machine that runs Windows Server 2019. The virtual machine has 4 vCPUs and 28 GB of memory. You scale up the virtual machine to 8 vCPUSs and 64 GB of memory. You need to provide the lowest latency for tempdb. What is the total number of data files that tempdb should contain?

  1. 2
  2. 4
  3. 8
  4. 64
Show answer and explanation

Correct answer: C. 8

SQL Server best practice recommends creating one tempdb data file per logical processor core to minimize contention and maximize performance. The scaled-up virtual machine has 8 vCPUs, so tempdb should have 8 data files. This configuration reduces allocation contention and provides the lowest latency for tempdb operations.

Why the other options are wrong

  • A. 2 data files is insufficient for an 8 vCPU system and will cause contention.
  • B. 4 data files does not match the number of available logical processors (8 vCPUs).
  • D. 64 files far exceeds the number of logical processors and wastes resources without performance benefit.

Question 20

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You have an Azure Synapse Analytics dedicated SQL pool that contains a table named Table1. You have files that are ingested and loaded into an Azure Data Lake Storage Gen2 container named container1. You plan to insert data from the files into Table1 and transform the data. Each row of data in the files will produce one row in the serving layer of Table1. You need to ensure that when the source data files are loaded to container1, the DateTime is stored as an additional column in Table1. Solution: You use an Azure Synapse Analytics serverless SQL pool to create an external table that has an additional DateTime column. Does this meet the goal?

  1. Yes
  2. No
Show answer and explanation

Correct answer: B. No

While you can create an external table in a serverless SQL pool with an additional DateTime column, the issue is that this external table itself does not automatically populate that DateTime column from file metadata. The external table definition alone does not satisfy the requirement to store the file's DateTime as data is loaded; you would need additional logic in a pipeline to actually populate that column.

Question 21

You have an on-premises Microsoft SQL server that uses the FileTables and Filestream features. You plan to migrate to Azure SQL. Which service should you use?

  1. Azure SQL Database
  2. SQL Server on an Azure Virtual Machine
  3. Azure SQL Managed Instance
  4. Azure Database for MySQL
Show answer and explanation

Correct answer: B. SQL Server on an Azure Virtual Machine

FileTables and FileStream are SQL Server-specific features that are not supported in Azure SQL Database or Azure SQL Managed Instance. SQL Server on Azure Virtual Machine provides a full SQL Server instance with all on-premises features intact, making it the only viable option for migrating databases that depend on these advanced features.

Why the other options are wrong

  • A. Azure SQL Database does not support FileTables or FileStream features.
  • C. Azure SQL Managed Instance does not support FileTables or FileStream features.
  • D. Azure Database for MySQL is not compatible with SQL Server databases or these SQL Server-specific features.

Question 22

You have a new Azure SQL database. The database contains a column that stores confidential information. You need to track each time values from the column are returned in a query. The tracking information must be stored for 365 days from the date the query was executed. Which three actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  1. Turn on auditing and write audit logs to an Azure Storage account.
  2. Add extended properties to the column.
  3. Turn on auditing and write audit logs to an Event Hub
  4. Apply sensitivity labels named Highly Confidential to the column.
  5. Turn on Azure Defender for SQL
Show answer and explanation

Correct answer: A, D, E. Turn on auditing and write audit logs to an Azure Storage account; Apply sensitivity labels named Highly Confidential to the column; Turn on Azure Defender for SQL

To track access to confidential columns, you need: A) Auditing with storage account retention (365-day requirement); D) Sensitivity labels to classify the confidential data; and E) Azure Defender for SQL to provide threat detection and monitoring of the sensitive data access. Together these provide classification, detection, and long-term audit trail storage.

Why the other options are wrong

  • B. Extended properties are metadata descriptors and do not track query execution or access patterns.
  • C. While Event Hub is an auditing destination, it does not provide the 365-day retention capability that Azure Storage accounts offer.

Question 23

You have SQL Server on an Azure virtual machine. You need to add a 4-TB volume that meets the following requirements: • Maximizes IOPs • Uses premium solid state drives (SSDs) What should you do?

  1. Attach two mirrored 4-TB SSDs.
  2. Attach a stripe set that contains four 1-TB SSDs.
  3. Attach a RAID-5 array that contains five 1-TB SSDs.
  4. Attach a single 4-TB SSD.
Show answer and explanation

Correct answer: B. Attach a stripe set that contains four 1-TB SSDs.

A stripe set (RAID-0) containing four 1-TB SSDs maximizes IOPs by distributing I/O operations across multiple disks in parallel. Each disk contributes its IOPs to the total, so four 1-TB SSDs in a stripe set provide better performance than a single 4-TB SSD. Striping is preferred over mirroring (which duplicates data) or RAID-5 (which includes parity overhead) when IOPs maximization is the primary goal.

Why the other options are wrong

  • A. Mirrored SSDs duplicate data rather than stripe it, providing redundancy but not maximizing IOPs
  • C. RAID-5 includes parity calculations that consume IOPs and reduce overall throughput compared to striping
  • D. A single 4-TB SSD provides only one disk's worth of IOPs; multiple disks striped together aggregate their IOPs

Question 24

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You have an Azure Synapse Analytics dedicated SQL pool that contains a table named Table1. You have files that are ingested and loaded into an Azure Data Lake Storage Gen2 container named container1. You plan to insert data from the files into Table1 and transform the data. Each row of data in the files will produce one row in the serving layer of Table1. You need to ensure that when the source data files are loaded to container1, the DateTime is stored as an additional column in Table1. Solution: In an Azure Synapse Analytics pipeline, you use a Get Metadata activity that retrieves the DateTime of the files. Does this meet the goal?

  1. Yes
  2. No
Show answer and explanation

Correct answer: A. Yes

A Get Metadata activity in an Azure Synapse pipeline can retrieve file metadata including the DateTime property of files in container1. This DateTime can then be captured and passed along as an additional column when the data is inserted into Table1, meeting the requirement to store the file's DateTime as a column.

Question 25

You have an on-premises datacenter that contains a 2-TB Microsoft SQL Server 2019 database named DB1. You need to recommend a solution to migrate DB1 to an Azure SQL managed instance. The solution must minimize downtime and administrative effort. What should you include in the recommendation?

  1. Log Replay Service (LRS)
  2. log shipping
  3. transactional replication
  4. SQL Data Sync
Show answer and explanation

Correct answer: A. Log Replay Service (LRS)

Log Replay Service (LRS) is the Azure SQL Managed Instance native migration tool specifically designed for minimal downtime migrations from on-premises SQL Server. It uses log shipping technology but is a fully managed Azure service that automates the process, reducing administrative effort while minimizing downtime during the cutover phase.

Why the other options are wrong

  • B. Log shipping is a manual process requiring more administrative effort and doesn't provide the managed migration experience that LRS offers.
  • C. Transactional replication is primarily for ongoing synchronization rather than initial large-scale database migration and requires more setup.
  • D. SQL Data Sync is designed for bidirectional synchronization of specific tables, not for full database migration scenarios.

25 questions in. Want the rest? The first half of the pack, free by email · The full pack

Question 26

You create five Azure SQL Database instances on the same logical server. In each database, you create a user for an Azure Active Directory (Azure AD) user named User1. User1 attempts to connect to the logical server by using Azure Data Studio and receives a login error. You need to ensure that when User1 connects to the logical server by using Azure Data Studio, User1 can see all the databases. What should you do?

  1. Create User1 in the master database.
  2. Assign User1 the db_datareader role for the master database.
  3. Assign User1 the db_datareader role for the databases that User1 creates.
  4. Grant SELECT on sys.databases to public in the master database.
Show answer and explanation

Correct answer: A. Create User1 in the master database.

Creating User1 in the master database is necessary because user connections to the logical server require authentication at the master database level first. Only after authenticating in master can User1 connect to and see the other databases. This is a fundamental requirement of SQL Server login architecture where the master database acts as the authentication gateway for the server instance.

Why the other options are wrong

  • B. Assigning db_datareader to master alone doesn't provide the initial authentication mechanism needed for User1 to connect to the server.
  • C. This assigns permissions only to databases User1 creates, which doesn't solve the connection problem for existing databases.
  • D. Granting SELECT on sys.databases to public doesn't create the necessary user principal for User1 to authenticate to the server.

Question 27

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You have SQL Server 2019 on an Azure virtual machine. You are troubleshooting performance issues for a query in a SQL Server instance. To gather more information, you query sys.dm_exec_requests and discover that the wait type is PAGELATCH_UP and the wait_resource is 2:3:905856. You need to improve system performance. Solution: You shrink the transaction log file. Does this meet the goal?

  1. Yes
  2. No
Show answer and explanation

Correct answer: B. No

Shrinking the transaction log file does not meet the goal. The PAGELATCH_UP wait indicates contention on buffer pool pages, specifically a latch conflict on a data page (as shown by the wait_resource of 2:3:905856, which is database:file:page). This is a concurrency issue with data pages, not a transaction log capacity problem. Shrinking the transaction log would not reduce page latch contention.

Question 28

You have an Azure virtual machine based on a custom image named VM1. VM1 hosts an instance of Microsoft SQL Server 2019 Standard. You need to automate the maintenance of VM1 to meet the following requirements: • Automate the patching of SQL Server and Windows Server. • Automate full database backups and transaction log backups of the databases on VM1. • Minimize administrative effort. What should you do first?

  1. Enable a system-assigned managed identity for VM1
  2. Register the Azure subscription to the Microsoft.Sql resource provider
  3. Install an Azure virtual machine Desired State Configuration (DSC) extension on VM1
  4. Register the Azure subscription to the Microsoft.SqlVirtualMachine resource provider
Show answer and explanation

Correct answer: D. Register the Azure subscription to the Microsoft.SqlVirtualMachine resource provider

Registering the subscription to the Microsoft.SqlVirtualMachine resource provider is the first step to enable the SQL IaaS Agent extension, which provides automated patching, backup, and management capabilities for SQL Server on Azure VMs. This registration must occur before you can leverage SQL Server-specific automation features within Azure, making it the logical first step.

Why the other options are wrong

  • A. A system-assigned managed identity is useful for access control but is not required as the first step for SQL VM automation.
  • B. The Microsoft.Sql provider is for Azure SQL Database/Managed Instance, not for SQL Server on VMs.
  • C. DSC extensions are a lower-level configuration tool; the SqlVirtualMachine extension provides more integrated SQL-specific automation.

Question 29

You have SQL Server 2019 on an Azure virtual machine that runs Windows Server 2019. The virtual machine has 4 vCPUs and 28 GB of memory. You scale up the virtual machine to 8 vCPUs and 64 GB of memory. You need to reduce tempdb contention without negatively affecting server performance. What is the number of secondary data files that you should configure for tempdb?

  1. 2
  2. 4
  3. 8
  4. 64
Show answer and explanation

Correct answer: C. 8

The standard recommendation for tempdb data files is to create one secondary data file per logical CPU core to minimize contention. After scaling to 8 vCPUs, the best practice is to configure 8 secondary tempdb data files (matching the number of vCPUs) to allow each core to have dedicated allocation structures and reduce tempdb contention.

Why the other options are wrong

  • A. 2 files is insufficient for 8 vCPUs and will not adequately reduce contention
  • B. 4 files is half the number of vCPUs and does not follow the best practice guideline
  • D. 64 files far exceeds the number of vCPUs and creates unnecessary overhead and management complexity

Question 30

Your company uses Azure Stream Analytics to monitor devices. The company plans to double the number of devices that are monitored. You need to monitor a Stream Analytics job to ensure that there are enough processing resources to handle the additional load. Which metric should you monitor?

  1. Input Deserialization Errors
  2. Late Input Events
  3. Early Input Events
  4. Watermark delay
Show answer and explanation

Correct answer: D. Watermark delay

Watermark Delay is the key metric to monitor when planning for increased device load. It measures how far behind the job's event processing time is compared to the current wall-clock time. As you double the device count, increasing Watermark Delay indicates the job cannot keep up with the input volume, signaling the need for more streaming units or job optimization.

Why the other options are wrong

  • A. Input Deserialization Errors indicates malformed input data, not insufficient processing resources.
  • B. Late Input Events refers to events with timestamps in the past, not resource capacity issues.
  • C. Early Input Events refers to events with future timestamps, not resource capacity issues.

Question 31

You have an on-premises Microsoft SQL Server 2019 instance named SQL1 that hosts a database named db1. You have an Azure subscription that contains an Azure SQL managed instance named MI1 and an Azure Storage account named storage1. You plan to migrate db1 to MI1 by using the backup and restore process. You need to ensure that you can back up db1 to storage1. The solution must meet the following requirements: • Use block blob storage. • Maximize security. What should you do on storage1?

  1. Generate a shared access signature (SAS).
  2. Create an access policy.
  3. Rotate the storage keys.
  4. Enable infrastructure encryption.
Show answer and explanation

Correct answer: A. Generate a shared access signature (SAS).

A shared access signature (SAS) is the correct solution for maximizing security when backing up SQL Server databases to Azure Storage. SAS tokens provide time-limited, granular access control to storage resources without exposing account keys, and they are the recommended method for SQL Server backup operations. SAS tokens can be restricted to specific operations, containers, and time periods, which aligns with security best practices.

Why the other options are wrong

  • B. Access policies are container-level constructs but are less secure than SAS for backup scenarios as they don't provide the same granular control.
  • C. Rotating storage keys is a general security practice but doesn't address the specific secure authentication method needed for backup operations.
  • D. Infrastructure encryption protects data at rest but doesn't solve the access authentication problem for the backup process itself.

Question 32

You have an Azure subscription. You need to deploy a new Azure SQL database by using Azure Command-Line Interface (CLI). Which three parameters are required?

  1. --name, --edition, and --capacity
  2. --name, --tier, and --min-capacity
  3. --name, --resource-group, and --server
  4. --name, --licence-type, and --capacity
Show answer and explanation

Correct answer: C. --name, --resource-group, and --server

The three required parameters for deploying an Azure SQL database via Azure CLI are -- name (database name), --resource-group (the resource group where the database will be created), and --server (the SQL Server instance that will host the database). These are the minimal identifiers needed to provision a database.

Why the other options are wrong

  • A. Edition and capacity parameters are optional for Azure SQL Database.
  • B. Tier and min-capacity are not the standard parameter names; resource-group and server are required.
  • D. License-type is not a required parameter for Azure SQL Database deployment via CLI.

Question 33

You have an instance of SQL Server on Azure Virtual Machines named VM1. You plan to schedule a SQL Server Agent job that will rebuild indexes of the databases hosted on VM1. You need to configure the account that will be used by the agent. The solution must use the principle of least privilege. Which operating system user right should you assign to the account?

  1. Increase scheduling priority
  2. Log on as a service
  3. Profile system performance
  4. Log on as a batch job
Show answer and explanation

Correct answer: B. Log on as a service

Log on as a service (B) is the correct user right because the SQL Server Agent needs this right to run as a Windows service that executes scheduled jobs automatically without user interaction. This is the specific operating system privilege required for service accounts that need to execute background tasks. This right allows the account to start and run SQL Server Agent as a service while following the principle of least privilege.

Why the other options are wrong

  • A. Increase scheduling priority is not a required user right for SQL Server Agent operation.
  • C. Profile system performance is a diagnostic right, not needed for basic SQL Server Agent job scheduling.
  • D. Log on as a batch job is used for task scheduler jobs, not for SQL Server Agent service accounts.

Question 34

You have an on-premises Microsoft SQL Server 2022 instance that hosts a 60-TB production database named DB1. You plan to migrate DB1 to Azure. You need to recommend a hosting solution for DB1. Which Azure SQL Database service tier should you use to host DB1?

  1. Hyperscale
  2. Business Critical
  3. General Purpose
Show answer and explanation

Correct answer: A. Hyperscale

Hyperscale is the appropriate service tier for a 60-TB database because it is specifically designed to handle very large databases with virtually unlimited storage capacity (up to 100 TB), automatic storage scaling, and superior performance for large workloads, making it ideal for this 60-TB scenario.

Why the other options are wrong

  • B. Business Critical tier has a maximum size of 4 TB and is not suitable for a 60-TB database.
  • C. General Purpose tier has a maximum size of 4 TB and cannot accommodate a 60-TB database.

Question 35

You have an Azure SQL database named DB1. You need to encrypt DB1. The solution must meet the following requirements: • Encrypt data in motion. • Support comparison operators. • Provide randomized encryption. What should you include in the solution?

  1. Always Encrypted with secure enclaves
  2. Always Encrypted
  3. column-level encryption
  4. Transparent Data Encryption (TDE)
Show answer and explanation

Correct answer: A. Always Encrypted with secure enclaves

Always Encrypted with secure enclaves meets all three requirements: it encrypts data in motion, supports comparison operators (through the secure enclave functionality which allows computations on encrypted data), and provides randomized encryption for improved security. Secure enclaves enable rich computations on encrypted data while maintaining encryption.

Why the other options are wrong

  • B. Always Encrypted without secure enclaves does not support comparison operators on encrypted columns.
  • C. Column-level encryption is not a specific Azure SQL encryption feature and doesn't provide the required functionality.
  • D. Transparent Data Encryption (TDE) only encrypts data at rest and does not encrypt data in motion or support comparison operators.

Question 36

You have an Azure virtual machine named VM1 on a virtual network named VNet1. Outbound traffic from VM1 to the internet is blocked. You have an Azure SQL database named SqlDb1 on a logical server named SqlSrv1. You need to implement connectivity between VM1 and SqlDb1 to meet the following requirements: • Ensure that all traffic to the public endpoint of SqlSrv1 is blocked. • Minimize the possibility of VM1 exfiltrating data stored in SqlDb1. What should you create on VNet1?

  1. a VPN gateway
  2. a service endpoint
  3. a private link
  4. an ExpressRoute gateway
Show answer and explanation

Correct answer: C. a private link

Private Link creates a private endpoint for SqlDb1 on VNet1, allowing VM1 to connect via a private IP address while blocking all traffic to the public endpoint. This meets both requirements: it blocks public endpoint access and minimizes data exfiltration risk by keeping traffic within the private network. Service endpoints don't block public access, VPN gateways don't provide database-level connectivity controls, and ExpressRoute doesn't offer the granular database isolation needed.

Why the other options are wrong

  • A. VPN gateways provide site-to-site or point-to-site connectivity but don't block public endpoint access to SQL databases.
  • B. Service endpoints allow traffic through public endpoints; they don't block public access like Private Link does.
  • D. ExpressRoute provides dedicated network connectivity but doesn't prevent access to public endpoints or provide database-level isolation controls.

Question 37

You have an Azure subscription. You plan to provision a single Azure SQL database. You need to ensure that the database supports the autoscaling of compute resources. Which service tier should you choose?

  1. Premium
  2. General Purpose
  3. Business Critical
  4. Standard
Show answer and explanation

Correct answer: B. General Purpose

General Purpose service tier supports serverless compute with autoscaling of compute resources based on demand. This allows the database to automatically scale compute up or down within a configured range, optimizing costs and performance without manual intervention.

Why the other options are wrong

  • A. Premium tier does not support serverless autoscaling of compute resources.
  • C. Business Critical tier does not support serverless autoscaling of compute resources.
  • D. Standard tier does not support serverless autoscaling of compute resources.

Question 38

You have SQL Server on an Azure virtual machine that contains a database named DB1. DB1 contains a table named CustomerPII. You need to record whenever users query the CustomerPII table. Which two options should you enable? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  1. server audit specification
  2. SQL Server audit
  3. database audit specification
  4. a server principal
Show answer and explanation

Correct answer: B, C. SQL Server audit; database audit specification

To audit table access in SQL Server, you must enable both SQL Server Audit (the server-level audit mechanism) and a database audit specification (which defines what actions on which objects to audit). The database audit specification targets the CustomerPII table within DB1 and specifies which operations to record, while SQL Server Audit provides the infrastructure to capture and log these events.

Why the other options are wrong

  • A. Server audit specification is used for server-level events, not table-level operations on specific databases.
  • D. A server principal is a login/user object, not an auditing mechanism.

Question 39

You have an Azure subscription that contains an Azure SQL database named db1. You need to implement SQL insights for db1. Which two resources should you create first? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  1. a storage account
  2. a virtual machine
  3. an Azure logic app
  4. an Azure function
  5. a Log Analytics workspace
Show answer and explanation

Correct answer: B, E. a virtual machine; a Log Analytics workspace

SQL insights collects its data with a Telegraf agent that runs on a monitoring virtual machine and sends it to a Log Analytics workspace. You therefore create the monitoring virtual machine and the Log Analytics workspace first.

Why the other options are wrong

  • A. A storage account is not a prerequisite for SQL insights.
  • C. An Azure logic app is not a prerequisite for SQL insights.
  • D. An Azure function is not a prerequisite for SQL insights.

Question 40

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You have SQL Server 2019 on an Azure virtual machine. You are troubleshooting performance issues for a query in a SQL Server instance. To gather more information, you query sys.dm_exec_requests and discover that the wait type is PAGELATCH_UP and the wait_resource is 2:3:905856. You need to improve system performance. Solution: You change the data file for the master database to autogrow by 10 percent. Does this meet the goal?

  1. Yes
  2. No
Show answer and explanation

Correct answer: B. No

Changing the autogrow setting for the master database does not address the PAGELATCH_UP wait issue. The wait type indicates contention on a specific data page in database 2 (which is tempdb or a user database, not master), caused by concurrent access patterns. Modifying master database file growth settings is unrelated to resolving page latch contention on data pages in other databases.

Question 41

You have an Azure virtual machine named VM1 on a virtual network named VNet1. Outbound traffic from VM1 to the internet is blocked. You have an Azure SQL database named SqlDb1 on a logical server named SqlSrv1. You need to implement connectivity between VM1 and SqlDb1 to meet the following requirements: • Ensure that VM1 cannot connect to any Azure SQL Server other than SqlSrv1. • Restrict network connectivity to SqlSrv1. What should you create on VNet1?

  1. a VPN gateway
  2. a service endpoint
  3. a private link
  4. an ExpressRoute gateway
Show answer and explanation

Correct answer: C. a private link

Private Link creates a private endpoint specifically for SqlSrv1, allowing VM1 to connect only to that server through a private IP address. This prevents VM1 from connecting to other SQL servers and restricts network connectivity to only SqlSrv1 via the private network. Service endpoints operate at the service level without per-server isolation, VPN gateways don't provide database-specific routing, and ExpressRoute doesn't offer granular SQL server-level access control.

Why the other options are wrong

  • A. VPN gateways provide encrypted tunnels but don't restrict access to specific SQL servers.
  • B. Service endpoints allow access to all SQL Database servers in a region, not just SqlSrv1.
  • D. ExpressRoute provides dedicated connectivity but cannot enforce access to only a specific SQL server.

Question 42

You have the following resources: • 15 SQL Server on Azure Virtual Machines instances • 20 Azure SQL databases You need to recommend a solution to centrally monitor the resources for security vulnerabilities. What should you include in the recommendation?

  1. database audits
  2. Microsoft Defender
  3. SQL insights
  4. Azure SQL Auditing
Show answer and explanation

Correct answer: B. Microsoft Defender

Microsoft Defender (formerly Azure Defender for SQL) is the centralized solution for monitoring security vulnerabilities across both SQL Server on Azure Virtual Machines and Azure SQL databases. It provides unified threat detection, vulnerability scanning, and compliance reporting for hybrid SQL environments. Database audits track activities but don't scan for vulnerabilities, SQL Insights focuses on performance metrics, and Azure SQL Auditing is limited to Azure SQL databases only.

Why the other options are wrong

  • A. Database audits track activities and compliance but do not identify security vulnerabilities.
  • C. SQL Insights is designed for performance monitoring, not security vulnerability assessment.
  • D. Azure SQL Auditing only applies to Azure SQL databases, not SQL Server on VMs.

Question 43

You have an Azure SQL managed instance named SQL1 and two Azure web apps named App1 and App2. You need to limit the number of IOPs that App2 queries generate on SQL1. Which two actions should you perform on SQL1? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  1. Enable query optimizer fixes.
  2. Enable Resource Governor.
  3. Enable parameter sniffing.
  4. Create a workload group.
  5. Configure In-memory OLTP.
  6. Run the Database Engine Tuning Advisor.
  7. Reduce the Max Degree of Parallelism value.
Show answer and explanation

Correct answer: B, D. Enable Resource Governor; Create a workload group.

To limit IOPs and resources for App2 queries in Azure SQL Managed Instance, you must first enable Resource Governor, which is the feature that controls resource allocation. Then you create a workload group to define the specific resource limits for App2's queries. Together, these allow you to cap CPU, memory, and IO operations generated by App2.

Why the other options are wrong

  • A. Query optimizer fixes improve execution plans but do not control resource consumption
  • C. Parameter sniffing relates to query optimization, not resource governance
  • E. In-memory OLTP improves performance but does not govern or limit resource usage
  • F. Database Engine Tuning Advisor optimizes queries and indexes, not resource allocation
  • G. Reducing Max Degree of Parallelism affects CPU usage but is not the primary mechanism for limiting IOPs

Question 44

You have an Azure SQL database named sqldb1. You need to minimize the possibility of Query Store transitioning to a read-only state. What should you do?

  1. Double the value of Data Flush interval
  2. Decrease by half the value of Data Flush Interval
  3. Double the value of Statistics Collection Interval
  4. Decrease by half the value of Statistics Collection interval
Show answer and explanation

Correct answer: B. Decrease by half the value of Data Flush Interval

Decreasing the Data Flush Interval by half ensures that Query Store data is written to storage more frequently, reducing the amount of data that accumulates in memory. This minimizes the possibility of Query Store transitioning to read-only state, which occurs when storage limits are exceeded. More frequent flushing prevents buildup.

Why the other options are wrong

  • A. Doubling the Data Flush Interval would increase time between writes, causing more data to accumulate and increasing read-only risk.
  • C. Statistics Collection Interval affects how often statistics are collected, not storage flushing.
  • D. Decreasing Statistics Collection Interval doesn't address the storage capacity issue that causes read-only transitions.

Question 45

You have an on-premises datacenter that contains a 14-TB Microsoft SQL Server database. You plan to create an Azure SQL managed instance and migrate the on-premises database to the new instance. Which three service tiers support the SQL managed instance? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

  1. General Purpose Standard
  2. Business Critical Memory Optimized Premium
  3. General Purpose Premium
  4. Business Critical Premium
  5. Business Critical Standard
Show answer and explanation

Correct answer: A, B, C. General Purpose Standard; Business Critical Memory Optimized Premium; General Purpose Premium

A 14-TB database needs a tier whose storage limit exceeds 14 TB. General Purpose on standard and premium hardware supports up to 16 TB, and Business Critical on memory optimized premium-series hardware also supports up to 16 TB. Business Critical on standard-series or regular premium-series hardware has a much lower storage cap.

Why the other options are wrong

  • D. Business Critical on regular premium-series hardware has a storage limit below 14 TB.
  • E. Business Critical on standard-series hardware is limited to about 4 TB of storage.

Question 46

You have two on-premises Microsoft SQL Server 2019 instances named SQL1 and SQL2. You need to migrate the databases hosted on SQL1 to Azure. The solution must meet the following requirements: • The service that hosts the migrated databases must be able to communicate with SQL2 by using linked server connections. • Administrative effort must be minimized. What should you use to host the databases?

  1. a single Azure SQL database
  2. SQL Server on Azure Virtual Machines
  3. Azure SQL Managed Instance
  4. an Azure SQL Database elastic pool
Show answer and explanation

Correct answer: C. Azure SQL Managed Instance

Azure SQL Managed Instance is the correct choice because it supports linked server connections to on-premises SQL Server instances like SQL2, allowing seamless communication between the migrated databases and the on-premises server. It also minimizes administrative effort by providing near-complete SQL Server compatibility while being a fully managed service.

Why the other options are wrong

  • A. Single Azure SQL Database does not support linked server connections to on-premises SQL Server instances.
  • B. While SQL Server on VMs would support linked servers, it requires significantly more administrative effort for patching, updates, and maintenance.
  • D. An elastic pool does not support linked server connections and offers the same limitations as single Azure SQL Database.

Question 47

You have an Azure subscription. You plan to deploy an instance of SQL Server on Azure Virtual Machines that supports Write Accelerator. Which virtual machine series should you use?

  1. E-series
  2. G-series
  3. H-series
  4. M-series
Show answer and explanation

Correct answer: D. M-series

The M-series virtual machines are specifically designed for memory-intensive and SQL Server workloads and are the only series that supports Write Accelerator, which provides ultra-low latency writes to premium storage for transaction logs and data files.

Why the other options are wrong

  • A. E-series VMs are optimized for compute but do not support Write Accelerator.
  • B. G-series VMs are legacy compute-optimized instances and do not support Write Accelerator.
  • C. H-series VMs are high-performance compute optimized for HPC workloads, not SQL Server, and do not support Write Accelerator.

Question 48

You have an Azure Databricks resource. You need to log actions that relate to changes in compute for the Databricks resource. Which Databricks services should you log?

  1. clusters
  2. jobs
  3. DBFS
  4. SSH
  5. workspace
Show answer and explanation

Correct answer: A. clusters

To log actions that relate to changes in compute for a Databricks resource, you should enable logging for the clusters service. Clusters represent the compute infrastructure in Databricks, and all cluster lifecycle events (creation, modification, scaling, termination) are logged in the clusters service logs.

Why the other options are wrong

  • B. Jobs logs track job execution and scheduling, not compute resource changes.
  • C. DBFS logs track file system operations, not compute changes.
  • D. SSH logs are not a standard Databricks audit service.
  • E. Workspace logs track workspace object changes, not compute infrastructure changes.

Question 49

Your on-premises network contains a Microsoft SQL Server 2016 server that hosts a database named db1. You have an Azure subscription. You plan to migrate db1 to an Azure SQL managed instance. You need to create the SQL managed instance. The solution must minimize the disk latency of the instance. Which service tier should you use?

  1. Business Critical
  2. Hyperscale
  3. General Purpose
  4. Premium
Show answer and explanation

Correct answer: A. Business Critical

The Business Critical service tier minimizes disk latency for Azure SQL Managed Instance by using high-performance storage and providing multiple synchronous replicas. It is designed for workloads requiring ultra-low latency and is the best choice when disk latency is a critical requirement.

Why the other options are wrong

  • B. Hyperscale is not a service tier available for Azure SQL Managed Instance.
  • C. General Purpose tier uses shared storage and does not optimize for minimal disk latency.
  • D. Premium is not a valid service tier name for Azure SQL Managed Instance.

Question 50

You have an on-premises Microsoft SQL Server 2019 server that hosts a database named DB1. You have an Azure subscription that contains an Azure SQL managed instance named SQLMI1 and a virtual network named VNET1. SQLMI1 resides on VNET1. The on-premises network connects to VNET1 by using an ExpressRoute connection. You plan to migrate DB1 to SQLMI1 by using Azure Database Migration Service. You need to configure VNET1 to support the migration. What should you do?

  1. Configure service endpoints.
  2. Configure virtual network peering.
  3. Deploy an Azure firewall.
  4. Configure network security groups (NSGs).
Show answer and explanation

Correct answer: A. Configure service endpoints.

Service endpoints should be configured to allow Azure Database Migration Service to securely access the Azure SQL Managed Instance over the virtual network. Service endpoints create secure, direct connectivity from the migration service to SQLMI1. While NSGs and firewall rules may eventually be needed, service endpoints are the primary network configuration required to support the migration path through VNET1.

Why the other options are wrong

  • B. Virtual network peering is not necessary since the on-premises network already connects via ExpressRoute and SQLMI1 is already on VNET1.
  • C. Azure Firewall is not the primary requirement; service endpoints provide the necessary secure access.
  • D. NSGs may play a supporting role but service endpoints are the core network configuration needed for DMS.

50 questions in. Want the rest? The first half of the pack, free by email · The full pack

Question 51

You have 50 Azure SQL databases. You need to notify the database owner when the database settings, such as the database size and pricing tier, are modified in Azure. What should you do?

  1. Create a diagnostic setting for the activity log that has the Security log enabled.
  2. For the database, create a diagnostic setting that has the InstanceAndAppAdvanced metric enabled.
  3. Create an alert rule that uses a Metric signal type.
  4. Create an alert rule that uses an Activity Log signal type.
Show answer and explanation

Correct answer: D. Create an alert rule that uses an Activity Log signal type.

Activity Log signal type alerts are used to monitor control plane changes such as database settings modifications (size, pricing tier, etc.). Activity Logs track administrative operations on Azure resources, making this the appropriate choice for detecting when database configurations are modified. Diagnostic settings are for logs/metrics storage, not alerting, and Metric signal types track performance data rather than configuration changes.

Why the other options are wrong

  • A. Diagnostic settings store logs but do not directly notify; they must be paired with alerts to trigger notifications.
  • B. Metrics measure performance data like CPU and memory, not configuration changes like pricing tier modifications.
  • C. Metric signal types monitor numerical performance data, not administrative/control plane operations like database setting changes.

Question 52

You have a SQL pool in Azure Synapse that contains a table named dbo.Customers. The table contains a column name Email. You need to prevent nonadministrative users from seeing the full email addresses in the Email column. The users must see values in a format of aXXX@XXXX.com instead. What should you do?

  1. From the Azure portal, set a mask on the Email column.
  2. From the Azure portal, set a sensitivity classification of Confidential for the Email column.
  3. From Microsoft SQL Server Management Studio, set an email mask on the Email column.
  4. From Microsoft SQL Server Management Studio, grant the SELECT permission to the users for all the columns in the dbo.Customers table except Email.
Show answer and explanation

Correct answer: A. From the Azure portal, set a mask on the Email column.

Dynamic data masking (DDM) is configured in the Azure portal for Azure Synapse SQL pools. You set a mask directly on the Email column through the Azure portal, which will display values in the format aXXX@XXXX.com to non-administrative users while preserving the actual data in the database.

Why the other options are wrong

  • B. Sensitivity classification is used for data discovery and governance but does not provide masking functionality to hide data values from users.
  • C. While SQL Server Management Studio can be used for some SQL operations, dynamic data masking for Azure Synapse is configured through the Azure portal, not SSMS.
  • D. Denying SELECT permission on a column is too restrictive and doesn't provide the required masked view; users need to see the masked format, not be blocked entirely.

Question 53

You have an Azure SQL database named db1 on a server named server1. The Intelligent Insights diagnostics log identifies that several tables are missing indexes. You need to ensure that indexes are created for the tables. What should you do?

  1. Run the DBCC SQLPERF command.
  2. Run the DBCC DBREINDEX command.
  3. Modify the automatic tuning settings for db1.
  4. Modify the Query Store settings for db1.
Show answer and explanation

Correct answer: C. Modify the automatic tuning settings for db1.

Azure SQL Database's Automatic Tuning feature includes automatic index management that can automatically create and drop indexes based on workload analysis. When Intelligent Insights identifies missing indexes, enabling automatic tuning with the create index option will automatically generate the recommended indexes without manual intervention.

Why the other options are wrong

  • A. DBCC SQLPERF is used for performance monitoring, not index creation
  • B. DBCC DBREINDEX is used to rebuild existing indexes, not create new ones
  • D. Query Store tracks query performance and provides recommendations but does not automatically create indexes by itself

Question 54

You have an Azure SQL database named db1 on a server named server1. You need to modify the MAXDOP settings for db1. What should you do?

  1. Connect to db1 and run the sp_configure command.
  2. Connect to the master database of server1 and run the sp_configure command.
  3. Configure the extended properties of db1.
  4. Modify the database scoped configuration of db1.
Show answer and explanation

Correct answer: D. Modify the database scoped configuration of db1.

In Azure SQL Database, MAXDOP (Maximum Degree of Parallelism) is a database-scoped configuration setting, not a server-level configuration. Azure SQL Database does not support sp_configure for MAXDOP adjustments. Database scoped configurations are managed through ALTER DATABASE SCOPED CONFIGURATION commands and allow per-database tuning of query execution parameters including MAXDOP.

Why the other options are wrong

  • A. sp_configure is for SQL Server on-premises server-level settings, not Azure SQL Database database-level settings
  • B. sp_configure is a server-level command that cannot set database-specific MAXDOP in Azure SQL Database
  • C. Extended properties are metadata containers, not the mechanism for configuring MAXDOP settings

Question 55

You are designing an enterprise data warehouse in Azure Synapse Analytics that will contain a table named Customers. Customers will contain credit card information. You need to recommend a solution to provide salespeople with the ability to view all the entries in Customers. The solution must prevent all the salespeople from viewing or inferring the credit card information. What should you include in the recommendation?

  1. row-level security
  2. data masking
  3. Always Encrypted
  4. column-level security
Show answer and explanation

Correct answer: B. data masking

Data masking hides sensitive data like credit card numbers from view while keeping the column visible and queryable, allowing salespeople to see all customer entries without accessing credit card information. This prevents both viewing and inferring sensitive values while maintaining data utility. Row-level security restricts rows, not columns; Always Encrypted prevents queries on encrypted data; column-level security prevents column access entirely rather than masking values.

Why the other options are wrong

  • A. Row-level security controls which rows users can see, not the visibility of sensitive data within visible rows.
  • C. Always Encrypted prevents queries on encrypted columns, making the data inaccessible rather than masked.
  • D. Column-level security denies access to entire columns rather than masking values within accessible columns.

Question 56

You have an Azure Stream Analytics job. You need to ensure that the job has enough streaming units provisioned. You configure monitoring of the SU % Utilization metric. Which two additional metrics should you monitor? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  1. Late Input Events
  2. Out of order Events
  3. Backlogged Input Events
  4. Watermark Delay
  5. Function Events
Show answer and explanation

Correct answer: C, D. Backlogged Input Events; Watermark Delay

When monitoring SU % Utilization to ensure adequate streaming units, you should also monitor Backlogged Input Events (C) which indicates whether the job is falling behind processing input, and Watermark Delay (D) which measures how far behind the job is processing compared to wall-clock time. These two metrics directly indicate if insufficient streaming units are causing processing delays. Backlogged Input Events shows queue buildup, while Watermark Delay shows the actual lag in event processing.

Why the other options are wrong

  • A. Late Input Events refers to events arriving after their application timestamp and is not a direct indicator of insufficient streaming unit capacity.
  • B. Out of order Events relates to event ordering issues, not resource capacity problems.
  • E. Function Events relates to custom function execution, not whether streaming units are adequately provisioned.

Question 57

You have an Azure virtual machine named VM1 on a virtual network named VNet1. Outbound traffic from VM1 to the internet is blocked. You have an Azure SQL database named SqlDb1 on a logical server named SqlSrv1. You need to implement connectivity between VM1 and SqlDb1 to meet the following requirements: • Ensure that VM1 cannot connect to any Azure SQL Server other than SqlSrv1. • Restrict network connectivity to SqlSrv1. What should you create on VNet1?

  1. a VPN gateway
  2. a service endpoint
  3. a private endpoint
  4. an ExpressRoute gateway
Show answer and explanation

Correct answer: C. a private endpoint

A private endpoint is the correct solution because it creates a dedicated private connection from VM1 to SqlSrv1 within the Azure network, ensuring VM1 can only communicate with that specific SQL server and no others. Private endpoints restrict network connectivity by binding the SQL server to a specific virtual network interface, preventing access to other Azure SQL servers. This meets both requirements without requiring internet connectivity.

Why the other options are wrong

  • A. A VPN gateway provides connectivity to on-premises networks or between virtual networks, not specific database-level isolation.
  • B. A service endpoint allows access to Azure services but doesn't restrict access to a single SQL server instance.
  • D. An ExpressRoute gateway provides dedicated hybrid connectivity and doesn't provide the database-level isolation required.

Question 58

You have an Azure SQL database named DB1 that contains a nonclustered index named index1. End users report slow queries when they use index1. You need to identify the operations that are being performed on the index. Which dynamic management view should you use?

  1. Sys.dm_exec_query_plan_stats
  2. Sys.dm_db_index_physical_stats
  3. Sys.dm_db_index_operational_stats
  4. Sys.dm_db_index_useage_stats
Show answer and explanation

Correct answer: C. Sys.dm_db_index_operational_stats

sys.dm_db_index_operational_stats provides detailed information about the operations (seeks, scans, lookups, updates, inserts, deletes) being performed on indexes in real time. This DMV shows which operations are occurring on index1 and is ideal for diagnosing why queries using the index are slow. The physical stats DMV shows fragmentation, usage_stats shows historical aggregated usage, and query_plan_stats shows query execution plans.

Why the other options are wrong

  • A. sys.dm_exec_query_plan_stats shows query execution plans, not index operation details.
  • B. sys.dm_db_index_physical_stats reports fragmentation and page density, not operational activity.
  • D. sys.dm_db_index_usage_stats shows historical aggregated usage, not current operational details.

Question 59

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You have an Azure Synapse Analytics dedicated SQL pool that contains a table named Table1. You have files that are ingested and loaded into an Azure Data Lake Storage Gen2 container named container1. You plan to insert data from the files into Table1 and transform the data. Each row of data in the files will produce one row in the serving layer of Table1. You need to ensure that when the source data files are loaded to container1, the DateTime is stored as an additional column in Table1. Solution: You use a dedicated SQL pool to create an external table that has an additional DateTime column. Does this meet the goal?

  1. Yes
  2. No
Show answer and explanation

Correct answer: B. No

Creating an external table in a dedicated SQL pool with an additional DateTime column does not automatically capture or populate the file's DateTime metadata when data is loaded. The external table structure alone is insufficient to meet the requirement; you need a pipeline process that actively retrieves file metadata and inserts it alongside the data.

Question 60

You are planning a solution that will use Azure SQL Database. Usage of the solution will peak from October 1 to January 1 each year. During peak usage, the database will require the following: • 24 cores • 500 GB of storage • 124 GB of memory • More than 50,000 IOPS During periods of off-peak usage, the service tier of Azure SQL Database will be set to Standard. Which service tier should you use during peak usage?

  1. Business Critical
  2. Premium
  3. Hyperscale
Show answer and explanation

Correct answer: A. Business Critical

Business Critical tier is required because it supports up to 128 cores, provides up to 4 TB of storage, includes 124 GB of memory configurations, and most critically, supports more than 50,000 IOPS which is explicitly needed. Premium tier maxes out at around 4,000 IOPS, making it insufficient for the IOPS requirement. Hyperscale could technically work but is overkill for these specifications and much more expensive.

Why the other options are wrong

  • B. Premium tier supports only up to around 4,000 IOPS, far below the required 50,000+ IOPS.
  • C. Hyperscale is unnecessarily expensive and complex for these performance requirements, though it could technically meet them.

Question 61

You have an Azure SQL database named DB1. You have a table name Table1 that has 20 columns of type CHAR(400). Row compression for Table1 is enabled. During a database audit, you discover that none of the fields contain more than 150 characters. You need to ensure that you can apply page compression to Table1. What should you do?

  1. Configure the columns as sparse.
  2. Change the column type to NVARCHAR(MAX).
  3. Change the column type to VARCHAR(MAX).
  4. Change the column type to VARCHAR(200).
Show answer and explanation

Correct answer: D. Change the column type to VARCHAR(200).

Changing the column type from CHAR(400) to VARCHAR(200) is necessary because page compression works best with variable-length data types, and the actual data never exceeds 150 characters. CHAR(400) wastes space with fixed-length padding. VARCHAR(200) allows for variable-length storage up to the actual data size while enabling page compression, which provides better compression ratios than row compression alone on variable-length columns.

Why the other options are wrong

  • A. Sparse columns are designed for columns with many NULL values, not for this use case of oversized fixed-length fields.
  • B. NVARCHAR(MAX) would worsen the situation by using more space per character and complicates compression.
  • C. VARCHAR(MAX) is excessive when data only reaches 150 characters; VARCHAR(200) is more appropriate.

Question 62

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You have SQL Server 2019 on an Azure virtual machine. You are troubleshooting performance issues for a query in a SQL Server instance. To gather more information, you query sys.dm_exec_requests and discover that the wait type is PAGELATCH_UP and the wait_resource is 2:3:905856. You need to improve system performance. Solution: You reduce the use of table variables and temporary tables. Does this meet the goal?

  1. Yes
  2. No
Show answer and explanation

Correct answer: A. Yes

Reducing the use of table variables and temporary tables does meet the goal. PAGELATCH_UP contention on data pages can be caused by excessive tempdb usage, as table variables and temporary tables store data in tempdb. Heavy tempdb activity creates page latch contention due to the single-threaded nature of tempdb allocation. By reducing reliance on these objects, you decrease tempdb pressure and associated page latch waits.

Question 63

You receive numerous alerts from Azure Monitor for an Azure SQL Database instance. You need to reduce the number of alerts. You must only receive alerts if there is a significant change in usage patterns for an extended period. Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  1. Set Threshold Sensitivity to High
  2. Set the Alert logic threshold to Dynamic
  3. Set the Alert logic threshold to Static
  4. Set Threshold Sensitivity to Low
  5. Set Force Plan to On
Show answer and explanation

Correct answer: B, D. Set the Alert logic threshold to Dynamic; Set Threshold Sensitivity to Low

To reduce alert fatigue while detecting significant sustained changes, set the Alert logic threshold to Dynamic (which learns normal baseline patterns) and set Threshold Sensitivity to Low (which raises the bar for what triggers an alert). Dynamic alerting adapts to usage patterns over time, and low sensitivity ensures only substantial deviations trigger alerts, reducing noise from minor fluctuations.

Why the other options are wrong

  • A. High sensitivity increases alert frequency, worsening the problem of too many alerts
  • C. Static thresholds require manual adjustment and don't adapt to normal usage pattern changes
  • E. Force Plan is related to query plan forcing and does not affect alert thresholds or frequency

Question 64

You have an Azure subscription. You need to deploy an instance of SQL Server on Azure Virtual Machines. The solution must meet the following requirements: • Custom performance configuration, such as IOPS, capacity, and throughout, must be supported. • Costs must be minimized. Which type of disk should you include in the solution?

  1. Premium SSD v2
  2. Premium SSD
  3. Standard SSD
  4. Ultra SSD
Show answer and explanation

Correct answer: A. Premium SSD v2

Premium SSD v2 provides the best balance for the requirements: it supports custom configuration of IOPS, throughput, and capacity independently without being tied to VM size, and it offers cost optimization compared to Ultra SSD while still delivering high performance for SQL Server workloads.

Why the other options are wrong

  • B. Premium SSD couples IOPS and throughput to the disk size, limiting custom performance configuration options.
  • C. Standard SSD does not provide the performance characteristics required for SQL Server production workloads.
  • D. Ultra SSD supports custom configuration but has significantly higher costs, making it less optimal for cost minimization.

Question 65

You have five instances of SQL Server on Azure Virtual Machines. You need to monitor Microsoft SQL Server performance for all the instances by consolidating metrics into a single graphic display. The solution must minimize administrative effort. What should you use?

  1. Azure Monitor
  2. Log Analytics
  3. SQL Insights
  4. Azure SQL Analytics
Show answer and explanation

Correct answer: C. SQL Insights

SQL Insights is the dedicated Azure monitoring solution specifically designed for SQL Server on Azure Virtual Machines, providing consolidated performance metrics and dashboards with minimal administrative overhead. Log Analytics (B) requires more configuration. Azure Monitor (A) is broader but requires additional setup. Azure SQL Analytics (D) is designed for Azure SQL databases, not on-premises SQL Server VMs.

Why the other options are wrong

  • A. Azure Monitor is more general-purpose and requires more configuration effort.
  • B. Log Analytics requires separate workspace setup and custom queries.
  • D. Azure SQL Analytics targets Azure SQL databases, not SQL Server on VMs.

Question 66

Your on-premises network contains a server that hosts a 60-TB database named DB1. The network has a 10-Mbps internet connection. You need to migrate DB1 to Azure. The solution must minimize how long it takes to migrate the database. What should you use?

  1. Azure Migrate
  2. Azure Data Box
  3. Azure Database Migration Service
  4. Data Migration Assistant (DMA)
Show answer and explanation

Correct answer: B. Azure Data Box

Azure Data Box is the optimal choice for migrating a 60-TB database over a 10-Mbps internet connection. Data Box is a physical appliance that allows you to transfer large amounts of data offline, which is far faster than attempting to transfer 60 TB over a 10-Mbps connection (which would take months). You ship the Data Box appliance to Microsoft, and they upload the data to Azure on your behalf.

Why the other options are wrong

  • A. Azure Migrate is designed for VM and infrastructure migration, not large database transfers, and wouldn't be efficient for 60 TB over slow connectivity.
  • C. Azure Database Migration Service requires network connectivity and would be impractical for 60 TB over a 10-Mbps link.
  • D. Data Migration Assistant is a tool for assessing and migrating SQL Server databases but doesn't solve the bandwidth limitation problem.

Question 67

You have a data warehouse in Azure Synapse Analytics. You need to ensure that the data in the data warehouse is encrypted at rest. What should you enable?

  1. Transparent Data Encryption (TDE)
  2. Advanced Data Security for this database
  3. Always Encrypted for all columns
  4. Secure transfer required
Show answer and explanation

Correct answer: A. Transparent Data Encryption (TDE)

Transparent Data Encryption (TDE) automatically encrypts data at rest in Azure Synapse Analytics databases without requiring application changes. TDE encrypts the entire database including backups, meeting the core requirement for encryption at rest. Advanced Data Security adds threat detection, Always Encrypted requires application-level key management, and Secure transfer required only protects data in transit over the network.

Why the other options are wrong

  • B. Advanced Data Security provides threat detection and vulnerability scanning but doesn't encrypt data at rest.
  • C. Always Encrypted requires application-level encryption management and isn't the default encryption at rest solution.
  • D. Secure transfer required enforces HTTPS/TLS for data in transit, not encryption at rest.

Question 68

You have an Azure subscription. You need to deploy an Azure SQL database. The solution must meet the following requirements: • Dynamically scale CPU resources. • Ensure that the database can be paused to reduce costs. What should you use?

  1. the Business Critical service tier
  2. the serverless compute tier
  3. an elastic pool
  4. the General Purpose service tier
Show answer and explanation

Correct answer: B. the serverless compute tier

The serverless compute tier is the correct choice because it provides both dynamic CPU scaling based on workload demands and the ability to pause the database to reduce costs when inactive. These features directly align with both stated requirements.

Why the other options are wrong

  • A. Business Critical tier does not support pausing to reduce costs.
  • C. Elastic pools do not support pausing; they provide resource sharing but not auto-pause functionality.
  • D. General Purpose tier does not support automatic pausing; it maintains consistent resource allocation.

Question 69

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You have SQL Server 2019 on an Azure virtual machine. You are troubleshooting performance issues for a query in a SQL Server instance. To gather more information, you query sys.dm_exec_requests and discover that the wait type is PAGELATCH_UP and the wait_resource is 2:3:905856. You need to improve system performance. Solution: You create additional tempdb files. Does this meet the goal?

  1. Yes
  2. No
Show answer and explanation

Correct answer: A. Yes

The wait type PAGELATCH_UP on resource 2:3:905856 indicates tempdb contention, specifically on the Global Allocation Map (GAM) page or similar system pages in tempdb. Creating additional tempdb files reduces contention by distributing allocation activity across multiple files, each with its own allocation structures. This is a standard best practice for resolving tempdb allocation contention issues in SQL Server.

Question 70

You have an Azure Databricks workspace named workspace1 in the Standard pricing tier. Workspace1 contains an all-purpose cluster named cluster1. You need to reduce the time it takes for cluster1 to start and scale up. The solution must minimize costs. What should you do first?

  1. Upgrade workspace1 to the Premium pricing tier.
  2. Configure a global init script for workspace1.
  3. Create a pool in workspace1.
  4. Create a cluster policy in workspace1.
Show answer and explanation

Correct answer: C. Create a pool in workspace1.

Creating a pool in workspace1 is the first step to reduce cluster startup and scale-up times while minimizing costs. Pools pre-allocate and reuse compute resources, eliminating the need to acquire new instances from scratch each time, which provides the fastest path to improved performance without the cost of upgrading to Premium tier.

Why the other options are wrong

  • A. Upgrading to Premium tier would add cost and is not necessary; pools are available in Standard tier and address the performance requirement.
  • B. Global init scripts help with cluster configuration but do not directly reduce startup or scale-up times.
  • D. Cluster policies control configuration options but do not reduce startup time or improve scalability of existing clusters.

Question 71

You have an Azure data solution that contains an enterprise data warehouse in Azure Synapse Analytics named DW1. Several users execute adhoc queries to DW1 concurrently. You regularly perform automated data loads to DW1. You need to ensure that the automated data loads have enough memory available to complete quickly and successfully when the adhoc queries run. What should you do?

  1. Assign a smaller resource class to the automated data load queries.
  2. Create sampled statistics to every column in each table of DW1.
  3. Assign a larger resource class to the automated data load queries.
  4. Hash distribute the large fact tables in DW1 before performing the automated data loads.
Show answer and explanation

Correct answer: C. Assign a larger resource class to the automated data load queries.

Assigning a larger resource class to automated data load queries allocates more memory and CPU resources to those operations, ensuring they complete quickly even when adhoc queries are running concurrently. Resource classes in Synapse control memory allocation, and larger classes guarantee sufficient resources for data loads to succeed without contention.

Why the other options are wrong

  • A. Assigning a smaller resource class would reduce memory availability and slow down the data loads, worsening the problem.
  • B. Sampled statistics improve query optimization but do not address memory allocation or concurrent query resource contention.
  • D. Hash distribution affects data placement but does not allocate additional memory resources to prioritize data load completion.

Question 72

You have an Azure SQL Database server named sqlsrv1 that hosts 10 Azure SQL databases. The databases perform slower than expected. You need to identify whether the performance issue relates to the use of tempdb by Azure SQL databases in sqlsrv1. What should you do?

  1. Run Query Store-based queries
  2. Review information provided by SQL Server Profiler-based traces
  3. Review information provided by Query Performance Insight
  4. Run dynamic management view-based queries
Show answer and explanation

Correct answer: D. Run dynamic management view-based queries

Dynamic management views (DMVs) are the proper method to diagnose tempdb usage and performance issues in Azure SQL Database. DMVs like sys.dm_db_task_space_usage and sys.dm_exec_sessions provide detailed tempdb allocation and usage metrics. Query Store focuses on query performance, SQL Profiler is not available in Azure SQL Database, and Query Performance Insight doesn't specifically diagnose tempdb contention.

Why the other options are wrong

  • A. Query Store tracks query-level performance but not tempdb-specific diagnostics.
  • B. SQL Server Profiler is not available in Azure SQL Database environments.
  • C. Query Performance Insight shows overall database performance but not tempdb-specific issues.

Question 73

You manage an enterprise data warehouse in Azure Synapse Analytics. Users report slow performance when they run commonly used queries. Users do not report performance changes for infrequently used queries. You need to monitor resource utilization to determine the source of the performance issues. Which metric should you monitor?

  1. Local tempdb percentage
  2. DWU percentage
  3. Data Warehouse Units (DWU) used
  4. Cache hit percentage
Show answer and explanation

Correct answer: D. Cache hit percentage

Cache hit percentage is the correct metric because commonly used queries benefit from result set caching in Synapse Analytics. When frequently executed queries show slow performance, a low cache hit percentage indicates the results are not being cached effectively, revealing a potential source of performance degradation. Increasing cache availability would improve performance for these repeated queries.

Why the other options are wrong

  • A. Local tempdb percentage measures temporary storage, not query cache effectiveness.
  • B. DWU percentage shows overall resource utilization but doesn't explain why frequent queries specifically are slow.
  • C. DWU used measures resource consumption but doesn't identify cache-related performance issues.

Question 74

You have an on-premises Microsoft SQL Server 2019 instance that hosts a database named DB1. You have an Azure subscription that contains an Azure SQL database named SQLDB1. You need to replicate DB1 to SQLDB1. Which type of replication should you use?

  1. transactional
  2. peer-to-peer
  3. snapshot
  4. merge
Show answer and explanation

Correct answer: A. transactional

Transactional replication is the correct choice for replicating from on-premises SQL Server to Azure SQL Database because it supports one-way replication from a publisher (on-premises) to a subscriber (Azure SQL Database), maintaining near real-time data consistency with minimal latency.

Why the other options are wrong

  • B. Peer-to-peer replication requires bi-directional replication between nodes of the same SQL Server version and is not suitable for cloud scenarios.
  • C. Snapshot replication takes periodic snapshots and is not appropriate for continuous synchronization of an active database.
  • D. Merge replication is designed for distributed scenarios where multiple subscribers make changes to the same data, not for one-way replication to Azure.

Question 75

You have an Azure SQL database named DB1. DB1 has a table named Table1 that contains the following columns. You plan to enable Always Encrypted for Table1. Which two columns support encryption? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

  1. Column1
  2. Column2
  3. Column3
  4. Column4
  5. Column5
Show answer and explanation

Correct answer: D, E. Column4; Column5

Always Encrypted in Azure SQL Database supports encryption on columns with specific data types. Varchar (Column4) and Datetime2 (Column5) are both supported data types for Always Encrypted. Ntext (Column1) is a legacy data type that is not supported. Geometry (Column2) is a spatial data type that is not supported for encryption. Image (Column3) is a binary data type that is not supported for Always Encrypted.

Why the other options are wrong

  • A. Ntext is a legacy data type and is not supported by Always Encrypted.
  • B. Geometry is a spatial data type that cannot be encrypted with Always Encrypted.
  • C. Image is a binary data type that is not supported for Always Encrypted encryption.

75 questions in. Want the rest? The first half of the pack, free by email · The full pack

Question 76

You have an Azure subscription. You create a logical SQL server that hosts four databases. Each database will be used by a separate customer. You need to ensure that each customer can access only its own database. The solution must minimize administrative effort. Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  1. Deny public access.
  2. Create a private endpoint.
  3. Create a database-level firewall rule.
  4. Create a network security group (NSG).
  5. Create a server-level firewall rule.
Show answer and explanation

Correct answer: B, C. Create a private endpoint; Create a database-level firewall rule.

Creating a private endpoint (B) ensures each customer accesses the database through a private network connection, providing isolation. Creating a database-level firewall rule (C) allows you to control access at the individual database level, ensuring each customer can only access their own database. Together, these minimize administrative effort by providing granular access control without managing complex server-level rules for each customer.

Why the other options are wrong

  • A. Denying public access alone doesn't solve the multi-customer isolation requirement.
  • D. Network Security Groups operate at the infrastructure layer and are not the most efficient method for database-level access control.
  • E. Server-level firewall rules apply to all databases on the server, not individual databases, making them unsuitable for isolating customers.

Question 77

You have an Azure subscription linked to an Azure Active Directory (Azure AD) tenant. The subscription contains 10 virtual machines that run Windows Server 2019 and host Microsoft SQL Server 2019 instances. You need to ensure that you can manage the SQL Server instances by using a single user account. What should you do first?

  1. Enable a user-assigned managed identity on each virtual machine.
  2. Deploy an Azure Active Directory Domain Services (Azure AD DS) domain and join the virtual machines to the domain.
  3. Enable a system-assigned managed identity on each virtual machine.
  4. Join the virtual machines to the Azure AD tenant.
Show answer and explanation

Correct answer: B. Deploy an Azure Active Directory Domain Services (Azure AD DS) domain and join the virtual machines to the domain.

Deploying Azure Active Directory Domain Services (Azure AD DS) and joining the virtual machines to the domain is the correct first step to enable centralized management of SQL Server instances with a single user account. Azure AD DS creates a managed domain that the VMs can join, allowing domain-based authentication and centralized user account management across all 10 SQL Server instances. This provides traditional domain administration capabilities while leveraging Azure AD.

Why the other options are wrong

  • A. User-assigned managed identities are for service-to-service authentication, not for user account-based SQL Server management.
  • C. System-assigned managed identities provide resource authentication, not centralized user account management across multiple instances.
  • D. Simply joining VMs to Azure AD tenant alone doesn't provide the domain-joined capabilities needed for SQL Server instance management.

Question 78

You have an Azure subscription that contains a server named Server1. Server1 hosts two Azure SQL databases named DB1 and DB2. You plan to deploy a Windows app named App1 that will authenticate to DB2 by using SQL authentication. You need to ensure that App1 can access DB2. The solution must meet the following requirements: • App1 must be able to view only DB2. • Administrative effort must be minimized. What should you create?

  1. a contained database user for App1 on DB2
  2. a login for App1 on Server1
  3. a contained database user from an external provider for App1 on DB2
  4. a contained database user from a Windows login for App1 on DB2
Show answer and explanation

Correct answer: A. a contained database user for App1 on DB2

A contained database user is the correct solution because it allows App1 to authenticate directly to DB2 using SQL authentication without requiring a server-level login. This meets both requirements: App1 can only view DB2 (contained users are database-scoped), and it minimizes administrative effort by avoiding server-level login management. Contained database users are specifically designed for applications that need access to a single database.

Why the other options are wrong

  • B. A server-level login would allow App1 to potentially access other databases on Server1, violating the requirement that App1 can view only DB2.
  • C. Using an external provider adds unnecessary complexity when SQL authentication is simpler and meets the requirements.
  • D. A Windows login requires Active Directory integration and increases administrative overhead compared to a contained database user.

Question 79

You have an Azure SQL database named sqldb1. You need to minimize the amount of space by the data and log files of sqldb1. What should you run?

  1. DBCC SHRINKDATABASE
  2. sp_clean_db_free_space
  3. sp_clean_db_file_free_space
  4. DBCC SHRINKFILE
Show answer and explanation

Correct answer: A. DBCC SHRINKDATABASE

DBCC SHRINKDATABASE is the correct command to minimize space used by both data and log files of an entire database. It shrinks all files within the database to reclaim unused space. While DBCC SHRINKFILE works on individual files and the sp_clean procedures target specific free space cleanup, DBCC SHRINKDATABASE is the comprehensive solution for minimizing overall database file size.

Why the other options are wrong

  • B. sp_clean_db_free_space cleans up free space but doesn't shrink file sizes themselves.
  • C. sp_clean_db_file_free_space targets individual files and doesn't provide overall database shrinking.
  • D. DBCC SHRINKFILE operates on single files, not the entire database at once.

Question 80

You are developing an application that uses Azure Data Lake Storage Gen 2. You need to recommend a solution to grant permissions to a specific application for a limited time period. What should you include in the recommendation?

  1. role assignments
  2. account keys
  3. shared access signatures (SAS)
  4. Azure Active Directory (Azure AD) identities
Show answer and explanation

Correct answer: C. shared access signatures (SAS)

Shared Access Signatures (SAS) provide time-limited access to storage resources with granular permissions, perfect for granting temporary access to specific applications. SAS tokens can be set to expire after a defined period, making them ideal for limiting access duration. Role assignments are permanent unless explicitly changed, account keys don't expire, and Azure AD identities don't inherently provide time-limited access.

Why the other options are wrong

  • A. Role assignments are identity-based and don't have built-in time expiration mechanisms.
  • B. Account keys are long-term credentials without expiration and provide full access, not limited permissions.
  • D. Azure AD identities provide authentication but don't natively support time-limited access without additional token configuration.

Question 81

You have a Microsoft SQL Server 2017 server. You need to migrate the server to Azure. The solution must meet the following requirements: • Ensure that the latest version of SQL Server is used. • Support the SQL Server Agent service. • Minimize administrative effort. What should you use?

  1. an Azure SQL Database elastic pool
  2. Azure SQL Database
  3. SQL Server on Azure Virtual Machines
  4. Azure SQL Managed Instance
Show answer and explanation

Correct answer: C. SQL Server on Azure Virtual Machines

SQL Server on Azure Virtual Machines is the correct choice because it supports the latest SQL Server versions, includes SQL Server Agent service, and while requiring some administrative effort, it is the most appropriate for scenarios requiring full SQL Server feature parity. However, Azure SQL Managed Instance would also support these requirements with less administrative effort, making this question somewhat ambiguous in practice.

Why the other options are wrong

  • A. Elastic pools do not support SQL Server Agent.
  • B. Azure SQL Database does not support SQL Server Agent service.
  • D. While Azure SQL Managed Instance does support SQL Server Agent and can use recent SQL versions, it may not always have the absolute latest version available as quickly as on-premises deployments.

Question 82

You have an Azure SQL managed instance named MI1. You need to implement automatic tuning for the databases of MI1. What should you do?

  1. Use The REST API to call the patch operation and modify the AutomaticTuningServerMode property.
  2. From the Azure portal, configure automatic tuning.
  3. Use Transact-SQL to enable the FORCE_LAST_GOOD_PLAN option.
Show answer and explanation

Correct answer: C. Use Transact-SQL to enable the FORCE_LAST_GOOD_PLAN option.

For Azure SQL Managed Instance, automatic tuning is implemented using Transact-SQL by enabling the FORCE_LAST_GOOD_PLAN option through T-SQL commands. This is the native method for managed instances. The Azure portal automatic tuning configuration is primarily for Azure SQL Database, not managed instances, and the REST API approach is less direct than using T-SQL for this specific resource type.

Why the other options are wrong

  • A. REST API calls for AutomaticTuningServerMode are not the standard approach for managed instances.
  • B. Azure portal automatic tuning configuration is designed for Azure SQL Database, not managed instances.

Question 83

You have an Azure subscription that contains an Azure SQL database named DB1. You need to host elastic jobs by using DB1. DB1 will also be configured as a job target. The solution must support the use of location-based Conditional Access policies. What should the elastic jobs use to access DB1?

  1. a system-assigned managed identity
  2. Azure SQL sign-in credentials
  3. database-scoped credentials
  4. a user-assigned managed identity
Show answer and explanation

Correct answer: D. a user-assigned managed identity

Elastic jobs should use a user-assigned managed identity to access DB1 when location-based Conditional Access policies are required. User-assigned managed identities are fully compatible with Azure AD Conditional Access policies, including location-based policies, providing secure authentication without credential management while supporting advanced access controls.

Why the other options are wrong

  • A. System-assigned managed identities don't provide the same flexibility for Conditional Access policy application across elastic job scenarios.
  • B. Azure SQL sign-in credentials cannot participate in Conditional Access policies.
  • C. Database-scoped credentials don't support Conditional Access policy integration.

Question 84

You have an on-premises Microsoft SQL Server 2019 database named SQL1 that uses merge replication. You need to migrate SQL1 to Azure. Which service should you use?

  1. Azure SQL Edge
  2. Azure SQL Database
  3. SQL Server on Azure Virtual Machines
  4. Azure SQL Managed Instance
Show answer and explanation

Correct answer: C. SQL Server on Azure Virtual Machines

SQL Server on Azure Virtual Machines is required because merge replication is not supported by Azure SQL Database or Azure SQL Managed Instance. Only SQL Server running on virtual machines provides full compatibility with all SQL Server replication types, including merge replication.

Why the other options are wrong

  • A. Azure SQL Edge does not support merge replication.
  • B. Azure SQL Database does not support merge replication; only transactional and snapshot replication are partially supported.
  • D. Azure SQL Managed Instance does not support merge replication.

Question 85

You plan to deploy an app that includes an Azure SQL database and an Azure web app. The app has the following requirements: • The web app must be hosted on an Azure virtual network. • The Azure SQL database must be assigned a private IP address. • The Azure SQL database must allow connections only from a specific virtual network. You need to recommend a solution that meets the requirements. What should you include in the recommendation?

  1. Azure Private Link
  2. a network security group (NSG)
  3. a database-level firewall
  4. a server-level firewall
Show answer and explanation

Correct answer: A. Azure Private Link

Azure Private Link is the solution that meets all three requirements: it creates a private endpoint for the Azure SQL database, assigns it a private IP address on the virtual network, and restricts connections to only that specific virtual network. This provides secure, private connectivity between the web app and database.

Why the other options are wrong

  • B. Network security groups control traffic flow between subnets and resources but do not assign private IP addresses to the SQL database or create the private connectivity required.
  • C. Database-level firewalls control access at the database level but do not provide private IP assignment or enforce virtual network-only connectivity as effectively as Private Link.
  • D. Server-level firewalls are less granular than Private Link and do not assign private IP addresses to the SQL database.

Question 86

You have an Azure subscription that contains an Azure Data Factory version 2 (V2) data factory named df1. DF1 contains a linked service. You have an Azure Key vault named vault1 that contains an encryption kay named key1. You need to encrypt df1 by using key1. What should you do first?

  1. Disable purge protection on vault1.
  2. Remove the linked service from df1.
  3. Create a self-hosted integration runtime.
  4. Disable soft delete on vault1.
Show answer and explanation

Correct answer: B. Remove the linked service from df1.

Before encrypting a Data Factory with a customer-managed key from Key Vault, linked services must be removed because they contain credentials and connection strings that complicate the encryption process. Removing the linked service first ensures the Data Factory can be properly encrypted with the key without conflicts. Purge protection and soft delete settings on the Key Vault are separate from this requirement, and a self-hosted integration runtime is unrelated to Data Factory encryption.

Why the other options are wrong

  • A. Purge protection settings on the Key Vault don't affect Data Factory encryption capability.
  • C. Self-hosted integration runtime creation is unrelated to enabling customer-managed key encryption on the Data Factory itself.
  • D. Soft delete on the Key Vault doesn't prevent or require changes before encrypting a Data Factory.

Question 87

You have SQL Server 2019 on an Azure virtual machine that runs Windows Server 2019. The virtual machine has 4 vCPUs and 28 GB of memory. You scale up the virtual machine to 16 vCPUSs and 64 GB of memory. You need to provide the lowest latency for tempdb. What is the total number of data files that tempdb should contain?

  1. 2
  2. 4
  3. 8
  4. 64
Show answer and explanation

Correct answer: C. 8

For optimal tempdb performance with 16 vCPUs, the recommended number of data files is 8. SQL Server best practice recommends one tempdb data file per CPU core up to 8 files, even when you have more than 8 cores. With 16 vCPUs, 8 data files is the appropriate configuration to provide the lowest latency and minimize contention.

Why the other options are wrong

  • A. 2 data files is too few for 16 vCPUs and will cause contention.
  • B. 4 data files is below the recommended threshold for 16 vCPUs.
  • D. 64 data files far exceeds the recommended configuration and would create excessive overhead.

Question 88

You have a SQL Server on Azure Virtual Machines instance named SQLVM1 that was deployed by using an Azure Marketplace SQL Server 2019 Enterprise image. You need to change the Microsoft SQL Server instance on SQLVM1 to the Standard edition. The solution must ensure licensing compliance. What should you do first?

  1. From the SQL Server Installation Center on SQLVM1, run the Edition Upgrade wizard.
  2. From SQLVM1, uninstall the SQL Server instance.
  3. From the SQL Server Installation Center on SQLVM1, run the Repair wizard.
  4. From the Azure portal, reconfigure SQLVM1.
Show answer and explanation

Correct answer: B. From SQLVM1, uninstall the SQL Server instance.

To change from Enterprise to Standard edition on a SQL Server deployed from Azure Marketplace, you must first uninstall the SQL Server instance. This is necessary because a direct in-place downgrade from Enterprise to Standard is not supported. After uninstalling, you can reinstall using the Standard edition license to ensure compliance.

Why the other options are wrong

  • A. SQL Server does not provide an Edition Upgrade/Downgrade wizard; downgrading requires uninstallation and reinstallation.
  • C. The Repair wizard is used to fix corrupted installations, not to change editions.
  • D. Reconfiguring the VM in the Azure portal does not change the SQL Server edition; the instance itself must be modified.

Question 89

You have several Azure SQL databases on the same Azure SQL Database server in a resource group named ResourceGroup1. You must be alerted when CPU usage exceeds 80 percent for any database. The solution must apply to any additional databases that are created on the Azure SQL server. Which resource type should you use to create the alert?

  1. Resource Groups
  2. SQL Servers
  3. SQL Databases
  4. SQL Virtual Machines
Show answer and explanation

Correct answer: B. SQL Servers

Creating the alert rule at the SQL Server resource level ensures the alert applies to all databases on that server, including any new databases created in the future. This approach provides automatic coverage for new databases without requiring manual alert reconfiguration. Selecting the SQL Server as the resource type enables metric thresholds to be evaluated across all its child databases.

Why the other options are wrong

  • A. Resource Groups are too broad and would not provide database-specific CPU monitoring.
  • C. Creating alerts on individual SQL Database resources would require manual configuration for each new database and is not scalable.
  • D. SQL Virtual Machines are not applicable; these databases run on Azure SQL Database managed service, not VMs.

Question 90

A company plans to use Apache Spark analytics to analyze intrusion detection data. You need to recommend a solution to analyze network and system activity data for malicious activities and policy violations. The solution must minimize administrative efforts. What should you recommend?

  1. Azure Data Lake Storage
  2. Azure Databricks
  3. Azure HDInsight
  4. Azure Data Factory
Show answer and explanation

Correct answer: B. Azure Databricks

Azure Databricks is a managed Apache Spark platform that minimizes administrative effort while providing built-in support for intrusion detection analytics and security monitoring. It offers fully managed clusters, integrated machine learning capabilities, and is purpose-built for large-scale data analysis with minimal operational overhead.

Why the other options are wrong

  • A. Data Lake Storage is a data repository, not an analytics platform; it does not provide Spark compute or analysis tools.
  • C. HDInsight requires more administrative effort than Databricks as it requires cluster management and configuration.
  • D. Data Factory is an ETL/data movement service, not an analytics platform for running Spark jobs.

Question 91

You have an on-premises Microsoft SQL Server named SQL1 that hosts five databases. You need to migrate the databases to an Azure SQL managed instance. The solution must minimize downtime and prevent data loss. What should you use?

  1. Always On availability groups
  2. Backup and Restore
  3. log shipping
  4. Database Migration Assistant
Show answer and explanation

Correct answer: A. Always On availability groups

Always On availability groups provide the best solution for minimizing downtime and preventing data loss during migration to Azure SQL Managed Instance. They enable continuous synchronization of data and allow for a controlled failover with minimal disruption, making this the replication technology that meets the stated requirements of minimal downtime and zero data loss.

Why the other options are wrong

  • B. Backup and Restore causes significant downtime during the restore process.
  • C. Log shipping is older technology with longer RTO/RPO compared to Always On availability groups.
  • D. Database Migration Assistant is an assessment and planning tool, not a migration execution method.

Question 92

You have an Azure SQL database named DB1. A user named User1 has an Azure Active Directory (Azure AD) account. You need to provide User1 with the ability to add and remove columns from the tables in DB1. The solution must use the principle of least privilege. Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  1. Assign the database user the db_owner role.
  2. Create a contained database user.
  3. Create a login and an associated database user.
  4. Assign the database user the db_ddladmin role.
Show answer and explanation

Correct answer: B, D. Create a contained database user; Assign the database user the db_ddladmin role.

A contained database user (B) is required because User1 has an Azure AD account, and contained database users support Azure AD authentication in Azure SQL Database. The db_ddladmin role (D) grants the minimum necessary permissions to add and remove columns (DDL operations) without granting broader administrative privileges. Together, these options implement least privilege: a contained database user scoped to the database, with only the DDL permissions needed for column modifications.

Why the other options are wrong

  • A. db_owner grants excessive administrative permissions beyond the least-privilege requirement for column management.
  • C. Creating a login is not applicable for Azure AD accounts in Azure SQL Database; only contained database users with Azure AD authentication are supported.

Question 93

You need to migrate an on-premises Microsoft SQL Server database to Azure SQL Database. The solution must minimize downtime. What should you do?

  1. Configure Transaction Log Shipping.
  2. Implement Always On availability groups.
  3. Configure transactional replication.
  4. Import a BACPAC.
Show answer and explanation

Correct answer: C. Configure transactional replication.

Transactional replication is the optimal method for migrating to Azure SQL Database while minimizing downtime. It allows continuous replication of data changes from the source to Azure SQL Database, enabling a cutover with minimal downtime by keeping the source and target in sync until the final switch. Always On availability groups require both instances to be SQL Server, transaction log shipping is older technology, and importing a BACPAC requires a full backup and restore which causes significant downtime.

Why the other options are wrong

  • A. Transaction Log Shipping is a legacy technology that causes longer downtime compared to replication.
  • B. Always On availability groups don't work between on-premises SQL Server and Azure SQL Database directly.
  • D. Importing a BACPAC requires stopping the source database, resulting in significant downtime.

That was 93 of 373.

The full Microsoft DP-300 pack has all 373 questions, each with the answer, the explanation and why the other options are wrong, plus a questions-only copy for timed runs. US$39, paid once, with free monthly updates and a pass-or-your-money-back guarantee.

Get the full pack

Not ready yet? Get the first 186 free as one PDF by email. Get the Half Pack →