0

How can I set up a server side trace that dumps to a database instead of a trace file?

I set-up and tested a trace configuration I want with Sql Server Profiler that dumps only needed info straight to a separate database (without a .trc file).
When I export this trace as sql statement however, I see it is configured to save to .trc file instead of a database.

Either my googling-fu is letting me down or nobody is interested in this.

Yasir Arsanukayev
  • 3,155
  • 3
  • 23
  • 30
Boris Callens
  • 115
  • 1
  • 8

2 Answers2

1

I highly doubt no one is interested! :-)

Here's my link collection that I used to get into the topic:

Hope those help you as well !

Update:

Ok, to clear things up:

  • in order to create a server-side trace, you need a trace definition script
  • to create that trace definition script, the easiest approach is to use SQL Server Profiler to define what you want to trace - which events, what properties
  • you then use SQL Server Profiler to create that server-side trace definition script for you (doing it manually, from scratch, is a major hassle)
  • but then, to execute - you don't use SQL Server Profiler (that's putting too much load on your server), but you just create and run the trace on the SQL Server
Martin Smith
  • 87,941
  • 15
  • 255
  • 354
marc_s
  • 9,052
  • 6
  • 46
  • 52
1

What events do you need?

Many trace events are available in event notifications and event notifications can dump the EVENDATA() as Service Broker messages into your database of choice, in real time.

Remus Rusanu
  • 52,054
  • 4
  • 96
  • 172