Export and Import SQL Server Extended Events Templates
By: Ben Snaidero
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.
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 then 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.
- Check out these other Extended Events articles
- Steps to Recover the system_health Extended Events Session in SQL Server