For application debugging purpose, we are designing for a trace feature to capture all application related SQL batches and debug messages on a SQL Server Instance. Exporting the trace is also required.
We run SQL batches and write the debug messages all within CLR Stored Procedures.
We are considering to
- Write code to insert trace records into database table.
- Use SQL Trace T-SQL.
Which do you think is usual practice and better? Or could you see any another approach?
Thank you.