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.

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
1  
do you have dev sql server instances? –  swasheck Nov 16 '12 at 17:43
add comment

2 Answers

up vote 2 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
add comment

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.

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

Your Answer

 
discard

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.