Merge profile traces

  • Hi all,

    I have a number of trace files generated by the profiler on a SQL Server 2000 box.

    Does any one know ofa way to merge the individual trace files into a single file?

    I would like to be able to run an index wizard over the entire trace history.

    Thanks

    DJ

  • Instead of merging files, you can import all of your trace files into a table using a built-in function. Here is an example:

    Use TraceDB

    Select * into Trace_Table_Name From :: fn_trace_gettable('c:\MyTrace.trc',default)

    After the first file, you could run this:

    Insert into Trace_Table_Name

    select * from :: fn_trace_gettable('c:\MyTrace2.trc', default)

    ...for each subsequent file you want to analyze. Then, in the Index Tuning Wizard "Specify Workload" step, choose "SQL Server trace table" as the source for the workload.

    For more information on how to automate the process of capturing trace files and importing them into tables, check out this article from Haidong Ji:

    http://www.sqlservercentral.com/columnists/hji/trace.asp

  • Thanks for that.

    I had imported them into separate tables and tried to merge them from there but it did not like it. I also did not know you could do the import from the TSQL prompt.

    Thanks again.

    DJ

    Edited by - darrenj on 11/02/2003 5:09:20 PM

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply