Cannot open SQL Server profiler file

Scenario

Debugging a failed transaction, I asked the DBA to run a trace on SQL Server. Eventually he send me a .trc file.

Issue

I use the fn_tracegettable() function to access the trace:

select * from sys.fn_trace_gettable('C:\path\to\myTraceFile.trc', default)


But I get the following error:

  Msg 567, Level 16, State 7, Line 1
File 'C:\path\to\myTraceFile.trc' either does not exist or is not a recognizable trace file. Or there was an error opening the file.


Facts

• The SQL Management Studio I am executing the fn_tracegettable from runs in my local machine.
• The .trc file is in my local machine.
• Both the server and the local machine run a SQL Server 2008 R2.
-
I'm not sure if it makes a difference, but what is the version of the server instance where the trace was collected, and what is the version of your local instance? –  Jon Seigel May 31 '13 at 13:26
@Jon Seigel: fact added in my question. –  ADC May 31 '13 at 13:34

migrated from stackoverflow.comMay 31 '13 at 13:16

This question came from our site for professional and enthusiast programmers.

Why are you opening the file in the SQL Management Studio? Use the SQL Server Profiler tool instead to open .trc files.

-
Unfortunatly, SQL Server Profiler tool is not available in my SQL Management. –  ADC May 30 '13 at 12:52
You should install the Profiler tool then. In SQL Management Studio are you connecting to a local DB instance? –  bastos.sergio May 30 '13 at 12:57
Just FYI you can open trace files like that, the columns & rows show up in the results pane just like a normal query. –  Meff May 30 '13 at 13:37