Search code examples
sql-serversql-server-profiler

Capturing connection coming from outside in SQL server using profiler


I need to do testing on capturing connection coming from outside using Profiler. Can you please advise how I can do it. I would really appreciate your help !

Thanks


Solution

  • You can use:

    https://msdn.microsoft.com/en-us/library/ff650699.aspx

    as the basics for SQL server profiler operation. To find queries in your situation - where the queries are originating from a different server - you can:

    1. go into the profiler "Trace Properties" section
    2. "Events Selection" tab
    3. Column Filters
    4. Login Name
    5. Like [Enter the login that is being used to connect from the other server to this server] - this could be a domain account or a SQL server authentication account

    Hopefully you're using separate accounts over your "normal" traffic and "outside" traffic, otherwise it could be difficult to filter out the noise.

    I'm not sure about this one, but you might be also able to filter your profiler on "Host Name" (I haven't tried it personally however) - from the "Events Selection" tab, make sure the "Show all columns" checkbox is checked, go into the column filters and type in the machine name performing the queries under "Host Name"