I create and execute dynamic sql and want to use the SQL Server profiler to view this run statement. Do you know which filters / settings I should use to see this? I looked through them and could just look directly at the obvious settings.
EDIT:
Dynamic sql is called inside the procedure.
Thanks Advance,
- S
After editing, you will need the SP:StmtCompleted or SP:StmtStarting (you can find them in the "Stored Procedures" section).
SP:StmtCompleted
SP:StmtStarting
This can collect quite a lot of data, so apply the appropriate filters.
Take a look at the SQL:BatchCompleted in the TSQL category and make sure the TextData column is TextData / shown. The Standard (default) template includes them already.
SQL:BatchCompleted
TSQL
TextData
Standard (default)