Sql-server – Profiler: Only want to see Provider Errors

profilersql server

I'm replaying a trace in Profiler, and I'd like to only see the Provider Errors. Granted, there are ~30,000 of them but I'm not concerned at the moment about row update conflicts, foreign key or unique index issues.

Currently, I'm output the trace from the replay to file. I've tried creating a table from the result trace file, but either I'm missing something or the Provider Errors are not being imported into the table:

SELECT * 
  INTO MyTraceTemp
  FROM ::fn_trace_gettable('c:\x\MyTrace.trc', default)

This is using Profiler against SQL Server 2008R2, if that matters.

Best Answer

Thanks Aaron - I confirmed the same number of rows were there between the trace dumped to a table, and what was showing in Profiler.

Then, I used the following WHERE to get the records I wanted to see:

WHERE CAST(textdata AS VARCHAR(MAX)) LIKE '%(Code%'

...because all the Provider errors stated the code for the error.