Microsoft DP-300 Practice Test Questions and Exam Dumps Part 15 Q281-300

View Full Microsoft DP-300 Exam Dumps and Practice Test Dumps

 

Question 281. Which Azure service provides a fully managed SQL Server instance with near-complete SQL Server compatibility?

1) Azure SQL Database
2) Azure SQL Managed Instance
3) Azure Cosmos DB
4) Azure Database for PostgreSQL

Answer: 2) Azure SQL Managed Instance

Explanation:

Azure SQL Managed Instance is designed to provide a managed database environment with a high level of compatibility with SQL Server. It supports many SQL Server features that may not be available in Azure SQL Database, making it useful for migrating existing SQL Server workloads with fewer application changes. Microsoft manages infrastructure, patching, backups, and other operational tasks. Database administrators can continue using familiar SQL Server tools and concepts while benefiting from Azure-managed infrastructure. Azure SQL Managed Instance is particularly useful when organizations need instance-level capabilities but do not want to manage operating systems and physical servers themselves.

Question 282. Which Azure option is most appropriate when an administrator needs full control over the SQL Server operating system?

1) Azure SQL Database
2) Azure SQL Managed Instance
3) SQL Server on Azure Virtual Machines
4) Azure Synapse Analytics

Answer: 3) SQL Server on Azure Virtual Machines

Explanation:

SQL Server on Azure Virtual Machines provides the greatest level of administrative control among the listed options. The administrator manages the virtual machine operating system, SQL Server installation, configuration, and many maintenance responsibilities. This option is useful when applications require operating-system access, third-party software, custom SQL Server configurations, or features that are difficult to support through platform-managed services. Azure still provides the underlying virtual infrastructure and related capabilities, but the database administrator remains responsible for many operational tasks. Choosing this deployment model therefore makes sense when full administrative control is more important than minimizing infrastructure management.

Question 283. A company wants to migrate an existing SQL Server application to Azure while retaining support for instance-level features. Which service should the administrator evaluate?

1) Azure SQL Database
2) Azure SQL Managed Instance
3) Azure Blob Storage
4) Azure Table Storage

Answer: 2) Azure SQL Managed Instance

Explanation:

Azure SQL Managed Instance is designed for scenarios where organizations want to move SQL Server workloads to a managed Azure environment while retaining compatibility with many instance-level SQL Server capabilities. This can reduce the number of application changes required during migration compared with moving directly to a database-only platform. The service handles infrastructure management, backups, patching, and other platform responsibilities. It is especially useful for applications that depend on SQL Server features beyond a single database. Administrators should still perform compatibility assessments and testing before migration because application dependencies and unsupported features can affect the migration approach.

Question 284. Which feature allows SQL Server Agent jobs to be created and managed in Azure SQL Managed Instance?

1) Azure SQL Managed Instance Agent
2) Azure Storage Explorer
3) Azure Data Factory Gateway
4) Microsoft Defender for SQL

Answer: 1) Azure SQL Managed Instance Agent

Explanation:

Azure SQL Managed Instance includes support for SQL Server Agent functionality through its managed environment. SQL Server Agent is commonly used to automate scheduled database administration tasks such as maintenance operations, data processing, and recurring procedures. This capability is important for organizations migrating SQL Server workloads that depend on scheduled jobs. Administrators can use jobs, schedules, and related automation mechanisms to perform routine tasks without manually executing them. When designing these jobs, database professionals should consider dependencies, permissions, execution frequency, error handling, and monitoring so that automated operations remain reliable and do not unnecessarily affect production workloads.

Question 285. An administrator needs to execute a database maintenance procedure every Sunday at 2:00 AM. Which SQL Server Agent component defines when the job should run?

1) Operator
2) Schedule
3) Alert
4) Credential

Answer: 2) Schedule

Explanation:

