2

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.

7
  • How are you loading the trace data into the table? Are the provider errors the only thing missing from the table? Commented Feb 23, 2012 at 4:32
  • @AaronBertrand: See update. Provider related errors are the only thing I've noticed that are missing, haven't looked for other things.
    – OMG Ponies
    Commented Feb 23, 2012 at 4:37
  • Can you show an example of the provider error you're seeing in Profiler? I can't think of any reason why the data would be left out. Did you compare COUNT(*) against the function and the resulting table? Perhaps you are searching for provider error-related strings and it's not matching due to case sensitivity or binary collation etc. Commented Feb 23, 2012 at 4:38
  • Not really, not at work. The last time I tried & couldn't find anything, I was checking for case sensitivity/etc in EventClass IIRC.
    – OMG Ponies
    Commented Feb 23, 2012 at 4:41
  • Well to be clear I didn't mean the verbose part of the error message that might reveal table names, column names, etc. Just the pertinent info like EventClass, StartTime, etc. Commented Feb 23, 2012 at 4:44

1 Answer 1

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.