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?

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?

A.
SELECT * FROM sys.dm_exec_sessions WHERE session_id = 60

B.
DBCC INPUTBUFFER (60)

C.
EXEC sp_helpdb 60

D.
SELECT * FROM sys.dm_exec_request WHERE session_id = 60



Leave a Reply 22

Your email address will not be published. Required fields are marked *


GG

GG

The corect answer is A.
sys.dm_exec_sessions is a server-scope view that shows information about all active user connections and internal tasks. This information includes client version, client program name, client login time, login user, current session setting, and more. Use sys.dm_exec_sessions to first view the current system load and to identify a session of interest, and then learn more information about that session by using other dynamic management views or dynamic management functions.

Dimitrije

Dimitrije

“You need to find out whether the process is being blocked.”

correct answer is D, because in that view exist information about blocking session id.

Bob Smith

Bob Smith

SELECT * FROM sys.dm_exec_request WHERE session_id = 60

returns a syntax error Invalid object name ‘sys.dm_exec_request’.

It has to be A.

Kevin Burgess

Kevin Burgess

I think it is a typo…..

select * from sys.dm_exec_requests;

That works….

Google

Google

Please stop by the web sites we adhere to, such as this a single, as it represents our picks from the web.

como fazer uma retrospectiva

como fazer uma retrospectiva

although web sites we backlink to beneath are considerably not connected to ours, we feel they are really worth a go by, so possess a look

app maker

app maker

we prefer to honor many other net internet sites around the internet, even when they arent linked to us, by linking to them. Beneath are some webpages worth checking out

work home opportunities

work home opportunities

always a huge fan of linking to bloggers that I really like but dont get a great deal of link appreciate from

Fenster und Turen

Fenster und Turen

check beneath, are some completely unrelated sites to ours, on the other hand, they are most trustworthy sources that we use

make an app

make an app

here are some links to web pages that we link to mainly because we consider they are worth visiting

プラセンタ

プラセンタ

one of our guests not too long ago recommended the following website

プラセンタ

プラセンタ

Every as soon as in a though we opt for blogs that we study. Listed below are the latest websites that we pick out

インフルエンザ

インフルエンザ

just beneath, are several totally not related web sites to ours, even so, they’re surely worth going over

インフルエンザ

インフルエンザ

just beneath, are a lot of absolutely not connected web-sites to ours, nevertheless, they are surely really worth going over

why not try these out

why not try these out

Here is a superb Weblog You might Come across Exciting that we Encourage You

gaming laptops

gaming laptops

one of our visitors just lately suggested the following website

Ricardo

Ricardo

D.

But have a error:
sys.dm_exec_request (error) because correct sys.dm_exec_requests

Patty

Patty

sys.dm_exec_requests

Tested it

select blocking_session_id,* from sys.dm_exec_requests
where blocking_session_id0

Lorita Ferrall

Lorita Ferrall

What i do not understood is actually how you’re no longer really much more neatly-favored than you might be right now. You are very intelligent. You already know therefore considerably in the case of this matter, produced me individually imagine it from so many varied angles. Its like men and women aren’t fascinated except it is something to do with Girl gaga! Your personal stuffs outstanding. Always care for it up!