Microsoft DP-300 Practice Questions with Explanations

Free Microsoft DP-300 practice questions. 50 of them, each with the correct answer, a full explanation, and the reason every other option is wrong. These are real questions from the DP-300 exam, not paraphrases, and every explanation is written out rather than just marking the right letter.

They are drawn from the same bank as the full DP-300 pack, which has 373 questions in total.

Get the full DP-300 question bank (373 questions) →

DP-300 practice questions

Question 1

You have an Azure SQL database that contains a table named factSales. FactSales contains the columns shown in the following table. FactSales has 6 billion rows and is loaded nightly by using a batch process. You must provide the greatest reduction in space for the database and maximize performance. Which type of compression provides the greatest space reduction for the database?

  • A. page compression
  • B. row compression
  • C. columnstore compression
  • D. columnstore archival compression
Show answer and explanation ▾

Correct answer: D

Columnstore archival compression provides the greatest space reduction for large fact tables in data warehouse scenarios. Given that factSales contains 6 billion rows and is batch-loaded nightly (typical data warehouse pattern), columnstore archival compression is optimal. It combines columnstore storage format with additional compression algorithms, achieving 10x or greater compression ratios compared to other methods. While columnstore compression alone (option C) offers significant benefits, archival compression adds an extra compression layer specifically designed for read-heavy, batch-loaded analytical tables, making it the best choice for maximum space reduction.

Why the other options are wrong:

  • A. Page compression provides moderate space reduction (typically 50-80%) but is far less effective than columnstore archival compression for large analytical tables with billions of rows.
  • B. Row compression is the most basic compression type, offering minimal space reduction (typically 10-20%) and is least suitable for a 6 billion row fact table.
  • C. Columnstore compression offers excellent compression ratios but columnstore archival compression builds upon it with additional compression techniques, providing even greater reduction for batch-loaded data warehouses.

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?

  • A. Clustered columnstore indexes
  • B. PolyBase
  • C. Change tracking
  • D. Automatic tuning
Show answer and explanation ▾

Correct answer: B

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?

  • A. distributed availability groups
  • B. database mirroring
  • C. Always On Availability Group
  • D. Azure Database Migration Service
Show answer and explanation ▾

Correct answer: D

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?

  • A. Azure Event Hubs Standard
  • B. Azure Stream Analytics
  • C. Azure Data Factory
  • D. Azure Event Hubs Dedicated
Show answer and explanation ▾

Correct answer: D

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?

  • A. Load the data by using PySpark.
  • B. Load the data by using the OPENROWSET Transact-SQL command in an Azure Synapse Analytics serverless SQL pool.
  • C. Use a Get Metadata activity in Azure Data Factory.
  • D. Use a Conditional Split transformation in an Azure Synapse data flow.
Show answer and explanation ▾

Correct answer: A

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?

  • A. HASH
  • B. REPLICATE
  • C. ROUND_ROBIN
Show answer and explanation ▾

Correct answer: B

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?

  • A. JSON
  • B. CSV
  • C. Parquet
  • D. ORC
Show answer and explanation ▾

Correct answer: C

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?

  • A. Azure SQL Database
  • B. Azure Databricks
  • C. Azure Stream Analytics
Show answer and explanation ▾

Correct answer: C

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 are creating a new notebook in Azure Databricks that will support R as the primary language but will also support Scala and SQL. Which switch should you use to switch between languages?

  • A. \\[<language>]
  • B. %<language>
  • C. \\[<language>]
  • D. @<language>
Show answer and explanation ▾

Correct answer: B

In Azure Databricks notebooks, the percent sign (%) is used as a magic command prefix to switch between languages. You would use %scala, %sql, or %r to switch to those respective languages within a notebook that has a primary language set.

Why the other options are wrong:

  • A. Backslash with square brackets is not the correct syntax for language switching in Databricks.
  • C. This appears to be a duplicate of option A and is not valid Databricks syntax.
  • D. The @ symbol is not used for language switching in Azure Databricks notebooks.

Question 10

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?

  • A. complete
  • B. append
  • C. update
Show answer and explanation ▾

Correct answer: B

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 11

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?

  • A. From the Azure portal, set a mask on the Email column.
  • B. From the Azure portal, set a sensitivity classification of Confidential for the Email column.
  • C. From Microsoft SQL Server Management Studio, set an email mask on the Email column.
  • D. 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

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 12

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?

  • A. Upgrade workspace1 to the Premium pricing tier.
  • B. Configure a global init script for workspace1.
  • C. Create a pool in workspace1.
  • D. Create a cluster policy in workspace1.
Show answer and explanation ▾

Correct answer: C

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 13

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?

  • A. Yes
  • B. No
Show answer and explanation ▾

