TestKing.com uses SQL Server 2005. A user reports that an order processing application stopped responding in the middle of an order transaction. The users SQL Server session ID is 54.
You need to find out if session 54 is blocked by another connection. If it is, you need to identify the blocking session ID. What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
A.
In SQL Server Management Studio, open the Activity Monitor. Open the Process Info page. View the BlockedBy column for session 54.
B.
In SQL Server Management Studio, open the Activity Monitor. Open the Locks by Process page. View the Request Mode column for session 54.
C.
In SQL Server Management Studio, open a new query window and execute the following statement.SELECT * FROM sys.dm_exec_requests WHERE session_id = 54View the blocking_session_id column.
D.
In SQL Server Management Studio, open a new query window and execute the following statement.SELECT * FROM sys.dm_exec_sessionsWHERE session_id = 54View the status column.
Explanation:
The Process Info page shows the properties of current processes.
Blocked By tells you the Process ID (SPID) of a blocking process. Blocking indicates whether this process is blocking others. 1=yes; 0=no.
To determine whether a process is being blocked and to identify the process that is creating the blocking, you could also use the sys.dm_exec_request DMV. If a value greater that 0 exists in the blocking_process_id column, the process is being blocked by the SPID logged in the column.