| title | DROP EVENT SESSION (Transact-SQL) | ||
|---|---|---|---|
| description | DROP EVENT SESSION drops an Extended Event session. | ||
| author | markingmyname | ||
| ms.author | maghan | ||
| ms.reviewer | dfurman, randolphwest | ||
| ms.date | 09/02/2025 | ||
| ms.service | sql | ||
| ms.subservice | t-sql | ||
| ms.topic | reference | ||
| f1_keywords |
|
||
| helpviewer_keywords |
|
||
| dev_langs |
|
[!INCLUDE SQL Server]
Drops an event session.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
DROP EVENT SESSION event_session_name
ON { SERVER | DATABASE }
The name of an existing event session.
When you drop an event session, all configuration information, such as targets and session parameters, is completely removed.
SQL Server and Azure SQL Managed Instance require the DROP ANY EVENT SESSION (introduced in SQL Server 2022), or ALTER ANY EVENT SESSION permission.
Azure SQL Database requires the DROP ANY DATABASE EVENT SESSION permission in the database.
Tip
SQL Server 2022 introduced more granular permissions for Extended Events. For more information, see Blog: New granular permissions for SQL Server 2022 and Azure SQL to improve adherence with PoLP.
The following example shows how to drop an event session. To use this example with database event sessions, replace ON SERVER with ON DATABASE.
DROP EVENT SESSION test_session ON SERVER;