Trc2Table.exe - Save SQL Trace file to SQL Server Table

version: 1.0.0.1

last updated: 13 April 2005

platform: MSDE 2000 and SQL Server 2000 running Windows NT 4.0 and higher


Description:

 

Trc2Table save a SQL Server 2000 trace file to a SQL Server table.

 

Note: This tools provides the same resulting SQL Server table as when using the SQL Profiler UI (FileðSave AsðTrace Table).

 


Usage:

 

Trc2Table.exe version 1.0x1

Trc2Table usage:

-i input file
-S server name
-U user name
-P password
-E Windows authentication
-d database name
-t table name

-v version information
-? command line usage

 

Warning: When the destination table exists, the table will get dropped and rebuild!

 


Sample output:

Save a SQL Server 2000 trace file to a SQL Server table.

Trc2Table -i c:\temp\trace.trc -s (local)\sql80 -E -d tempdb -t perftrace

The structure of the result table dbo.perfmon:

create table dbo.perftrace
(
    RowNumber         int identity(1, 1) not null,
    EventClass        int null,
    TextData          ntext null,
    NTUserName        nvarchar(128) null,
    ClientProcessID   int null,
    ApplicationName   nvarchar(128) null,
    LoginName         nvarchar(128) null,
    SPID              int null,
    Duration          bigint null,
    StartTime         datetime null,
    Reads             bigint null,
    Writes            bigint null,
    CPU               int null,
    primary key clustered
    (
        RowNumber
    )
)

Note: The shape of the resulting SQL Server table determined based on the columns used in the trace definition. This is different then ::fn_trace_getsql() which returns a fixed table shape.


Installation:

Simply copy "Trc2Table.exe" onto your machine; preferred location is the "C:\Program Files\Microsoft SQL Server\80\Tools\Binn" directory, but it can be installed in any directory, as long as the "C:\Program Files\Microsoft SQL Server\80\Tools\Binn" direct is on the PATH.

Download: Trc2Table.zip


Requirements:

  1. The SQL Server 2000 client tools need to be installed.

  2. The "C:\Program Files\Microsoft SQL Server\80\Tools\Binn" needs to be on the PATH (default when SQL Server 2000 Client Tools are installed)


Planned functionality enhancements:

  • None
     

  • Other suggestions, ideas, please send email to ideas

Questions or problems regarding this web site should be directed to Web Master.
Copyright © 1991-2005 SQLDev.Net. All rights reserved.
Last modified: 04/06/05.