I need a way to "programmatically" Capture the Text data(sql statement) the duration for all completed SQL Statements/Batches and Stored procudures for SQL Server.

Although there is a way to caputure this information in Profiler this cannot be dont "prgrommatically" as the results can only go to a .trc file(not readble) if you use xp_ procedures. It must be done manually if you use profiler itself which then can write the results to a SQL Table.

If anyone has any ideas on this I'd appreciate some input.

Thanks

Bill