Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.


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


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.


  • 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.
share|improve this question
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
add comment

migrated from stackoverflow.com May 31 '13 at 13:16

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

2 Answers

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

share|improve this answer
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
add comment

You are running query on the database server. The path in the query is the path on the actual database server and not your local c drive.

Some of your options: 1. Have the DBA put the file on the server and give you the servers path. 2. Have a local instance of SQL Server and use the local path on your desktop. 3. Install SQL Profiler and open it there.

share|improve this answer
I edited my question: everything is running in my local machine. –  ADC May 30 '13 at 16:11
Where is the actual database server that Management Studio is connected to? To find out, run the statement: select @@SERVERNAME –  Chris H May 30 '13 at 17:24
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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