October 17, 2005 at 2:35 pm
Is there a way via SQL Profiler or otherwise to view/log intermediate results within a stored procedure?
Here's the situation: I have a sproc that works fine when it's executed directly from Query Analyzer or EM but it's throwing errors when run from Reporting Services. Since the sproc builds a dynamic query I'd like to make sure the final executed query looks right but to do so I need to get an intermediate result from the sproc when it's run by Reporting Services What are my options?
Thanks.
October 18, 2005 at 12:21 am
Profiler should work. Capture the SP:StmtStarting event (under stored procedures)
Otherwise you can create a 'debugging' table and have the stored proc insert the query that it's about to execute in there.
HTH
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply