xEvent: Failed Login, Part 1

I recently entered the world of Extended Events by watching an online session by Jason Strate offered by PragmaticWorks.com. His online resources are available here.


In future posts I'll dive more heavily into the hows and whys of Extended Events, but this post consists of simple code to create a session to track failed logins. This code creates two targets: one event_file and one in the ring_buffer. My follow-up session will explain the code in greater detail and will include ways to query the event, and a stored procedure I wrote that I can execute to see events. Work smarter, not harder.