One of the biggest problems that I had with getting into Extended Events was mapping the Events available in Extended Events to the Events that I knew from SQL Trace. With so many Events to choose from in Extended Events, and a different organization of the Events, it is really easy to get lost when trying to find things. Add to this the fact that Event names don’t match up to Trace Event names in SQL Server 2008 and 2008 R2, and not all of the Events from Trace are implemented in SQL Server 2008 and 2008 R2, and it gets really confusing really fast. For my presentation this year at SQLBits 7, I sat down with Excel and mapped out the Events that exist in Extended Events to their corresponding SQL Trace Event, and two of the slides in my deck were tables of these mappings.
|Deprecation||Deprecation Final Support||sqlserver||deprecation_final_support|
|Errors and Warnings||ErrorLog||sqlserver||errorlog_written|
|Errors and Warnings||EventLog||sqlserver||error_reported|
|Errors and Warnings||Exception||sqlos||exception_ring_buffer_recorded|
|Errors and Warnings||User Error Message||sqlserver||error_reported|
|Full text||FT:Crawl Aborted||sqlserver||error_reported|
|Locks||Lock:Timeout (timeout > 0)||sqlserver||locks_lock_timeout_greater_than_0|
|Stored Procedures||RPC Output Parameter||sqlserver||rpc_completed|
I have a script that creates a view for these in my administrative database, that is a part of my SQL Server 2008 configuration script for my environment. That script is attached to this blog post for use in your own environment.
In SQL Server Denali CTP1, a table has been added to the master database named dbo.trace_xe_event_map that provides a static mapping of each Trace Event to its corresponding Extended Events Event (This table should be in the sys schema to maintain uniformity in the product and I filed a Connect Feedback to move this that needs votes to have this changed). Mike Wachal blogged about this table and how it and its partner table dbo.trace_xe_action_map can be used to migrate from SQL Trace to Extended Events in his blog post Migrating from SQL Trace to Extended Events. He also includes a really cool SQLCLR Stored Procedure that will perform the conversion for you automagically.