Correct answer: A

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 14

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?

  • A. Yes
  • B. No
Show answer and explanation ▾

Correct answer: B

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 15

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?

  • A. Yes
  • B. No
Show answer and explanation ▾

Correct answer: B

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 16

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?

  • A. Azure Private Link
  • B. a network security group (NSG)
  • C. a database-level firewall
  • D. a server-level firewall
Show answer and explanation ▾

Correct answer: A

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 17

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?

  • A. Business Critical
  • B. Premium
  • C. Hyperscale
Show answer and explanation ▾

Correct answer: A

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 18

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?

  • A. Configure service endpoints.
  • B. Configure virtual network peering.
  • C. Deploy an Azure firewall.
  • D. Configure network security groups (NSGs).
Show answer and explanation ▾

Correct answer: A

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.

Question 19

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?

  • A. Azure SQL Database
  • B. SQL Server on an Azure Virtual Machine
  • C. Azure SQL Managed Instance
  • D. Azure Database for MySQL
Show answer and explanation ▾

Correct answer: B

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 20

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

  • A. Configure Transaction Log Shipping.
  • B. Implement Always On availability groups.
  • C. Configure transactional replication.
  • D. Import a BACPAC.
Show answer and explanation ▾

Correct answer: C

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.

Question 21

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?

  • A. Configure the columns as sparse.
  • B. Change the column type to NVARCHAR(MAX).
  • C. Change the column type to VARCHAR(MAX).
  • D. Change the column type to VARCHAR(200).
Show answer and explanation ▾

Correct answer: D

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 22

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?

  • A. Always On availability groups
  • B. Backup and Restore
  • C. log shipping
  • D. Database Migration Assistant
Show answer and explanation ▾

Correct answer: A

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. While the reference suggests Database Migration Assistant, that tool is primarily for assessment; Always On is the actual 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 23

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?

  • A. page compression
  • B. columnstore compression
  • C. GZIP compression
  • D. columnstore archival compression
Show answer and explanation ▾

Correct answer: D

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 24

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?

  • A. Enable a user-assigned managed identity on each virtual machine.
  • B. Deploy an Azure Active Directory Domain Services (Azure AD DS) domain and join the virtual machines to the domain.
  • C. Enable a system-assigned managed identity on each virtual machine.
  • D. Join the virtual machines to the Azure AD tenant.
Show answer and explanation ▾

Correct answer: B

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 25

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?

  • A. --name, --edition, and --capacity
  • B. --name, --tier, and --min-capacity
  • C. --name, --resource-group, and --server
  • D. --name, --licence-type, and --capacity
Show answer and explanation ▾

Correct answer: C

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 26

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?

  • A. a single Azure SQL database
  • B. SQL Server on Azure Virtual Machines
  • C. Azure SQL Managed Instance
  • D. an Azure SQL Database elastic pool
Show answer and explanation ▾

Correct answer: C

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 27

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?

  • A. From the SQL Server Installation Center on SQLVM1, run the Edition Upgrade wizard.
  • B. From SQLVM1, uninstall the SQL Server instance.
  • C. From the SQL Server Installation Center on SQLVM1, run the Repair wizard.
  • D. From the Azure portal, reconfigure SQLVM1.
Show answer and explanation ▾

Correct answer: B

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 28

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?

  • A. Business Critical
  • B. Hyperscale
  • C. General Purpose
  • D. Premium
Show answer and explanation ▾

Correct answer: A

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 29

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?

  • A. the Business Critical service tier
  • B. the serverless compute tier
  • C. an elastic pool
  • D. the General Purpose service tier
Show answer and explanation ▾

Correct answer: B

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 30

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?

  • A. an Azure SQL Database elastic pool
  • B. Azure SQL Database
  • C. SQL Server on Azure Virtual Machines
  • D. Azure SQL Managed Instance
Show answer and explanation ▾

Correct answer: C

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 31

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?

  • A. Azure SQL Edge
  • B. Azure SQL Database
  • C. SQL Server on Azure Virtual Machines
  • D. Azure SQL Managed Instance
Show answer and explanation ▾

Correct answer: C

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 32

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?

  • A. Log Replay Service (LRS)
  • B. log shipping
  • C. transactional replication
  • D. SQL Data Sync
Show answer and explanation ▾

Correct answer: A

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.

Question 33

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?

  • A. E-series
  • B. G-series
  • C. H-series
  • D. M-series
Show answer and explanation ▾

Correct answer: D

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 34

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?

  • A. transactional
  • B. peer-to-peer
  • C. snapshot
  • D. merge
Show answer and explanation ▾

Correct answer: A

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 35

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?

  • A. Premium SSD v2
  • B. Premium SSD
  • C. Standard SSD
  • D. Ultra SSD
