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?

1
  • Qure Profiler is great... It shows barchars and it's easy to see which queries your server is spending the most time processing. Just make sure you get a really big sample size (it's perfectly happy processing a 2GB trace file). dbsophic.com/products/qure-optimizer – NickG Feb 3 '16 at 13:31
8

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

2
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.

1
  • 1
    Comparing normal profiler and clear trace functionality, in clear trace, you can tell how much CPU, disk reads and writes are done and it shows aggregates as well. I have used it and its a time saver when identifying bottlenecks. This is an online version tracetune.com – Kin Shah Jul 24 '13 at 19:51

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