I am interested in when the following query runs: SELECT table_name.col1, table_name.col2, table_name.col3, table_name.col4, table_name.col5, table_name.col6, table_name.col7, table_name.col8 FROM table_name WHERE table_name.col1 = any five digit number here How can one trace this? It seems tidious in profiler to do this. I need to watch this query for a week and I do not want to leave profiler on for a week. Can a trigger be created somehow on this and log the five digit number which is what I am interested in? If it can only be done in profiler how do you eliminate the noise. This is in SQL Server 2000 SP3.
You can run a server side trace and put a filter to collect events only when the statement is like "%Select...%'. and let it run...