You have a database named database1. Database developers report that there are many deadlocks. You need to implement a solution to monitor the deadlocks.
The solution must meet the following requirements:
• Support real-time monitoring.
• Be enabled and disabled easily.
• Support querying of the monitored data.
What should you implement? More than one answer choice may achieve the goal. Select the BEST answer.
A. a SQL Server Profiler template
B. an Extended Events session
C. log errors by using trace flag 1204
D. log errors by using trace flag 1222