When I execute the following query, I see that some of the rows show create function definition instead of the code that called the functions. for e.g I would like to know what parameters were used when the function was called. I can't seem to find this information. What could I be missing?
SELECT ST.text FROM sys.dm_exec_query_stats QSCROSS APPLY sys.dm_exec_sql_text(QS.Sql_Handle) as ST
Where ST.dbid = 5
Order BY QS.total_elapsed_time desc