SQL Profiler and Trace Templates

  • I have created a trace template in SQL Profiler and saved it as viewConnect.tdf.  Now I would like to open it and run it.  But when I click on open, it takes me to the trace template properties General tab.  The only option available to me here is "save as".  None of the 4 tabs has a run option.  In fact I can't even open/run the built in trace templates.

    I know their is a simple explanation, but any help would be greatly appreciated. Thanks in advance!

  • Profiler Trace Templates contain the information you would like Profiler to trace, but they do not include login credentials or server names. That way, trace templates can be used on any SQL Server.

    In order to run a trace template you've created, you have two options:

    1- You can manually run Profiler, log into the server, and then select the template from the "Template Name" drop-down list.

    2- You can create a shortcut to Profiler that launches the trace template. Profiler supports command-line parameters similar to that found in ISQL.EXE.

    • /S<server>
    • /E trusted connection
    • /U<login id>
    • /P<password>
    • /T<template file>

    To launch the trace template, create a new shortcut to Profiler with the following Target:

    Profiler.exe /Smyserver /E /Tc:\path\tracefile.tdf

    You can launch the shortcut to immediately start the trace.
     
    Another option is to add a new "action" for the TDF file type. To do this:

    1. Open Windows Explorer
    2. Select Tools | Folder Options
    3. Click File Types tab
    4. Locate the TDF file extension
    5. Click the Advanced button
    6. Click the New button
    7. Type "Start Trace" for the Action
    8. To connect using a Trusted Connection, type: profiler.exe /t%1 /Sserver_name /E
    9. Click the "Use DDE" check box
    10. Type: "system" for the Topic
    11. Press OK

    Now when you right-click a TDF file, you'll see "Start Trace" as a new option. Select it and you're on your way.

    David Gugick

    Imceda Software

    --
    David Gugick
    Dir. Architecture & Design, Quest Software

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

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