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.

LearnByReading
  • 711
  • 10
  • 26

2 Answers2

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.

Kin Shah
  • 62,545
  • 6
  • 124
  • 245
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

András Váczi
  • 31,778
  • 13
  • 102
  • 151