exam questions

Exam 70-764 All Questions

View all questions & answers for the 70-764 exam

Exam 70-764 topic 1 question 310 discussion

Actual exam question from Microsoft's 70-764
Question #: 310
Topic #: 1
[All 70-764 Questions]

You have a database named DB1.
Users report that a database application that updates the data in DB1 is unresponsive.
You need to identify which process prevents the application from responding.
What should you do?

  • A. Run DBCC INPUTBUFFER.
  • B. Query sys.dm_exec_session_wait_stats.
  • C. Run sp_autostats.
  • D. Run sp_who.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
Sys.dm_exec_session_wait_stats returns information about all the waits encountered by threads that executed for each session. You can use this view to diagnose performance issues with the SQL Server session and also with specific queries and batches.
References: https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-exec-session-wait-stats-transact-sql

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
dxico
4 years, 5 months ago
question not complete. You have a database named DB1. Users report that a database application that updates the data in DB1 is unresponsive. You need to identify which process prevents the application from responding. What should you do?  Run DBCC INPUTBUFFER.  Query sys.dm_exec_session_wait_stats.  Run sp_autostats.  Run sp_who.  Query sys.dm_db_resource_stats.  Run sp_getapplock.  Query sys.dm_os_waiting_tasks. I would say Query sys.dm_os_waiting_tasks is the right answer. It provides the output with the following columns waiting_task_address, session_id, exec_context_id, wait_duration_ms, wait_type, resource_address, blocking_task_address blocking_session_id, blocking_exec_context_id, resource_description
upvoted 2 times
...
Matus
5 years, 2 months ago
in my opinion the sp_who is correct, there are listed all processes and in column "blk" you can quickly determine which process is causing the blocking..
upvoted 4 times
...
TheSwedishGuy
5 years, 4 months ago
DBCC INPUTBUFFER - Displays the last statement sent from a client to an instance of Microsoft SQL Server. This last statement might not be the one that prevents the response from the application. session_wait_stats contains all waits though. There you can see the process that blocks the response.
upvoted 1 times
MSSucks
5 years, 4 months ago
You're sure? sys.dm_exec_wait_stats only contains the aggregated statistics (per session). However sys.dm_exec_requests contains blocking_session_id. Or sys.dm_os_waiting_tasks contains blocking_task_address, blocking_session_id and blocking_exec_context_id. So in my eyes they are way more suitable to "identify which process prevents the application from responding". Unfortunately this would mean that none of the proposed answers would be the correct one. :-/
upvoted 2 times
...
jolsca
4 years, 9 months ago
As for a real world use, I will mostly use this command after using sp_who2 to find out which SPID is taking a lot of resources.
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...