Hi friends... It's me again... I need to ask you one simple question this time. Is there som mechanism to get a lot of info when a stored procedure execution lasts more then a given threshold? I have a stored procedures that runs great 99% of the time (not more than 5ms) but from now and then it lasts about 2 or 3 seconds (and sometimes even more). This can happen 2 times a day at most, so I can't leave a Profiler on, because it could create a file so big that would make the server collapse. I want to know what happened with that particular execution, so I can see if there is some issue with a index or similar. Thanks a lot! Zim
Profiler is just a Gui for SQL Server's tracing API. Create a server-side trace using Profiler and let that run instead of the Gui. Have a look here, for example: http://sqlblog.com/blogs/linchi_shea/archive/2007/08/01/trace-profiler-test.aspx
fine... that looks exactly like what I need... I will give it a try and see how it works. I'll let you know. Thanks a lot! Zim