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 explore the 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.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
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)) ) , |