You are here: Re: Using aba_lockinfo in a loop « MsSQL Server « IT news, forums, messages
Re: Using aba_lockinfo in a loop

Posted by Erland Sommarskog on 08/18/06 12:30

Jim Devenish (internet.shopping@foobox.com) writes:
> Erland Sommarskog's procedure aba_lockinfo provides very valuable
> information when trying to sort out locking and blocking problems.
>
> However is only provides a snapshot in time.
>
> Is it possible to have this run continuously for a period of time? or
> possibly at set intervals, say every minute?
>
> If so, how would one set it up?

You could run it from SQL Server Agent. When you set up the job step, there
is an Advanced tab where you can redirect output to a file, and you can opt
to append to an existing file.

I would however not recommend you do this for any longer period of time in
a production environment. If system is already under load, and there are a
lot processes and lot of locks, the procedure itself takes some resources.

(But I recall that I did precisely this, ran aba_lockinfo once a minute at
one of our customers for a day or two, back in the days of SQL 6.5, and I
was able to find several flaws in our product. In fact some of the blocking
situations were unbelivable. In the lvl column which displays how many you
are waiting for, I saw the number 15!)


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация