2

I'm running SQL Server Profiler on SQL Server 2008R2. I opened Profiler, gave it the required settings (including a stop time 24 hours from now), and then left. Profiler was running from my desktop and the database it's monitoring is located on some server. I was connected using VPN. My VPN lost connection at some point and I came back and saw that Profiler has stopped working completely - and that the table is a few hours behind. Is it not that the Profiler runs on server?? Is Profiler a desktop app?

On that note, do I need to keep it open? I thought that Profiler creates a job and it'll run until the stop time mentioned in the settings.

2 Answers 2

3

Do not use profiler. You can use XEvents or Server Side trace and let it run for certain duration only.

I have written a process to run server side trace and import the results into database.

1
  • Wow, thank you so much. You saved me here. Commented Jul 25, 2018 at 13:51
0

Profiler is just another app that captures the requested data from SQL Server. You can run it on your desktop, or on the same server as the SQL Server instance you trace or on another server. This causes performance overhead if the traced data is to be transmitted over the wire.

Based on profiler settings you may create a trace and run it on SQL Server. Here is a doc on how to do it:

https://learn.microsoft.com/en-us/sql/relational-databases/data-collection/use-sql-server-profiler-to-create-a-sql-trace-collection-set?view=sql-server-2017

This trace will save the data to a file and you may read it later using sys.fn_trace_gettable

2
  • 1
    >>>This causes performance overhead if<<< This causes performance overhead WITHOUT if. It can just kill your production server
    – sepupic
    Commented Jul 25, 2018 at 13:47
  • @sepupic is right using Profiler can kill your SQL Server instance. Don't burn your fingers! Commented Jul 25, 2018 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.