Sql-server – How to read the actual value of @P0 in SQL server profiler

profilersql server

When I use SQL server profiler to trace the SQL statement flow using SP:StmtCompleted,

I can only read the variables as @P0, @P1, etc. like:

insert into CaseFollowup (createDate, duration) values (@P0, @P1)

Can I read the actual value of @P0, @P1?

Thanks for your help!

Best Answer

Use rpc_completed to get parameter values. Also, use extended events instead of profiler if you're on SQL 2012 or newer.