A SQL Server Agent schedule defines when and how frequently a job executes. For example, an administrator can configure a schedule to run a maintenance job weekly on Sunday at 2:00 AM. The job contains the tasks or steps to execute, while the schedule determines the timing. This separation allows the same job to be associated with different schedules when appropriate. Schedules are useful for automating backups, index maintenance, statistics updates, data processing, and other recurring activities. Administrators should select execution times carefully to minimize interference with business workloads and should monitor job history to verify successful execution.

Question 286. Which SQL Server Agent feature can notify an administrator when a specified database-related condition occurs?

1) Alert
2) Schedule
3) Table variable
4) View

Answer: 1) Alert

Explanation:

SQL Server Agent alerts are used to respond to specific conditions or events and can notify administrators when those conditions occur. Alerts may be based on SQL Server events, performance conditions, or other configured criteria. They can be associated with jobs or operators so that an appropriate response can be triggered automatically. For example, an administrator might configure an alert for a serious database error and use it to initiate notification or an automated job. Alerts therefore support proactive administration by helping database professionals detect important events without continuously monitoring the server manually.

Question 287. Which feature allows an administrator to configure database-level settings without changing the entire SQL Server instance configuration?

1) Database-scoped configuration
2) Server certificate
3) Database Mail
4) SQL Server Agent operator

Answer: 1) Database-scoped configuration

Explanation:

Database-scoped configurations allow administrators to control certain database behavior at the individual database level. This provides more granular management than applying a setting across an entire SQL Server instance. Such configurations can be useful when different databases have different workload characteristics or performance requirements. Administrators can review and modify supported database-scoped settings using appropriate SQL Server management tools and T-SQL commands. This approach helps isolate configuration changes to the database that requires them, reducing the possibility that a change intended for one workload will unexpectedly affect other databases hosted on the same environment.

Question 288. Which SQL Server setting controls the maximum number of processors used for parallel query execution?

1) MAXDOP
2) MAX_MEMORY
3) MIN_SERVER_MEMORY
4) QUERY_TIMEOUT

Answer: 1) MAXDOP

Explanation:

MAXDOP, or maximum degree of parallelism, controls the maximum number of processors that SQL Server can use when executing parallel query plans. Parallelism can improve performance for large or complex queries by allowing multiple worker threads to process portions of the workload simultaneously. However, excessive parallelism can consume significant CPU resources and potentially affect other workloads. Database administrators therefore configure MAXDOP based on workload characteristics, hardware, and the database environment. It is not a direct command to force every query to use a specific number of processors; instead, it establishes a limit that the optimizer considers when generating parallel execution plans.

Question 289. Which SQL Server feature can be used to prevent queries with excessive estimated resource costs from executing?

1) Query governor cost limit
2) Database Mail
3) Transparent Data Encryption
4) Row-Level Security

Answer: 1) Query governor cost limit

Explanation:

The query governor cost limit can prevent queries whose estimated execution cost exceeds a configured threshold from running. This feature is intended to help protect environments from poorly designed or unexpectedly expensive queries. The limit is based on the optimizer’s estimated cost rather than the actual amount of time or resources eventually consumed. Therefore, it should be configured carefully and should not replace proper query optimization, indexing, and workload monitoring. Administrators can use it in environments where controlling resource-intensive ad hoc queries is important. Before enabling such restrictions, testing is recommended to ensure legitimate workloads are not unintentionally blocked.

Question 290. Why is tempdb configuration important when managing SQL Server workloads?

1) It stores only permanent user tables
2) It supports temporary objects, internal operations, and version-store activity
3) It replaces the transaction log
4) It stores database backups permanently

Answer: 2) It supports temporary objects, internal operations, and version-store activity

Explanation:

tempdb is a system database used by SQL Server for several temporary and internal operations. These include temporary tables, table variables in relevant scenarios, worktables, sorting operations, and row-versioning activities. Because many workloads can use tempdb simultaneously, poor configuration or heavy contention can affect overall performance. Database administrators should monitor tempdb usage, understand workload patterns, and configure storage appropriately. The transaction log of tempdb also supports its operations, but tempdb is not a replacement for user-database transaction logs. Proper tempdb management is therefore an important part of SQL Server performance and operational administration.

