How to run Profiler Trace from another Server

  • Would someone know the approach to running a SQL profiler trace for multiple servers from a secured server. Basically, I am asking is there a way to setup profiler to run as a job or does one need to manually start a trace using a template for each target server that is to be audited.

    Thanks for the help,

    Charles L. Nichols


    Charles L. Nichols

  • There's no reason why a server/workstation can't run OSQL to run the same SQL script on multiple SQL Servers, initiating an identical Profiler session on each.

    The script will most probably need to direct output to a path that is common on each server, or should dynamically determine an appropriate output directory/file.

    Cheers,

    - Mark


    Cheers,
    - Mark

  • You can run the sp_trace* SPs within a job.

    You don't need to specify the server or any table, so you only have to specify what to trace and you can run those sp in any server.

    I would suggest to create your trace template with profiler, and then script it from profiler.

    It is faster to save the result in a file (because it saves the result in a similar way as it does in the log files), and then you can insert the trace file into a table to search for what you are looking for.

    Also be aware that if you have a very busy server with multiple connections, the trace file can grow a lot, so you better specify a max size for the file.

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

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