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

Denis 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.