Databases Reference
In-Depth Information
2012-05-04 09:55:06.7100000 Gavin-VAIO\Gavin GAVIN-VAIO Microsoft SQL
Server Management
Studio
2012-05-04 09:55:06.7690000 Gavin-VAIO\Gavin GAVIN-VAIO Microsoft SQL
Server Management
Studio
The timestamp used by Extended Events is always stored in a UTC format; you may want to use
the dateadd or similar functions to format the timestamp for your time zone. Whether or not you
choose to do that depends on why you're collecting the data and whether local time information is
important.
Viewing In-Memory Targets
Some of the targets are the result of calculations being performed on captured data, rather than
a dump of the raw data itself — for example, the event counter. The results of these targets are
still available for viewing in SQL Server Management Studio, but whereas the event i le target was
updated in almost real time, the in-memory targets have to be manually refreshed or scheduled to be
refreshed. This is not as big a problem as it sounds, as they can still be refreshed every few seconds;
you just have to coni gure it i rst.
For this example, the login session from the previous section has
been reconi gured and an event counter target added. You can see
this in the list of targets in SQL Server Management Studio, as
shown in Figure 13-25.
Once the session is running, you can right-click on the event counter
target and select View Target Data. As shown in Figure 13-26, this
will display the event counter's data as well as a message saying “The
target data will not be refreshed. Right click the table to manually
refresh or set the automatic refresh interval.” Right-clicking will show that you can have it auto-
refresh anywhere between every i ve seconds and every hour.
FIGURE 13-25
You can view the results from the histogram
target in the same way that you viewed the
event counter just shown; however, because
these are in-memory data structures, their
results aren't written to the event i le or in
fact kept anywhere once the session is stopped. This is perhaps where analysis of an event i le using
T-SQL after testing may be more appropriate.
FIGURE 13-26
Querying a Ring Buf er Using T-SQL
Finally, this section consolidates what you've just seen in the previous two sections to query an in-
memory target — in this case, a ring buffer — using T-SQL. The most likely reason you'd want to
do this is because the ring buffer stores its results only in an XML format, so they have to be turned
into relational data before you can analyze them further.
Search WWH ::




Custom Search