SQL Server Profiler - View Dynamic Sql

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

+6
sql tsql sql-server-2008
source share
2 answers

After editing, you will need the SP:StmtCompleted or SP:StmtStarting (you can find them in the "Stored Procedures" section).

This can collect quite a lot of data, so apply the appropriate filters.

+6
source share

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.

0
source share

All Articles