Kevin Hill shows how to set up a server-side trace which runs periodically:
How to set up a recurring Server-side SQL trace that runs every hour for 10 minutes.
Issues:
-
6 people in the room are staring at me waiting for the last second request to be done at the end of an 11 hour day (3 of them from the VBV – Very Big Vendor)
-
Trace file names must be different, or you get errors
-
Trace files cannot end with a number
-
I can’t tell time when I am hungry and tired
Extended Events are still the preferred method over server-side traces for getting information, but when a vendor demands traces, the scope for saying “There’s a better way” diminishes quickly, and it’s good to know how to create a server-side trace so you aren’t opening Profiler regularly.