Re: execution plan for single stored procedure from profiler



TheRealPawn@xxxxxxxxx (TheRealPawn@xxxxxxxxx) writes:
Well, we have it filtered down to stored proc and execution tree via
the text data. However, we get all execution tree data not just for
the execution of the stored proc. We won't know the SPID and is very
likely we'll have many SPIDs that we'll see in the trace.

You should be able to filter for the ObjectID of the stored procedure. (And
database ID if there are multiple databases with the same object ID.) At
least that works on SQL 2005. (I know, because I set up such a trace at a
customer site. Proabably still running, because I have had had little time
to look at it!)


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

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
.



Relevant Pages

  • Re: Stored procedure never finishes
    ... Perhaps when you run the query without the date range, ... You do this by issuing "exec sp_lock [spid]" with spid being ... SQL Server MVP ... > I have a stored proc that won't finish. ...
    (microsoft.public.sqlserver.server)
  • Re: execution plan for single stored procedure from profiler
    ... we get all execution tree data not just for ... the execution of the stored proc. ... We won't know the SPID and is very ... Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books ... ...
    (comp.databases.ms-sqlserver)
  • handling errors from stored procs
    ... SQL Server 2000 ... comprise the call to a stored proc ... the stored proc gets run...if so, it would be nice if the Access app ... - when stored proc encounters error, it returns that error message ...
    (comp.databases.ms-access)
  • Re: Retrieve error text from extended stored proc
    ... was only on first execution, the following executions, error number was 0. ... However, use OSQL with the -m-1 switch, and you will see that the RAISERROR ... Tibor Karaszi, SQL Server MVP ... > When I call the stored proc from Query Analyzer and force an error, ...
    (microsoft.public.sqlserver.programming)
  • Re: Can you use osql in DTS?
    ... Dim pkg, task, spid ... Columnist, SQL Server Professional ... the variable I need to pass into a stored procedure and have it function ... >> osql. ...
    (microsoft.public.sqlserver.dts)

Loading