{"id":43,"date":"2008-03-18T23:17:11","date_gmt":"2008-03-19T04:17:11","guid":{"rendered":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/43_ssas-2008-ctp6-new-dmv-systemdiscover_object_activity"},"modified":"2008-04-07T18:11:52","modified_gmt":"2008-04-07T23:11:52","slug":"ssas-2008-ctp6-new-dmv-systemdiscover_object_activity","status":"publish","type":"post","link":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/43_ssas-2008-ctp6-new-dmv-systemdiscover_object_activity","title":{"rendered":"SSAS 2008 CTP6 &#8211; new DMV $SYSTEM. DISCOVER_ OBJECT_ ACTIVITY"},"content":{"rendered":"<p>Today I was reading Chris Webb post\u00a0&#8220;<a target=\"_blank\" href=\"http:\/\/cwebbbi.spaces.live.com\/Blog\/cns!7B84B0F2C239489A!1660.entry\">Visualising Analysis Services Trace Information in Reporting Services<\/a>&#8221; where at the end he talks about tools to monitor SSAS, that made me thinking about SSAS 2008 DMVs again.\u00a0So I went back to my SSAS 2008 installation to see what do we have new in CTP6. Just after release Darren Gosbell\u00a0already blogged about new DMVs in his post &#8220;<a target=\"_blank\" href=\"http:\/\/geekswithblogs.net\/darrengosbell\/archive\/2008\/02\/21\/ssas-2008-whats-new-in-the-schema-rowsets.aspx\" id=\"viewpost_ascx_TitleUrl\">SSAS 2008: What&#8217;s new in the Schema Rowsets?<\/a>&#8220;. But just\u00a0after I started to run queries I realized how cool these new DMVs are. After quick test on them, I decided to blog today about my favorite DMV so far: $SYSTEM.DISCOVER_OBJECT_ACTIVITY.<\/p>\n<p><!--more-->The best thing about this new $SYSTEM.DISCOVER_OBJECT_ACTIVITY DMV is the fact that it provides resource usage per object since the start of the service. When querying $SYSTEM.DISCOVER_SESSIONS DMV, as soon as user disconnects, all information is lost. But this new DMV has aggregated statistic for all users since Analysis services start. So now quick queries can give you idea where Analysis Services works hardest.<\/p>\n<p>First, BOL provides this information about fields in this DMV:<\/p>\n<table>\n<tr>\n<td>Field<\/td>\n<td>Description<\/td>\n<\/tr>\n<tr>\n<td>OBJECT_PARENT_PATH<\/td>\n<td>The path to the parent of current object.<\/td>\n<\/tr>\n<tr>\n<td>OBJECT_ID<\/td>\n<td>The ID of the object as defined at creation time<\/td>\n<\/tr>\n<tr>\n<td>OBJECT_AGGREGATION_HIT<\/td>\n<td>The number of times an aggregation of the object has been hit since the start of the service.<\/td>\n<\/tr>\n<tr>\n<td>OBJECT_AGGREGATION_MISS<\/td>\n<td>The number of times an existing aggregation, of the object, has not been missed (that is, has not been used) since the start of the service.<\/td>\n<\/tr>\n<tr>\n<td>OBJECT_CPU_TIME_MS<\/td>\n<td>The CPU time, in milliseconds, consumed by the object since the beginning of the service.<\/td>\n<\/tr>\n<tr>\n<td>OBJECT_DATA_VERSION<\/td>\n<td>The lineage number of the data in the object; this number increments each time the object is processed.<\/td>\n<\/tr>\n<tr>\n<td>OBJECT_HIT<\/td>\n<td>The number of times the object has been hit in the cache since the start of the service.<\/td>\n<\/tr>\n<tr>\n<td>OBJECT_MISS<\/td>\n<td>The number of times the object has been missed in the cache since the start of the service.<\/td>\n<\/tr>\n<tr>\n<td>OBJECT_READ_KB<\/td>\n<td>The accumulated value of data read by the object since the start of the service, in kilobytes.<\/td>\n<\/tr>\n<tr>\n<td>OBJECT_READS<\/td>\n<td>The accumulated number of read operations by the object since the start of the service.<\/td>\n<\/tr>\n<tr>\n<td>OBJECT_ROWS_RETURNED<\/td>\n<td>The number of rows returned by the object to the caller since the start of the service.<\/td>\n<\/tr>\n<tr>\n<td>OBJECT_ROWS_SCANNED<\/td>\n<td>The number of rows scanned by the object since the start of the service.<\/td>\n<\/tr>\n<tr>\n<td>OBJECT_VERSION<\/td>\n<td>The metadata version number of the object; this number changes every time the object is altered.<\/td>\n<\/tr>\n<tr>\n<td>OBJECT_WRITE_KB<\/td>\n<td>The accumulated value of data written by the object since the start of the service, in kilobytes.<\/td>\n<\/tr>\n<tr>\n<td>OBJECT_WRITES<\/td>\n<td>The accumulated number of write operations by the object since the start of the service.<\/td>\n<\/tr>\n<\/table>\n<p>So now lets run some queries:<\/p>\n<p>1. Question: Where SSAS spends most of CPU time?<\/p>\n<p>Query:<\/p>\n<blockquote><p>\u00a0SELECT TOP 20 OBJECT_PARENT_PATH, OBJECT_ID, OBJECT_CPU_TIME_MS AS CPU, OBJECT_READS AS Reads, OBJECT_ROWS_SCANNED AS [Rows]<br \/>\n\u00a0\u00a0 FROM $SYSTEM.DISCOVER_OBJECT_ACTIVITY<br \/>\n\u00a0 ORDER BY OBJECT_CPU_TIME_MS DESC;\u00a0<\/p><\/blockquote>\n<p>Result:<\/p>\n<p><img border=\"0\" src=\"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/BlogFiles\/Post43\/result1.jpg\" \/><\/p>\n<p>2. What measure group\/partition needs more aggregations?<\/p>\n<p>Query:<\/p>\n<blockquote><p>SELECT\u00a0 TOP 20 OBJECT_PARENT_PATH, OBJECT_ID, OBJECT_CPU_TIME_MS AS CPU, OBJECT_AGGREGATION_MISS AS MISS<br \/>\n\u00a0\u00a0 FROM $SYSTEM.DISCOVER_OBJECT_ACTIVITY<br \/>\n\u00a0 ORDER BY OBJECT_AGGREGATION_MISS DESC;<\/p><\/blockquote>\n<p>Results:<\/p>\n<p><img loading=\"lazy\" border=\"0\" width=\"629\" src=\"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/BlogFiles\/Post43\/result2.jpg\" height=\"409\" \/><\/p>\n<p>Similar query ordered by OBJECT_MISS column will show objects that are have most cache misses.<\/p>\n<p>And object information is very detail &#8211; you can see info on dimension, MDX script, cube, partitions and even each aggregation. So there is a lot of information to analyze.<\/p>\n<p>I got an error when I was trying to\u00a0run query to return information about all aggregations:<\/p>\n<blockquote><p>SELECT *<br \/>\n\u00a0 FROM $SYSTEM.DISCOVER_OBJECT_ACTIVITY<br \/>\n\u00a0WHERE LEFT(OBJECT_ID,11) = &#8216;Aggregation&#8217;<\/p><\/blockquote>\n<p>Error was:<\/p>\n<blockquote><p>Executing the query &#8230;<br \/>\nInternal error: An unexpected exception occurred.<br \/>\nExecution complete\u00a0<\/p><\/blockquote>\n<p>Not a big deal, I am sure this will be fixed in the next CTP.<\/p>\n<p>Conclusion: Very very useful DMV, and it can be used to build quite a few nice reports.<\/p>\n<p>Question I have right now &#8211; can I actually query these DMVs as a SSAS cube from Excel or other front end? Can I somehow specify cube name as $System and slice and dice info in these rowsets? Anyone knows this?<\/p>\n<p>I&#8217;ll keep testing this and other new DMVs and I&#8217;ll post my findings here in my blog.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I was reading Chris Webb post\u00a0&#8220;Visualising Analysis Services Trace Information in Reporting Services&#8221; where at the end he talks about tools to monitor SSAS, that made me thinking about SSAS 2008 DMVs again.\u00a0So I went back to my SSAS 2008 installation to see what do we have new in CTP6. Just after release Darren [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/wp-json\/wp\/v2\/posts\/43"}],"collection":[{"href":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/wp-json\/wp\/v2\/comments?post=43"}],"version-history":[{"count":0,"href":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/wp-json\/wp\/v2\/posts\/43\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/wp-json\/wp\/v2\/media?parent=43"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/wp-json\/wp\/v2\/categories?post=43"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/wp-json\/wp\/v2\/tags?post=43"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}