Blog » Via Jen & Sean McCown
I’ve mentioned before that I’m something of an absentminded DBA - I know where to find information, even if I can’t keep it in my head all the time. One of the lookups I have to do most often is for server side trace / SQL Profiler event numbers and names.
See, when you create a server side trace, you start with a template generated from SQL Profiler (see my article on server side trace). But after that you may want to add or remove events without re generating the whole script; for that, you need the event number.
Also, when I take a trace (on test only!) using SQL Profiler, I save the results to a trace table so I can query through them. You know, SELECT * FROM Trace0708 WHERE TextData LIKE ‘%UPDATE%” and SPID=75, right? But of course, events in the table are displayed as numbers, and I can never remember whether it’s EventID 12 or 13 that’s SQL:BatchCompleted. (It’s 12.)
In SQL Server Books Online, the full chart of all trace events (and columns) is in the sp_trace_setevent article. Here are just a few of the most common events, for quick reference:
|18||Audit Server Starts and Stops|
|20||Audit Login Failed|