dbcc dumptrigger: Capture a dump for specific error and state


I had an inquiry about dbcc dumptrigger today and realized that state filtering was added to dbcc dumptrigger but not well known.

 

You can collect a process dump (SQL Dumper) when a specific error occurs using XEvent (error_reported/ex_raise2 events with dump capture action) or dbcc dumptrigger.

 

The common use of dbcc dumptrigger is: dbcc dumptrigger(‘set’, 208) to produce a dump when error 208 is encountered.

 

Syntax: dbcc tumptrigger(action, [opt] error number, [opt] state)

 

Actions

display: Output dumptrigger settings.  (Note: Some errors are automatically enabled to capture dumps such as a 605 page corruption.)