Introduction
With the release of SQL Server 2012, Microsoft introduces a GUI in SQL Server Management Studio to create, modify, display, and analyze your session data. Extended Events has a highly scalable and highly configurable architecture that allows users to collect as much or as little information as is necessary to troubleshoot or identify a performance problem.
You can manage extended events in SQL Server 2012 using the Extended Events node specified under Management Folder in Object Explorer Window. If you happen to be connecting to a SQL Server 2008 server using SSMS from SQL Server 2012, this node will not exist. In this article I demonstrate how to create a simple Extended Event using the new GUI in SQL Server 2012.
Now you will see some important tasks to be done when creating a simple Extended Event in SQL Server 2012.
Step 1
Open SQL Server Management Studio and drill down to "Management" -> "Extended Events" -> "Sessions". There are two ways to create a session, you can either choose a New Session or the New Session Wizard. Right-click on the session and select "New Session Wizard" as shown in the image below.

Step 2
By opening the New Session Wizard, an "Introduction" window will appear. Click "Next" to continue. In the next window, "Set Session Properties" is opened where you can enter a Session Name and click the "Next" button to continue.

Step 3
The next screen will allow you to create the new event session based on a previously created template, or one of the templates provided by default with SQL Server 2012. Choose the "Do not use a template" option and click the "Next" button to continue.

Step 4
The "Select Events To Capture" window is opened. Select the events we want to capture. Suppose I choose database_attached, database_created, database_detached, database_started, and database_stopped. Click "Next" button to continue.

Step 5
The next window that appears is the "Capture Global Fields" window. This window allows you to specify the actions that you want added to each of the events in the session. For example, if a database was created then you would want to know which database it was so the database_id action would be the correct option. Suppose I select database_id, database_name, nt_username, server_instance_name and SQL_text. See that in the following image.







Comments
Join the conversation! Your thoughts help the community grow.