Sql-server – Determine Which Parameters Passed Into Stored Procedure

sql serversql-server-2008stored-procedures

Is there a way to determine (from within a stored procedure) which parameters were passed into a stored procedure (vs. those which just took the default value)?

Best Answer

You can run a Profiler Trace using the default template. It will include the RPC:Completed Event. When you review the trace log you will see the values of the parameters passed and you can determine which were left out, therefore using the default values.