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. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to diagnose an issue with a production SQL Server instance. I have asked the DBA to provide a trace and have been given a set of SQL trace files (1185 files to be precise).

When I open the first file, SQL Profiler detects presence of additional trace files and prompts me to load the one by one - this approach does not scale to 1185 files.

Ultimately, what I want is to import all that trace data into SQL server so I can query it.

Can you recommend an approach or tool that would allow me to do this?

share|improve this question
do you have dev sql server instances? – swasheck Nov 16 '12 at 17:43
up vote 3 down vote accepted

Laerte Junior has a nice article on how to read these using Powershell. Go down to the "Reading Multiple Trace Files and Insert into SQL table." section for the exact statement.

share|improve this answer

The following will insert the entire set of files into a table of your choosing. Then you can query. Please do this on a dev instance.

INTO [Database].[schema].[table] 
FROM ::fn_trace_gettable('\path\to\tracefile1.trc', default)
share|improve this answer

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.