Show answer and explanation ▾

Correct answer: A

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 36

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?

  • A. Hyperscale
  • B. Business Critical
  • C. General Purpose
Show answer and explanation ▾

Correct answer: A

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 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?

  • A. Premium
  • B. General Purpose
  • C. Business Critical
  • D. Standard
Show answer and explanation ▾

Correct answer: B

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 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?

  • A. a VPN gateway
  • B. a service endpoint
  • C. a private link
  • D. an ExpressRoute gateway
Show answer and explanation ▾

Correct answer: C

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 39

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?

  • A. a VPN gateway
  • B. a service endpoint
  • C. a private link
  • D. an ExpressRoute gateway
Show answer and explanation ▾

Correct answer: C

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 40

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?

  • A. role assignments
  • B. account keys
  • C. shared access signatures (SAS)
  • D. Azure Active Directory (Azure AD) identities
Show answer and explanation ▾

Correct answer: C

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 41

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?

  • A. row-level security
  • B. data masking
  • C. Always Encrypted
  • D. column-level security
Show answer and explanation ▾

Correct answer: B

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 42

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?

  • A. Transparent Data Encryption (TDE)
  • B. Advanced Data Security for this database
  • C. Always Encrypted for all columns
  • D. Secure transfer required
Show answer and explanation ▾

Correct answer: A

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 43

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?

  • A. Disable purge protection on vault1.
  • B. Remove the linked service from df1.
  • C. Create a self-hosted integration runtime.
  • D. Disable soft delete on vault1.
Show answer and explanation ▾

Correct answer: B

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 44

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?

  • A. a contained database user for App1 on DB2
  • B. a login for App1 on Server1
  • C. a contained database user from an external provider for App1 on DB2
  • D. a contained database user from a Windows login for App1 on DB2
Show answer and explanation ▾

Correct answer: A

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 45

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?

  • A. Create User1 in the master database.
  • B. Assign User1 the db_datareader role for the master database.
  • C. Assign User1 the db_datareader role for the databases that User1 creates.
  • D. Grant SELECT on sys.databases to public in the master database.
Show answer and explanation ▾

Correct answer: A

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 46

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?

  • A. a VPN gateway
  • B. a service endpoint
  • C. a private endpoint
  • D. an ExpressRoute gateway
Show answer and explanation ▾

Correct answer: C

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 47

You have an Azure subscription that contains a logical SQL server named Server1. The master database of Server1 contains a user named User1. You need to ensure that User1 can create databases on Server1. Which database role should you assign to User1?

  • A. db_owner
  • B. dbmanager
  • C. dbo
  • D. db_ddladmin
Show answer and explanation ▾

Correct answer: B

The dbmanager role is the correct answer because it is a special fixed database role in Azure SQL Database master database that grants permission to create and delete databases. This is the least-privilege role needed for User1 to create databases on Server1. The dbmanager role is specifically designed for this purpose in Azure SQL Database.

Why the other options are wrong:

  • A. db_owner grants excessive permissions beyond what is needed to create databases.
  • C. dbo is not a role but a user account and login identifier; it cannot be assigned.
  • D. db_ddladmin allows DDL operations on database objects but does not grant the specific permission to create databases at the server level.

Question 48

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?

  • A. Generate a shared access signature (SAS).
  • B. Create an access policy.
  • C. Rotate the storage keys.
  • D. Enable infrastructure encryption.
Show answer and explanation ▾

Correct answer: A

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 49

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?

  • A. Increase scheduling priority
  • B. Log on as a service
  • C. Profile system performance
  • D. Log on as a batch job
Show answer and explanation ▾

Correct answer: B

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 50

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?

  • A. db_owner
  • B. SQLAgentReaderRole
  • C. SQLAgentUserRole
  • D. SQLAgentOperatorRole
Show answer and explanation ▾

Correct answer: D

SQLAgentOperatorRole is the correct answer because it is the least-privileged built-in role that allows users to create and manage scheduled jobs in SQL Server Agent. This role grants permission to view, create, and execute jobs without providing broader administrative rights. It is specifically designed for users who need to schedule maintenance tasks like backups.

Why the other options are wrong:

  • A. db_owner grants excessive administrative privileges beyond what is needed to create a single backup job.
  • B. SQLAgentReaderRole only allows viewing jobs, not creating or scheduling new ones.
  • C. SQLAgentUserRole allows execution of jobs but not creation of new jobs, so it's insufficient for the requirement.

Get the complete DP-300 bank

These 50 questions are roughly 25% of the bank. The full pack has 373 real DP-300 questions, each with the same depth of explanation, plus a questions-only PDF for timed practice and free updates forever.

View the full Microsoft DP-300 question bank →

Related exams

Browse free practice questions for every exam →

Back to blog