Question 291. Which SQL Server object is created with a name beginning with # and is automatically removed when its scope ends?

1) Temporary table
2) Permanent table
3) View
4) Stored procedure

Answer: 1) Temporary table

Explanation:

A local temporary table is commonly identified by a name beginning with the # symbol, such as #SalesData. SQL Server creates temporary tables in tempdb and manages their lifetime according to their scope. They are useful for storing intermediate results during complex procedures or multi-step queries. Temporary tables can contain indexes and statistics, making them useful for certain workloads involving larger intermediate datasets. Because they consume tempdb resources, administrators should use them appropriately and avoid unnecessary creation or excessive data storage. Understanding their scope and lifecycle helps database professionals design procedures that are efficient and predictable.

Question 292. Which statement best describes a table variable in SQL Server?

1) It is always stored permanently in the user database
2) It is a temporary relational structure declared using a variable syntax
3) It replaces every use of a temporary table
4) It can only contain one row

Answer: 2) It is a temporary relational structure declared using a variable syntax

Explanation:

A table variable is a temporary relational structure declared using the DECLARE statement and a table definition. It can store multiple rows and can be useful for relatively small intermediate datasets or procedural operations. Table variables have different behavior and optimization characteristics from temporary tables, so they should not automatically be considered interchangeable. The choice between a table variable and temporary table depends on factors such as data volume, query complexity, statistics, indexing needs, and SQL Server version. Database professionals should evaluate actual workload behavior rather than selecting one object type solely because it appears simpler to declare.

Question 293. Which index type is specifically designed to efficiently store and analyze large amounts of analytical data in a column-oriented format?

1) Columnstore index
2) XML index
3) Spatial index
4) Hash index

Answer: 1) Columnstore index

Explanation:

A columnstore index stores data in a column-oriented format rather than organizing it primarily by rows. This design can provide substantial benefits for analytical workloads that scan and aggregate large datasets because queries often need values from only a subset of columns. Columnstore technology also uses compression techniques that can reduce storage requirements and improve data access efficiency. SQL Server supports clustered and nonclustered columnstore indexes for different workload patterns. Database administrators should evaluate workload characteristics before implementing them because transaction-heavy applications may require different indexing strategies than large-scale analytical workloads.

Question 294. Which index type organizes an entire table in columnstore format rather than maintaining a separate rowstore table structure?

1) Clustered columnstore index
2) Nonclustered rowstore index
3) Filtered index
4) XML index

Answer: 1) Clustered columnstore index

Explanation:

A clustered columnstore index stores the table itself in columnstore format. Instead of maintaining a traditional rowstore organization as the primary storage structure, the table data is organized into column-oriented structures designed for analytical processing. This can provide strong compression and efficient scanning for aggregation-heavy workloads. Clustered columnstore indexes are commonly associated with large fact tables and data warehouse scenarios. Administrators should consider data modification patterns, query requirements, and indexing needs before implementation. Additional indexes may sometimes be appropriate, but their impact on storage and maintenance should also be evaluated as part of overall database design.

Question 295. What is the primary benefit of a filtered index in SQL Server?

1) It indexes every row regardless of the filter condition
2) It indexes only rows that satisfy a specified predicate
3) It automatically encrypts indexed data
4) It removes the need for statistics

Answer: 2) It indexes only rows that satisfy a specified predicate

Explanation:

A filtered index contains only the rows that meet a defined filter predicate. This can make the index smaller than a full-table index and may improve performance for queries that repeatedly target the same subset of data. For example, an application might frequently query active records while most rows are inactive. A filtered index could focus on those active rows instead of indexing the entire table. Smaller indexes can also reduce storage and maintenance overhead. However, the query predicates should align appropriately with the filter condition so that SQL Server can effectively use the index.

