Quantcast
Viewing all articles
Browse latest Browse all 3160

Events By Feature


Image may be NSFW.
Clik here to view.
Events By Feature

Within the world of SQL Server there are a few things one can be certain of things will change. This is true of the features in SQL Server. Additionally, Extended Events is constantly evolving which underscores this constant change.

With all of this change occurring within SQL Server, sometimes it is difficult to figure out how to troubleshoot or track issues that relate to new features. Within the need to figure out how to troubleshoot the new features, there is the need to understand what tools are out there to help troubleshoot.

It is no big secret that Profiler cannot help you trace any of the new features. To help perform the task of tracing events related to new features one must take advantage of the power of Extended Events. Even knowing that you can use XEvents, there is still a need to know what is related to the feature.

In this article, I will show how you can discover the events related to specific features. In addition, I will provide enough base information to help you perform other discovery type queries on your own as you continue your exploration of XEvents. In case you are a bit behind in your exploration of XEvents, I have the perfect solution for you my series on the topic that is continually growing.You can explorethe full list of articles in the series by visiting the table of contents here .

Events and Features

More and more I am being asked how to track which events belong to which features. I have also been seeing more people ask for a way to list the new features supported by XEvents. Thankfully there is adequate information within the XEvent metadata to help retrieve this type of information. The downside is that there is a bit of homework that must be done across a few versions of SQL Server to help produce the desired information. I have done that work and pulled the information into the following query to help make it easier for anybody else wishing to dive in and compare features and events across versions of SQL Server.

DECLARE @ServerMajorVersion DECIMAL(4, 2) SELECT @ServerMajorVersion = CONVERT(DECIMAL(4, 2), PARSENAME(dt.fqn, 4) + '.' + PARSENAME(dt.fqn, 3)) FROM ( SELECT CONVERT(VARCHAR(20), SERVERPROPERTY('ProductVersion')) ) dt( fqn ); IF OBJECT_ID('tempdb.dbo.#XEVersions') IS NOT NULL BEGIN DROP TABLE #XEVersions; END CREATE TABLE #XEVersions (VersionID INT IDENTITY(1,1) , Product VARCHAR(32) , ServerMajorVersion DECIMAL(4, 2) --INDEX CI_ServerMajorVer CLUSTERED ); CREATE CLUSTERED INDEX CI_ServerMajorVer ON #XEVersions(VersionID); INSERT INTO #XEVersions ( Product , ServerMajorVersion ) VALUES ( 'SQL Server 2008', 10.00) ,( 'SQL Server 2008R2', 10.50) ,( 'SQL Server 2012', 11.00) ,( 'SQL Server 2014', 12.00) ,( 'SQL Server 2016', 13.00); IF OBJECT_ID('tempdb.dbo.#XECounts') IS NOT NULL BEGIN DROP TABLE #XECounts; END CREATE TABLE #XECounts ( [Feature] [NVARCHAR](3072) NOT NULL , [FeatureEventCount] [INT] NULL , [SQLVersion] [DECIMAL](4, 2) NULL ); INSERT INTO #XECounts ( [Feature], [FeatureEventCount], [SQLVersion] ) VALUES ( N'_UnAssigned', 27, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'access_methods', 23, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'alwayson', 100, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'broker', 42, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'cdc_logscan', 2, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'change_tracking', 2, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'checkpoint', 17, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'ckpt_trace', 37, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'ckptworker_trace', 21, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'clr', 3, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'cursor', 18, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'database', 42, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'deadlock_monitor', 7, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'deploy', 14, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'errors', 20, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'exception', 4, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'execution', 115, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'filetable', 13, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'fulltext', 8, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'garbage_collection', 1, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'gc', 4, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'hadr', 1, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'index', 9, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'init', 1, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'io', 33, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'latch', 6, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'lock', 15, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'memory', 35, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'merge_trace', 23, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'oledb', 5, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'optimization', 2, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'process', 12, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'query_store', 31, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'replication', 8, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'scheduling', 26, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'security', 3, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'server', 19, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'session', 17, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'storage_management', 13, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'synchronization', 2, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'task', 2, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'transaction', 10, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'transactions', 48, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'transmitter', 9, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'transport', 9, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'ucs', 8, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'warnings', 7, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'xtp', 15, CAST(12.00 AS DECIMAL(4, 2)) ) , ( N'_UnAssigned', 9, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'access_methods', 6, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'broker', 73, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'cdc_logscan', 2, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'change_tracking', 1, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'clr', 2, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'cursor', 11, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'database', 21, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'deadlock_monitor', 6, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'errors', 5, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'exception', 3, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'execution', 14, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'io', 20, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'latch', 5, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'lock', 6, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'memory', 12, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'process', 12, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'replication', 7, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'scheduling', 21, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'server', 21, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'synchronization', 1, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'transactions', 6, CAST(10.50 AS DECIMAL(4, 2)) ) , ( N'_UnAssigned', 83, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'access_methods', 19, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'alwayson', 117, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'appdomain', 5, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'backup_restore', 1, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'broker', 42, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'cdc_logscan', 2, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'change_tracking', 2, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'checkpoint', 19, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'ckpt_close', 1, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'ckpt_controller', 9, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'ckpt_trace', 40, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'ckptworker_trace', 21, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'clr', 3, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'columnstore', 41, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'cursor', 18, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'data_masking', 3, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'database', 48, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'dbseed', 14, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'deadlock_monitor', 7, CAST(13.00 AS DECIMAL(4, 2)) ) , ( N'deploy', 1

Viewing all articles
Browse latest Browse all 3160

Trending Articles