Exams > Microsoft > DP-300: Administering Relational Databases on Microsoft Azure
DP-300: Administering Relational Databases on Microsoft Azure
Page 5 out of 18 pages Questions 41-50 out of 175 questions
Question#41

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?

  • A. Yes
  • B. No
Discover Answer Hide Answer

Answer: B
You should instead reduce the use of table variables and temporary tables.
Or you could create additional tempdb files
Note: The following operations use tempdb extensively:
* Repetitive create-and-drop operation of temporary tables (local or global).
* Table variables that use tempdb for storage.
* Etc.
Reference:
https://docs.microsoft.com/en-US/troubleshoot/sql/performance/recommendations-reduce-allocation-contention

Question#42

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?

  • A. Yes
  • B. No
Discover Answer Hide Answer

Answer: A
The following operations use tempdb extensively:
* Repetitive create-and-drop operation of temporary tables (local or global).
* Table variables that use tempdb for storage.
* Etc.
Reference:
https://docs.microsoft.com/en-US/troubleshoot/sql/performance/recommendations-reduce-allocation-contention

Question#43

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?

  • A. Connect to db1 and run the sp_configure command.
  • B. Connect to the master database of server1 and run the sp_configure command.
  • C. Configure the extended properties of db1.
  • D. Modify the database scoped configuration of db1.
Discover Answer Hide Answer

Answer: D
If you determine that a MAXDOP setting different from the default is optimal for your Azure SQL Database workload, you can use the ALTER DATABASE
SCOPED CONFIGURATION T-SQL statement.
Reference:
https://docs.microsoft.com/en-us/azure/azure-sql/database/configure-max-degree-of-parallelism

Question#44

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?

  • A. Yes
  • B. No
Discover Answer Hide Answer

Answer: A
To improve the concurrency of tempdb, try the following methods:
* Increase the number of data files in tempdb to maximize disk bandwidth and reduce contention in allocation structures.
* Etc.

Note: Symptoms -
On a server that is running Microsoft SQL Server, you notice severe blocking when the server is experiencing a heavy load. Dynamic Management Views
[sys.dm_exec_request or sys.dm_os_waiting_tasks] indicates that these requests or tasks are waiting for tempdb resources. Additionally, the wait type is
PAGELATCH_UP, and the wait resource points to pages in Tempdb.
Reference:
https://docs.microsoft.com/en-US/troubleshoot/sql/performance/recommendations-reduce-allocation-contention

Question#45

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?

  • A. Attach two mirrored 4-TB SSDs.
  • B. Attach a stripe set that contains four 1-TB SSDs.
  • C. Attach a RAID-5 array that contains five 1-TB SSDs.
  • D. Attach a single 4-TB SSD.
Discover Answer Hide Answer

Answer: B
For more throughput, you can add additional data disks and use disk striping.
Reference:
https://docs.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/storage-configuration?tabs=windows2016

Question#46

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?

  • A. Run the DBCC SQLPERF command.
  • B. Run the DBCC DBREINDEX command.
  • C. Modify the automatic tuning settings for db1.
  • D. Modify the Query Store settings for db1.
Discover Answer Hide Answer

Answer: C
Automatic tuning is a fully managed intelligent performance service that uses built-in intelligence to continuously monitor queries executed on a database, and it automatically improves their performance.
Automatic tuning for Azure SQL Database uses the CREATE INDEX, DROP INDEX, and FORCE LAST GOOD PLAN database advisor recommendations to optimize your database performance.
Reference:
https://docs.microsoft.com/en-us/azure/azure-sql/database/automatic-tuning-overview

Question#47

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.

  • A. Enable query optimizer fixes.
  • B. Enable Resource Governor.
  • C. Enable parameter sniffing.
  • D. Create a workload group.
  • E. Configure In-memory OLTP.
  • F. Run the Database Engine Tuning Advisor.
  • G. Reduce the Max Degree of Parallelism value.
Discover Answer Hide Answer

Answer: BD
SQL Server Resource Governor is a feature that you can use to manage SQL Server workload and system resource consumption. Resource Governor enables you to specify limits on the amount of CPU, physical I/O, and memory that incoming application requests can use.
The following concept is fundamental to understanding and using Resource Governor:
* Workload groups. A workload group serves as a container for session requests that have similar classification criteria. A workload allows for aggregate monitoring of the sessions, and defines policies for the sessions. Each workload group is in a resource pool. Two workload groups (internal and default) are created and mapped to their corresponding resource pools when SQL Server is installed. Resource Governor also supports user-defined workload groups.
Reference:
https://docs.microsoft.com/en-us/sql/relational-databases/resource-governor/resource-governor?view=sql-server-ver15

Question#48

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?

  • A. Implement memory-optimized tables.
  • B. Run the DBCC FLUSHPROCINDB command.
  • C. Replace the sequential index keys with nonsequential keys.
  • D. Run the DBCC DBREINDEX command.
Discover Answer Hide Answer

Answer: A
TempDB contention troubleshooting:
The diagnostics log outputs tempDB contention details. You can use the information as the starting point for troubleshooting. There are two things you can pursue to alleviate this kind of contention and increase the throughput of the overall workload: You can stop using the temporary tables. You also can use memory- optimized tables.
Reference:
https://docs.microsoft.com/en-us/azure/azure-sql/database/intelligent-insights-troubleshoot-performance#tempdb-contention

Question#49

HOTSPOT -
You have an Azure subscription that contains an Azure SQL database.
The database fails to respond to queries in a timely manner.
You need to identify whether the issue relates to resource_semaphore waits.
How should you complete the Transact-SQL query? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Discover Answer Hide Answer

Answer:
If your top wait type is RESOURCE_SEMAHPORE and you don't have a high CPU usage issue, you may have a memory grant waiting issue.
Determine if a RESOURCE_SEMAHPORE wait is a top wait
Use the following query to determine if a RESOURCE_SEMAHPORE wait is a top wait
SELECT wait_type,
SUM(wait_time) AS total_wait_time_ms
FROM sys.dm_exec_requests AS req
JOIN sys.dm_exec_sessions AS sess
ON req.session_id = sess.session_id

WHERE is_user_process = 1 -

GROUP BY wait_type -
ORDER BY SUM(wait_time) DESC;
Reference:
https://docs.microsoft.com/en-us/azure/azure-sql/database/monitoring-with-dmvs

Question#50

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?

  • A. 2
  • B. 4
  • C. 8
  • D. 64
Discover Answer Hide Answer

Answer: C
The number of secondary data files depends on the number of (logical) processors on the machine. As a general rule, if the number of logical processors is less than or equal to eight, use the same number of data files as logical processors. If the number of logical processors is greater than eight, use eight data files. Then if contention continues, increase the number of data files by multiples of four until the contention decreases to acceptable levels, or make changes to the workload/code.
Reference:
https://docs.microsoft.com/en-us/sql/relational-databases/databases/tempdb-database

chevron rightPrevious Nextchevron right