Question 296. Why are included columns useful in a nonclustered index?

1) They allow additional query columns to be stored with the index without making them key columns
2) They convert the index into a clustered index
3) They automatically create a foreign key
4) They remove the table’s primary key

Answer: 1) They allow additional query columns to be stored with the index without making them key columns

Explanation:

Included columns allow additional non-key columns to be stored at the leaf level of a nonclustered index. This can help a query retrieve required information directly from the index rather than performing additional lookups against the base table. As a result, a properly designed covering index can reduce I/O and improve query performance. Included columns do not determine the logical ordering of the index because they are not key columns. Administrators should still avoid adding excessive included columns because larger indexes require more storage and can increase the cost of data modification and index maintenance.

Question 297. What is the main difference between an estimated execution plan and an actual execution plan?

1) An actual plan includes execution information from the query that ran
2) An estimated plan always contains runtime statistics
3) An actual plan cannot show operators
4) Estimated and actual plans are identical in every respect

Answer: 1) An actual plan includes execution information from the query that ran

Explanation:

An estimated execution plan represents how SQL Server expects a query to execute before the query is actually run. An actual execution plan is generated after execution and can include runtime information gathered while the query executes. Comparing estimated and actual information can help administrators identify issues such as inaccurate cardinality estimates, unexpected row counts, inefficient operators, or problematic execution strategies. Execution plans are important tools for performance troubleshooting because they show how SQL Server processes a query. Database professionals can use them alongside Query Store, statistics, and workload monitoring to identify opportunities for query optimization.

Question 298. Which Query Store setting determines how frequently query execution and runtime information is captured?

1) Query Store capture mode
2) Database Mail profile
3) SQL Server Agent schedule
4) Backup compression

Answer: 1) Query Store capture mode

Explanation:

Query Store capture settings influence which queries and related execution information are collected and retained. Proper configuration helps administrators balance useful performance history against unnecessary data collection. Depending on the SQL Server or Azure SQL environment and version, Query Store provides configuration options that can control how workload information is captured. Administrators can review Query Store settings and adjust them according to workload characteristics. Effective configuration is important because excessive capture can create unnecessary storage and processing overhead, while overly restrictive settings may omit useful information needed for performance analysis and troubleshooting.

Question 299. Which Azure SQL Database capability helps administrators identify queries that consume significant database resources?

1) Query Performance Insight
2) Azure DNS
3) Azure Storage Explorer
4) Microsoft Entra Domain Services

Answer: 1) Query Performance Insight

Explanation:

Query Performance Insight provides visibility into query performance and resource consumption for Azure SQL Database workloads. It can help administrators identify queries that consume significant amounts of database resources and investigate performance trends over time. This information can support troubleshooting and optimization activities, such as reviewing indexes, query structure, execution plans, or application behavior. Instead of examining every query manually, administrators can use performance information to focus investigation on workloads with notable resource consumption. Query Performance Insight can therefore complement tools such as Query Store and Azure Monitor when diagnosing database performance issues.

Question 300. Which Azure SQL Database feature provides recommendations related to database performance and optimization?

1) Azure SQL Database Advisor
2) Azure Key Vault
3) Azure Load Balancer
4) Azure Resource Graph

Answer: 1) Azure SQL Database Advisor

Explanation:

Azure SQL Database Advisor provides recommendations intended to help improve database performance and optimize workloads. Recommendations can relate to areas such as indexing and query performance, depending on the workload and supported capabilities. Database administrators can review these recommendations before applying changes and should evaluate their potential impact on application behavior, storage, and maintenance overhead. Automated recommendations should be treated as guidance rather than a substitute for workload analysis. By combining advisor recommendations with Query Store, execution plans, and monitoring information, administrators can make more informed decisions about database optimization and ongoing performance management.