Overview
As mentioned earlier in the tutorial, you can use SSMS to import and export templates that contain the configuration for an extended events session. With this feature, it makes it easy to create sessions for things that you need to monitor frequently on the same server, or if you want to create the same session on multiple servers.
Explanation
Export an Extended Events Session
To export an extended events session, using Object Explorer, open the “Management” node, then “Extended Events,” then “Sessions,” and then right-click on the session you want to export and select “Export Session…”

After selecting that, the following dialog will open where you can give your template file a name and select the folder you want to save it to. Note that if you store it in the default location, it will appear in the list of templates available when using the “New Session” dialog and wizard.

Import an Extended Events Session
To import an extended event session, using Object Explorer, we again open the “Management” node, then “Extended Events,” and then right-click Sessions and select “New Session…”

Once selected, the “New Session” dialog will open, and you can open the Template dropdown and select “<From File…>” as shown below, to select your template file.

If you saved your template file in the default location, you can also scroll down to the bottom of this list, and your template file should be in the list of “User Templates,” as shown below.

Additional Information
- Check out these other Extended Events articles
- Steps to Recover the system_health Extended Events Session in SQL Server
Ben Snaidero has been a Database Administrator for just over 10 years. Starting out working mainly with Oracle he got into SQL Server in 2005 and has worked primarily with SQL Server for the last 3 years. His main focus with both Oracle and SQL Server is in the area of performance tuning.
- MSSQLTips Awards: Achiever (75+ tips) – 2018 | Author of the Year Contender – 2016-2017