Export and Import SQL Server Extended Events Templates



By:
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.

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..."

Export an Extended Events 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.

Export an Extended Events Session

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...". 

Import an Extended Events 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.

Import an Extended Events Session

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.

Import an Extended Events Session
Additional Information

Last Update: 6/14/2019






Comments For This Article





download








get free sql tips
agree to terms


Learn more about SQL Server tools