13

I have a .trc file from a trace that a DBA did on one of my databases. I don't have the SQL profiler tool installed on my PC so I can't view the contents and analyze the trace log. How do I read this file without SQL profiler installed on my PC?

Shane Wealti
  • 503
  • 2
  • 7
  • 14

2 Answers2

9

I would probably import the trace to a table, for example:

USE MyDB
GO 
SELECT * INTO MyTraceTable FROM ::fn_trace_gettable('C:\Path\To\My\Trace\MyTrace.trc',    
DEFAULT)

If you don't have permissions to create a table, consider using a temporary table or installing SQL Server Express locally and importing the trace there.

Kin's answer (entered concurrently with mine) might be a better option, but I haven't tried ClearTrace yet.

James Lupolt
  • 4,278
  • 5
  • 31
  • 46
7

Use Clear Trace.

Kevin Kline gives a good summary of ClearTrace : Graphical summary tool gives you clear look into trace/Profiler data

Also if you want a basic profiler, look at ExpressProfiler on codeplex.

ExpressProfiler (aka SqlExpress Profiler) is a simple but good enough replacement for SQL Server Profiler with basic GUI No requirements, no installation. Can be used with both Express and non-Express editions of SQL Server 2005/2008/2008r2/2012 (including LocalDB)

Features

Tracing of basic set of events (Batch/RPC/SP:Stmt Starting/Completed, Audit login/logout - needed events can be selected) and columns (Event Class, Text Data,Login, CPU, Reads, Writes, Duration, SPID, Start/End time) Filter on Duration Copy all/selected event rows to clipboard in form of XML Find in "Text data" column

Kin Shah
  • 62,545
  • 6
  • 124
  • 245