Unix Technical Forum

Detecting or monitoring for long-running queries.

This is a discussion on Detecting or monitoring for long-running queries. within the SQL Server forums, part of the Microsoft SQL Server category; --> I can't seem to find a step-by-step guide to how to detect or continuously monitor for long-running queries that ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 07:10 PM
sqlserver yeahbaby
 
Posts: n/a
Default Detecting or monitoring for long-running queries.

I can't seem to find a step-by-step guide to how to detect or
continuously monitor for long-running queries that is suitable
for a comparative SQL Server novice. I know that it is possible
to monitor for such with other database products - can anyone
enlighten me as to how this is done with SQL Server? Ideally,
I'd like to snapshot running queries (preferably with query
text) at a particular instant via a script, although any help
to show what queries are running at an instant will be much
appreciated. Any ideas?

__________________________________________________ ___________
Are you Catholic ?
http://www.CatholicEmail.com

100s of FREE email addresses --->
http://www.UltimateEmail.com

Send an Online Greeting Card http://www.UltimateEcards.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 07:10 PM
Erland Sommarskog
 
Posts: n/a
Default Re: Detecting or monitoring for long-running queries.

sqlserver yeahbaby (Use-Author-Address-Header@[127.1]) writes:
> I can't seem to find a step-by-step guide to how to detect or
> continuously monitor for long-running queries that is suitable
> for a comparative SQL Server novice. I know that it is possible
> to monitor for such with other database products - can anyone
> enlighten me as to how this is done with SQL Server? Ideally,
> I'd like to snapshot running queries (preferably with query
> text) at a particular instant via a script, although any help
> to show what queries are running at an instant will be much
> appreciated. Any ideas?


On my web site there is a stored procedure, aba_lockinfo, that is not
a perfect match for your request, but which does give the information
you are asking for - and maybe information which you do not care
about. You could look at
http://www.algonet.se/~sommar/sqlutil/aba_lockinfo.html, and see if
it anything for you.

--
Erland Sommarskog, SQL Server MVP, sommar@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:14 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com