Search code examples
sql-serverprofiler

Find Which applications access my server using Profiler Trace with Application Name column


I Need to find out what are all the applications that use my sql server.

I'm using Profiler trace to do this (if there's another way to do this I would appreciate it)

On Profiler I'm using a Replay template, and after looking at the trace result I see that there's a column called Application Name, I'm wondering if there's a way to get the distinct ones (the trace is on a .trc file).

(By the way is this supposed to be posted on stackoverflow or serverfault?)

Thanks, Gabriel


Solution

  • Try this:

    SELECT DISTINCT ApplicationName
    FROM ::fn_trace_gettable('C:\YourFolder\YourTraceFile.trc', DEFAULT) t