Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Data Management

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Your profile

Authors

Search

XML Feeds

Google Ads

« SQL Server Case/When Data Type problemsIndex and Statistic creation with SQL Server DTA »
comments
Rate Post:
submit to reddit Digg!FacebookDotnetkicks

sqtlrace is a stored procedure written by Lee Tudor (a.k.a Mr Tea.) The procedure takes an SQL batch as its first argument, sets up a trace filtered to include the current connection only, runs the batch, and summarises the trace information per statement in the batch. This can be a very handy tool to track down performance bottlenecks in a longer stored procedure, not the least if there are calls to nested procedures.

You can also use sqltrace to capture the query plans from a batch. This makes it possible to capture a single plan in a deep chain of nested stored procedures without drowning in all the other plans. This is particularly convenient with SSMS 2008: if you click on the XML document for the plan in grid mode, the graphical plans open directly.

Erland Sommarskog is hosting this on his site, you can get the source code and more info here: http://www.sommarskog.se/sqlutil/sqltrace.html

About the Author

User bio imageDenis has been working with SQL Server since version 6.5. Although he worked as an ASP/JSP/ColdFusion developer before the dot com bust, he has been working exclusively as a database developer/architect since 2002. In addition to English, Denis is also fluent in Croatian and Dutch, but he can curse in many other languages and dialects (just ask the SQL optimizer) He lives in Princeton, NJ with his wife and three kids.
Social SitingsTwitterFacebookLinkedInHomePageLTD RSS Feed
1302 views
submit to reddit Digg!FacebookDotnetkicks

Comments and Feedback

No feedback yet

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)