PrepAway - Latest Free Exam Questions & Answers

Which Transact-SQL statement should you use?

You administer a Microsoft SQL Server 2012.
A process that normally runs in less than 10 seconds has been running for more than an hour.
You examine the application log and discover that the process is using session ID 60.
You need to find out whether the process is being blocked.
Which Transact-SQL statement should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
EXEC sp_who 60

B.
SELECT * FROM sys.dm_exec_sessions WHERE sessionid = 60

C.
EXEC sp_helpdb 60

D.
DBCC INPUTBUFFER (60)

Explanation:
sp_who provides information about current users, sessions, and processes in an instance of the Microsoft SQL
Server Database Engine. The information can be filtered to return only those processes that are not idle, that
belong to a specific user, or that belong to a specific session.
Example: Displaying a specific process identified by a session ID
EXEC sp_who ’10’ –specifies the process_id;
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-whotransact-sql


Leave a Reply