Search code examples
sql-serversql-server-2008sql-server-2008-r2extended-events

Where are the session definitions of extended events stored?


Is it msdb, resource, master or local? If I back up my local database against which I run the XEs, would I have backed up my sessions as well? Are there any metadata stored in the system tables too? Thank you all.


Solution

  • After doing a bit of digging I have found that the definitions for the sessions are stored in the master database (makes sense when you think about it as the sessions are defined at the server level).

    Backing this database up will back up your sessions that you have created, but it isn't the easiest way to restore them. You're probably best either exporting your sessions and saving them as templates, or scripting them out and saving them somewhere safe.