Skip to content

SQL Trace Event Class Names

A reference table of every SQL Server trace event class id and its name.

Published Jan 15, 2007

The lookup you need when writing sp_trace_setevent calls by hand. This is the complete list of trace event class ids with their names - from RPC:Completed (10) through the audit events - so you can pick exactly which events a server-side trace should capture.

Id	Event Class
10	RPC:Completed
11	RPC:Starting
12	SQL:BatchCompleted
13	SQL:BatchStarting
14	Login
15	Logout
16	Attention
17	ExistingConnection
18	ServiceControl
19	DTCTransaction
20	Login Failed
21	EventLog
22	ErrorLog
23	Lock:Released
24	Lock:Acquired
25	Lockeadlock
26	Lock:Cancel
27	Lock:Timeout
28	DOP Event
33	Exception
34	SP:CacheMiss
35	SP:CacheInsert
36	SP:CacheRemove
37	SP:Recompile
38	SP:CacheHit
39	SP:ExecContextHit
40	SQL:StmtStarting
41	SQL:StmtCompleted
42	SP:Starting
43	SP:Completed
44	SP:StmtStarting
45	SP:StmtCompleted
46	Object:Created
47	Object:Deleted
50	SQL Transaction
51	Scan:Started
52	Scan:Stopped
53	CursorOpen
54	Transaction Log
55	Hash Warning
58	Auto Update Stats
59	Lock:Deadlock Chain
60	Lock:Escalation
61	OLE DB Errors
67	Execution Warnings
68	Execution Plan
69	Sort Warnings
70	CursorPrepare
71	Prepare SQL
72	Exec Prepared SQL
73	Unprepare SQL
74	CursorExecute
75	CursorRecompile
76	CursorImplicitConversion
77	CursorUnprepare
78	CursorClose
79	Missing Column Statistics
80	Missing Join Predicate
81	Server Memory Change
92	Data File Auto Grow
93	Log File Auto Grow
94	Data File Auto Shrink
95	Log File Auto Shrink
96	Show Plan Text
97	Show Plan ALL
98	Show Plan Statistics
100	RPC Output Parameter
102	Audit Statement GDR
103	Audit Object GDR
104	Audit Add/Drop Login
105	Audit Login GDR
106	Audit Login Change Property
107	Audit Login Change Password
108	Audit Add Login to Server Role
109	Audit Add DB User
110	Audit Add Member to DB Role
111	Audit Add/Drop Role
112	App Role Pass Change
113	Audit Statement Permission
114	Audit Object Permission
115	Audit Backup/Restore
116	Audit DBCC
117	Audit Change Audit
118	Audit Object Derived Permission
An unhandled error has occurred. Reload 🗙