How to create an execution log of SQL statements? -
09-14-2010
, 06:00 AM
Hello everyone,
I am looking for a way to store the runtimes of reports or SQL
statements, for trend watching. What i need is some identifier (sql_ID
or reportname) , start and end time ( with date). A sort of
executionlog, i believe that the reportserver already has this built
in ( I didn't have a look yet at that one) and i am looking for ways
to get the same with mssql2005. Surely i can make a trace, but a trace
you only run for a specific amount of time ( say a night at max), not
very suitable for month-to-month trendwatching.
It's ok to have an extra piece of code in every stored procedure that
leaves a record in a executionlog, but for smaller sql units, such as
individual sql statements, that's perhaps overkill. Any thoughts?
Helma |