I have to debug a long running SQL Server stored procedure which dynamically builds and executes queries at runtime. I want to run a trace so I can see all of the individual pieces of SQL that are executed.
Which events will provide that level of detail?
I've been advised to use Stored Proc: RPC Completed; Batch Completed and Batch Started. But that's only bringing back the initial execution statement. ie. literally "exec MyStoredProcName".
Any ideas?
Thanks In Advance.