<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Analysis Services</title>
        <link>http://geekswithblogs.net/ManicArchitect/category/10869.aspx</link>
        <description>Analysis Services</description>
        <language>en-US</language>
        <copyright>James Rogers</copyright>
        <managingEditor>rogers.james@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>SSAS, MPP and PDW</title>
            <link>http://geekswithblogs.net/ManicArchitect/archive/2011/10/13/147299.aspx</link>
            <description>&lt;p&gt; &lt;/p&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;I cut my DBA teeth on IBM's DB2 UDB EEE (enough acronyms) back in the 90's. I have always appreciated the scalability that is available with a MPP architecture. So a couple of years ago I was excited to hear that SQL Server was going to have a MPP architecture available. Now I am at SQLPass Summit 2011 and seeing the PDW (Parallel Data Warehouse) and the hardware offerings by Dell and HP to scale that up and out. However, I was disappointed to learn that this technology does not extend to Analysis Services.&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;     I spend a great deal of my time tuning SSAS and can say that it scales very well as is and there is a plethora of information out there to facilitate those efforts. However, let's dream a little here. Imagine a multi-node/single-instance/shared-nothing installation of SSAS. You can distribute/partition the cubes across the nodes and then within the nodes in a manner that allows you to isolate hot-spots of data on their own hardware so that data can stay cached. Meanwhile, other queries on data that is less-often accessed or more ad-hoc in nature can process with resources allocated on separate nodes for that and the majority of queries do not suffer as much from cache turnover and the overall system load. Ahhh, it is good to dream. We could take that a step further and wish that would could mix Vertipaq storage for that more frequently used/"hot" data node and traditional Analysis Services storage for the other data where aggregations may have more value in helping the queries. Additionally, processing of mining models could be further isolated from ongoing activities and processing activities could take advantage of the MPP architecture and resulting parallelism to allow for more processing in shorter time than on a similar, single box solution. Could even go further and dedicate a node to ROLAP partitions for more real-time requirements while limiting the burden of such queries on the overall system performance.&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;     I realize that MS probably doesn't have much of a target market for such dreams but it would be cool nonetheless and provide some real scalability options for big data analytics implementations. Like always, the devil is in the details. OK - back to reality.&lt;/div&gt; &lt;img src="http://geekswithblogs.net/ManicArchitect/aggbug/147299.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>James Rogers</dc:creator>
            <guid>http://geekswithblogs.net/ManicArchitect/archive/2011/10/13/147299.aspx</guid>
            <pubDate>Fri, 14 Oct 2011 00:01:32 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ManicArchitect/comments/147299.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ManicArchitect/archive/2011/10/13/147299.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/ManicArchitect/comments/commentRss/147299.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ManicArchitect/services/trackbacks/147299.aspx</trackback:ping>
        </item>
        <item>
            <title>Analysis Services (SSAS) - Unexpected Internal Error when processing (ProcessUpdate).  Workaround/Resolution</title>
            <link>http://geekswithblogs.net/ManicArchitect/archive/2010/12/20/143184.aspx</link>
            <description>&lt;p&gt; /* EDIT - This problem has been fixed in the latest SQL Server 2008 R2 Cumulative Update package. It was identified that changing the aggregation design without reprocessing the aggregations prior to a ProcessUpdate on the dimensions causes this problem and it is a bug */&lt;/p&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;Many implementations require the use of ProcessUpdate to support Type 1 slowly changing dimensions. ProcessUpdate drops all of the affected indexes and aggregations in partitions affected by data that changes in the Dimension on which the ProcessUpdate is being performed. Twice now I have had situations where the processing fails with "Internal error: An unexpected exception occurred." Any subsequent ProcessUpdate processing will also fail with the same error. In talking with Microsoft the issue is corrupt indexes for the Dimension(s) being processed in the partitions of the affected measure group. I cannot guarantee that the following will correct your problem but it did in my case and saved us quite a bit of down time.&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;Workaround: ProcessIndexes on the entire cube that is being processed and throwing the error. This corrected the problem on both 2008 and 2008 R2.&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;Pros: &lt;/div&gt;
&lt;ol type="1" style="font-style: normal; margin-top: 0in; unicode-bidi: embed; direction: ltr; margin-bottom: 0in; margin-left: 0.375in; font-size: 11pt; font-weight: normal"&gt;
    &lt;li value="1" style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-style: normal; font-size: 11pt; font-weight: normal"&gt;Does not require a complete rebuild of the data (ProcessFull) for either the Dimension or Cube.&lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-size: 11pt"&gt;User access can continue while this ProcessIndexes in underway.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;Cons:&lt;/div&gt;
&lt;ol type="1" style="font-style: normal; margin-top: 0in; unicode-bidi: embed; direction: ltr; margin-bottom: 0in; margin-left: 0.375in; font-size: 11pt; font-weight: normal"&gt;
    &lt;li value="1" style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-style: normal; font-size: 11pt; font-weight: normal"&gt;Can take a long time, especially on large cubes with many partitions, dimensions and/or aggregations.&lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-size: 11pt"&gt;Query Performance is usually severely impacted due to the memory and CPU requirements for Aggregation and Index building&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 8pt"&gt;&amp;lt;Batch xmlns="&lt;a href="http://schemas.microsoft.com/analysisservices/2003/engine"&gt;http://schemas.microsoft.com/analysisservices/2003/engine&lt;/a&gt;"&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 8pt"&gt; &amp;lt;Parallel&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 8pt"&gt;    &amp;lt;Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200"&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 8pt"&gt;      &amp;lt;Object&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 8pt"&gt;        &amp;lt;DatabaseID&amp;gt;MyDatabase&amp;lt;/DatabaseID&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 8pt"&gt;        &amp;lt;CubeID&amp;gt;MyCube&amp;lt;/CubeID&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 8pt"&gt;      &amp;lt;/Object&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 8pt"&gt;      &amp;lt;Type&amp;gt;ProcessIndexes&amp;lt;/Type&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 8pt"&gt;      &amp;lt;WriteBackTableCreation&amp;gt;UseExisting&amp;lt;/WriteBackTableCreation&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 8pt"&gt;    &amp;lt;/Process&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 8pt"&gt; &amp;lt;/Parallel&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 8pt"&gt;&amp;lt;/Batch&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;The cube where the corruption exists can be found by having Profiler running while the ProcessUpdate is executing. The first partition that displays the "The Job has ended in failure." message in the TextData column will be part of the cube/measuregroup that has the corruption. You can try to run ProcessIndexes on just that measure group. This may correct the problem and save additional time if you have other large measure groups in the cube that are not affected by the corruption.&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;Remember to execute your normal ProcessUpdate batch after the successful completion of the ProcessIndexes. The ProcessIndexes does not pick up data changes.&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;Things that did not work:&lt;/div&gt;
&lt;ol type="1" style="font-style: normal; margin-top: 0in; unicode-bidi: embed; direction: ltr; margin-bottom: 0in; margin-left: 0.375in; font-size: 11pt; font-weight: normal"&gt;
    &lt;li value="1" style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-style: normal; font-size: 11pt; font-weight: normal"&gt;ProcessClearIndexes - why this doesn't work and ProcessIndexes does is unclear at this point.&lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-size: 11pt"&gt;ProcessFull on the partition in question. In my latest case, this would clear up the problem for that partition. However, the next partition the ProcessUpdate touched that had data in it would generate and error. This leads me to believe the corruption problem will exist in all partitions in the affected measure group that have data in them.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;NOTE: I experience this problem in both a SQL 2008 and SQL 2008 R2 Analysis Services environment, on separate built from the same relational database. This leads me to believe that some data condition in the tables used for the Dimension processing caused the corruption since the two environments were on physically separate hardware. I am waiting on Microsoft to analyze the dumps to give us more insight into what actually caused the corruption and will update this post accordingly.&lt;/div&gt; &lt;img src="http://geekswithblogs.net/ManicArchitect/aggbug/143184.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>James Rogers</dc:creator>
            <guid>http://geekswithblogs.net/ManicArchitect/archive/2010/12/20/143184.aspx</guid>
            <pubDate>Mon, 20 Dec 2010 17:51:05 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ManicArchitect/comments/143184.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ManicArchitect/archive/2010/12/20/143184.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/ManicArchitect/comments/commentRss/143184.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ManicArchitect/services/trackbacks/143184.aspx</trackback:ping>
        </item>
        <item>
            <title>SSAS Usage-Based Optimization, OlapQueryLog (Enabling and Disabling), Aggregations and Structure Changes.</title>
            <link>http://geekswithblogs.net/ManicArchitect/archive/2010/11/02/142563.aspx</link>
            <description>&lt;div style="line-height: normal"&gt;&lt;font face="Calibri"&gt;Analysis Services has a useful feature called Usage-Based Optimization. This feature is used to design aggregations based on actual user queries using Business Intelligence Development Studio (BIDS). Information on how to configure (or disable) the query logging required for this is fairly hard to find. &lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;font face="Calibri"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;font face="Calibri"&gt;The Analysis Services Properties identified by "Log \ QueryLog" in the Analysis Services Properties window are used to configure the query logging used by Usage-Based Optimization:&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;font face="Calibri"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;font face="Calibri"&gt; &lt;img alt="" src="http://i184.photobucket.com/albums/x66/htdbajr/BlogPics/SSAS_Properties_OlapQueryLog.jpg" /&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;font face="Calibri"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;font face="Calibri"&gt;The definition of these properties can be found in Books On Line (BOL) and on MSDN.&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;font face="Calibri"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;font face="Calibri"&gt;&lt;b&gt;Enabling Usage-Based Optimization:&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;font face="Calibri"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal; text-indent: -0.25in; margin: 0in 0in 0pt 27pt; vertical-align: middle"&gt;&lt;span&gt;&lt;font face="Calibri"&gt;1.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;Set CreateQueryLogTable to true&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal; text-indent: -0.25in; margin: 0in 0in 0pt 27pt; vertical-align: middle"&gt;&lt;span&gt;&lt;font face="Calibri"&gt;2.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;Set the value of QueryLogConnectionString appropriately (database specified in the connection string must already exist)&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal; text-indent: -0.25in; margin: 0in 0in 0pt 27pt; vertical-align: middle"&gt;&lt;span&gt;&lt;font face="Calibri"&gt;3.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;Set the value of QueryLogSampling to the appropriate value for your environment (the default value of 10 means every 10th query will be logged). The lower the value of this property, the higher the overhead of query logging will be on the system.&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal; text-indent: -0.25in; margin: 0in 0in 0pt 27pt; vertical-align: middle"&gt;&lt;span&gt;&lt;font face="Calibri"&gt;4.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;Set the value of QueryLogTableName appropriately.&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal; text-indent: -0.25in; margin: 0in 0in 0pt 27pt; vertical-align: middle"&gt;&lt;span&gt;&lt;font face="Calibri"&gt;5.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;Click "OK"&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal; margin: 0in 0in 0pt 27pt"&gt;&lt;font face="Calibri"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;font face="Calibri"&gt;&lt;b&gt;Disabling Usage-Based Optimization:&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal; margin: 0in 0in 0pt 27pt"&gt;&lt;font face="Calibri"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal; text-indent: -0.25in; margin: 0in 0in 0pt 27pt; vertical-align: middle"&gt;&lt;span&gt;&lt;font face="Calibri"&gt;1.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;Set the value of QueryLogSampling to "0". This will stop query logging.&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal; text-indent: -0.25in; margin: 0in 0in 0pt 27pt; vertical-align: middle"&gt;&lt;span&gt;&lt;font face="Calibri"&gt;2.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;Click "OK"&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal; margin: 0in 0in 0pt 27pt"&gt;&lt;font face="Calibri"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;font face="Calibri"&gt;Advantages of Usage-Based Optimization and logging:&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;font face="Calibri"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal; text-indent: -0.25in; margin: 0in 0in 0pt 27pt; vertical-align: middle"&gt;&lt;span&gt;&lt;font face="Calibri"&gt;1.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;If you have an environment where users are submitting repetitive queries with similar tuples/slicers - the usage based-optimization will probably do a good job of helping design useful aggregations.&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal; text-indent: -0.25in; margin: 0in 0in 0pt 27pt; vertical-align: middle"&gt;&lt;span&gt;&lt;font face="Calibri"&gt;2.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;Very little detailed knowledge of the cube structure and querying practices is needed to create aggregations.&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal; text-indent: -0.25in; margin: 0in 0in 0pt 27pt; vertical-align: middle"&gt;&lt;span&gt;&lt;font face="Calibri"&gt;3.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;Aggregations will be designed (using BIDS or BIDS Helper utilities) based on actual user queries and not just gather requirements.&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal; margin: 0in 0in 0pt 27pt"&gt;&lt;font face="Calibri"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;font face="Calibri"&gt;Disadvantages of Usage-Based Optimization and logging:&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal"&gt;&lt;font face="Calibri"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal; text-indent: -0.25in; margin: 0in 0in 0pt 27pt; vertical-align: middle"&gt;&lt;span&gt;&lt;font face="Calibri"&gt;1.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;Can create overhead on the system is sampling is too frequent.&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal; text-indent: -0.25in; margin: 0in 0in 0pt 27pt; vertical-align: middle"&gt;&lt;span&gt;&lt;font face="Calibri"&gt;2.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;Resulting aggregation designs may not help as much as desired or may not help the average use-case.&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal; text-indent: -0.25in; margin: 0in 0in 0pt 27pt; vertical-align: middle"&gt;&lt;span&gt;&lt;font face="Calibri"&gt;3.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;The logging table must be maintained and kept at a manageable size:&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal; text-indent: -0.25in; margin: 0in 0in 0pt 0.75in; vertical-align: middle"&gt;&lt;span&gt;&lt;font face="Calibri"&gt;a.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;Any structure changes will cause analysis services to issue a delete against the logging table for any queries containing the cube being changed/affected. This can cause cube structure changes to take a long time if the logging table is extremely large.&lt;/font&gt;&lt;/div&gt;
&lt;div style="line-height: normal; text-indent: -0.25in; margin: 0in 0in 0pt 0.75in; vertical-align: middle"&gt;&lt;span&gt;&lt;font face="Calibri"&gt;b.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;Utilities from BIDS (or BIDS Helper functionality) can be mislead by older log data that may no longer apply to the current usage patterns of the database.&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 10pt"&gt; &lt;/div&gt; &lt;img src="http://geekswithblogs.net/ManicArchitect/aggbug/142563.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>James Rogers</dc:creator>
            <guid>http://geekswithblogs.net/ManicArchitect/archive/2010/11/02/142563.aspx</guid>
            <pubDate>Tue, 02 Nov 2010 15:31:25 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ManicArchitect/comments/142563.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ManicArchitect/archive/2010/11/02/142563.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/ManicArchitect/comments/commentRss/142563.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ManicArchitect/services/trackbacks/142563.aspx</trackback:ping>
        </item>
        <item>
            <title>Tuning Analysis Services (SSAS) for better Parallel Aggregation/Index Processing</title>
            <link>http://geekswithblogs.net/ManicArchitect/archive/2010/11/02/142558.aspx</link>
            <description>&lt;div&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt"&gt;One of the key performance concepts in Analysis Services is the design and use of good Aggregations to support user queries. However, Analysis Services (Both 2005 and 2008) by default is not configured very well to take advantage of multi-processor environments for parallel processing of these indexes, particularly for large MOLAP partitions. Keep in mind, using a large portion of available processors for aggregation building is only desirable in environments where a processing window is allocated and user activity is minimized or prevented entirely for that window. If you have small datasets and processing time is not a problem then making changes to support better parallel processing may not be needed or recommended. Changing of these settings is best done under guidance of Microsoft.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;b&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt"&gt;Problem Isolation:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt"&gt; Using a combination of SQL Server Profiler and watching the Task Manager from windows allows simple detection of the key symptom of this problem: seeing only one processor (or processor core) being utilized while processing of aggregations is taking place. To test this, issue a multi-partition ProcessIndexes XMLA statement such as the one below and watch your Profiler and Task Manager (could also use Perfmon as well).&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Batch&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: red; font-size: 7pt"&gt;xmlns&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;=&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;"&lt;a href="http://schemas.microsoft.com/analysisservices/2003/engine"&gt;&lt;font color="#0000ff"&gt;http://schemas.microsoft.com/analysisservices/2003/engine&lt;/font&gt;&lt;/a&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt; &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Parallel&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Process&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: red; font-size: 7pt"&gt;xmlns:xsd&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;=&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;"&lt;span style="color: blue"&gt;http://www.w3.org/2001/XMLSchema&lt;/span&gt;"&lt;span style="color: red"&gt;xmlns:xsi&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/span&gt;"&lt;span style="color: red"&gt;xmlns:ddl2&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://schemas.microsoft.com/analysisservices/2003/engine/2&lt;/span&gt;"&lt;span style="color: red"&gt;xmlns:ddl2_2&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://schemas.microsoft.com/analysisservices/2003/engine/2/2&lt;/span&gt;"&lt;span style="color: red"&gt;xmlns:ddl100_100&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://schemas.microsoft.com/analysisservices/2008/engine/100/100&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Object&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;DatabaseID&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;Adventure Works DW 2008&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;DatabaseID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;CubeID&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;Adventure Works&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;CubeID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;MeasureGroupID&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;Fact Internet Sales 1&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;MeasureGroupID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;PartitionID&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;Internet_Sales_2001&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;PartitionID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;      &amp;lt;/&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Object&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Type&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;ProcessIndexes&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Type&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;WriteBackTableCreation&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;UseExisting&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;WriteBackTableCreation&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Process&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Process&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: red; font-size: 7pt"&gt;xmlns:xsd&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;=&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;"&lt;span style="color: blue"&gt;http://www.w3.org/2001/XMLSchema&lt;/span&gt;"&lt;span style="color: red"&gt;xmlns:xsi&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/span&gt;"&lt;span style="color: red"&gt;xmlns:ddl2&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://schemas.microsoft.com/analysisservices/2003/engine/2&lt;/span&gt;"&lt;span style="color: red"&gt;xmlns:ddl2_2&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://schemas.microsoft.com/analysisservices/2003/engine/2/2&lt;/span&gt;"&lt;span style="color: red"&gt;xmlns:ddl100_100&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://schemas.microsoft.com/analysisservices/2008/engine/100/100&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Object&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;DatabaseID&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;Adventure Works DW 2008&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;DatabaseID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;CubeID&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;Adventure Works&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;CubeID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;MeasureGroupID&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;Fact Internet Sales 1&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;MeasureGroupID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;PartitionID&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;Internet_Sales_2002&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;PartitionID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;      &amp;lt;/&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Object&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Type&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;ProcessIndexes&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Type&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;WriteBackTableCreation&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;UseExisting&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;WriteBackTableCreation&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Process&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Process&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: red; font-size: 7pt"&gt;xmlns:xsd&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;=&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;"&lt;span style="color: blue"&gt;http://www.w3.org/2001/XMLSchema&lt;/span&gt;"&lt;span style="color: red"&gt;xmlns:xsi&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/span&gt;"&lt;span style="color: red"&gt;xmlns:ddl2&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://schemas.microsoft.com/analysisservices/2003/engine/2&lt;/span&gt;"&lt;span style="color: red"&gt;xmlns:ddl2_2&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://schemas.microsoft.com/analysisservices/2003/engine/2/2&lt;/span&gt;"&lt;span style="color: red"&gt;xmlns:ddl100_100&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://schemas.microsoft.com/analysisservices/2008/engine/100/100&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Object&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;DatabaseID&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;Adventure Works DW 2008&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;DatabaseID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;CubeID&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;Adventure Works&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;CubeID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;MeasureGroupID&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;Fact Internet Sales 1&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;MeasureGroupID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;PartitionID&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;Internet_Sales_2003&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;PartitionID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;      &amp;lt;/&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Object&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Type&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;ProcessIndexes&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Type&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;WriteBackTableCreation&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;UseExisting&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;WriteBackTableCreation&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Process&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Process&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: red; font-size: 7pt"&gt;xmlns:xsd&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;=&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;"&lt;span style="color: blue"&gt;http://www.w3.org/2001/XMLSchema&lt;/span&gt;"&lt;span style="color: red"&gt;xmlns:xsi&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/span&gt;"&lt;span style="color: red"&gt;xmlns:ddl2&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://schemas.microsoft.com/analysisservices/2003/engine/2&lt;/span&gt;"&lt;span style="color: red"&gt;xmlns:ddl2_2&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://schemas.microsoft.com/analysisservices/2003/engine/2/2&lt;/span&gt;"&lt;span style="color: red"&gt;xmlns:ddl100_100&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://schemas.microsoft.com/analysisservices/2008/engine/100/100&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Object&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;DatabaseID&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;Adventure Works DW 2008&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;DatabaseID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;CubeID&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;Adventure Works&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;CubeID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;MeasureGroupID&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;Fact Internet Sales 1&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;MeasureGroupID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;PartitionID&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;Internet_Sales_2004&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;PartitionID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;     &amp;lt;/&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Object&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Type&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;ProcessIndexes&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Type&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;WriteBackTableCreation&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 7pt"&gt;UseExisting&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;WriteBackTableCreation&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Process&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt; &amp;lt;/&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Parallel&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: #a31515; font-size: 7pt"&gt;Batch&lt;/span&gt;&lt;span style="font-family: 'Courier New'; color: blue; font-size: 7pt"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt"&gt;If, during the course of processing you see only one partition processing at a time (in the Profiler window) and that also correlates to mdsmdsrv.exe only using the equivalent of one CPU (i.e. ~50% on a 2-CPU machine) then tuning the SSAS server properties to allow better parallel aggegation/index processing might be an advantage for the environment (see original statement regarding processing windows and data sets in the first paragraph).&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;b&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt"&gt;Configuration Changes: &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt"&gt;The configuration properties of AggregationMemoryLimitMax and AggregationMemoryLimitMin (these are in the OLAP \ Process section of the Analysis Services Properties Window):&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;img alt="" src="http://i184.photobucket.com/albums/x66/htdbajr/BlogPics/SSAS_Properties_Parallel_Agg_Processing.jpg" /&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt"&gt;The default value of 80 for AggregationMemoryLimitMax will prevent more than one partition from being processed, especially for large cubes/partitions with large aggregations. This is because a setting of 80 means up to 80% of the available memory can be used for building aggregations on the partition. That leaves only 20% of the available memory for other partitions, which is not enough to start another partition until the partition currently being processed is completed. I use the following formula for setting AggregationMemoryLimitMax and AggregationMemoryLimitMin (this is only used for reference, the proper settings vary from environment to environment based on hardware resources, business requirements and availability requirements):&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt"&gt;AggregationMemoryLimitMax=ceiling(100/(&amp;lt;number processing cores&amp;gt;-2))&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt"&gt;AggregationMemoryLimitMin=ceiling(100/((&amp;lt;number processing cores&amp;gt;-2)*1.5))&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt"&gt;Using (&amp;lt;number processing cores&amp;gt;+1) helps to leave enough memory for at least one processor core for non-SSAS activities (such as paging, SQL Server activities).&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt"&gt;On a 16-core machine the AggregationMemoryLimitMax would come out to 7 which means up to 14 (100/7) partitions could process aggregations in parallel.   The AggregationMemoryLimitMin would come to 5 which means no more than 20 (100/5) partitions could process in parallel.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;b&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt"&gt;Result:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt"&gt;Processing time for rebuilding aggregations and indexes is significantly reduced in multi-processor environments, provided the environment does not have other resource constraints. The degree of improvement will depend on the number of processing cores and amount of memory available to the system for the Aggregation processing. However, on large mult-core, multi-processor servers with large partitions and aggregations, this can make the difference between being able to process the aggregations frequent enough to help user queries or having the user queries suffer longer durations due to missing indexes and/or aggregations that are not processed.&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 10pt"&gt; &lt;/div&gt; &lt;img src="http://geekswithblogs.net/ManicArchitect/aggbug/142558.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>James Rogers</dc:creator>
            <guid>http://geekswithblogs.net/ManicArchitect/archive/2010/11/02/142558.aspx</guid>
            <pubDate>Tue, 02 Nov 2010 12:33:27 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ManicArchitect/comments/142558.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ManicArchitect/archive/2010/11/02/142558.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/ManicArchitect/comments/commentRss/142558.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ManicArchitect/services/trackbacks/142558.aspx</trackback:ping>
        </item>
        <item>
            <title>MDX using EXISTING, AGGREGATE, CROSSJOIN and WHERE</title>
            <link>http://geekswithblogs.net/ManicArchitect/archive/2010/06/11/140366.aspx</link>
            <description>&lt;p&gt; &lt;/p&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;It is a well-published approach to using the EXISTING function to decode AGGREGATE members and nested sub-query filters.  Mosha wrote a good blog on it &lt;a href="http://www.mosha.com/msolap/articles/mdxmultiselectcalcs.htm"&gt;here&lt;/a&gt; and a more recent one &lt;a href="http://sqlblog.com/blogs/mosha/archive/2007/01/13/multiselect-friendly-mdx-for-calculations-looking-at-current-coordinate.aspx"&gt;here&lt;/a&gt;.  The use of EXISTING in these scenarios is very useful and sometimes the only option when dealing with multi-select filters.  However, there are some limitations I have run across when using the EXISTING function against an AGGREGATE member:&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;ol type="1" style="font-style: normal; margin-top: 0in; unicode-bidi: embed; direction: ltr; margin-bottom: 0in; margin-left: 0.375in; font-size: 11pt; font-weight: normal"&gt;
    &lt;li value="1" style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-style: normal; font-size: 11pt; vertical-align: baseline; font-weight: normal; text-decoration: none"&gt;The AGGREGATE member must be assigned to the Dimension.Hierarchy being detected by the EXISTING function in the calculated measure.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol type="1" style="font-style: normal; margin-top: 0in; unicode-bidi: embed; direction: ltr; margin-bottom: 0in; margin-left: 0.375in; font-size: 11pt; font-weight: normal"&gt;
    &lt;li value="2" style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-style: normal; font-size: 11pt; vertical-align: baseline; font-weight: normal; text-decoration: none"&gt;The AGGREGATE member cannot contain a crossjoin from any other dimension or hierarchy or EXISTING will not be able to detect the members in the AGGREGATE member.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;Take the following query (from Adventure Works DW 2008):&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;&lt;span style="color: blue"&gt;With&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  &lt;span style="color: blue"&gt;member&lt;/span&gt; [Week Count] &lt;span style="color: blue"&gt;as&lt;/span&gt; 'count(existing([Date].[Fiscal Weeks].[Fiscal Week].members))'&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;   &lt;span style="color: blue"&gt;member&lt;/span&gt; [Date].[Fiscal Weeks].[CM] &lt;span style="color: blue"&gt;as&lt;/span&gt; 'AGGREGATE({[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[47]&amp;amp;[2004],[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[48]&amp;amp;[2004],[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[49]&amp;amp;[2004],[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[50]&amp;amp;[2004]})'  &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;&lt;span style="color: blue"&gt;select&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  {[Week Count]} &lt;span style="color: blue"&gt;on&lt;/span&gt; &lt;span style="color: blue"&gt;columns&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;&lt;span style="color: blue"&gt;from&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  [Adventure Works]&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  &lt;span style="color: blue"&gt;where&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  [Date].[Fiscal Weeks].[CM]&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;Here we are attempting to count the existing fiscal weeks in slicer.  This is useful to get a per-week average for another member. Many applications generate queries in this manner (such as Oracle OBIEE).  This query returns the correct result of (4) weeks.&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;Now let's put a twist in it.  What if the querying application submits the query in the following manner:&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;&lt;span style="color: blue"&gt;With&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  &lt;span style="color: blue"&gt;member&lt;/span&gt; [Week Count] &lt;span style="color: blue"&gt;as&lt;/span&gt; 'count(existing([Date].[Fiscal Weeks].[Fiscal Week].members))'&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;   &lt;span style="color: blue"&gt;member&lt;/span&gt; [Customer].[Customer Geography].[CM] &lt;span style="color: blue"&gt;as&lt;/span&gt; 'AGGREGATE({[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[47]&amp;amp;[2004],[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[48]&amp;amp;[2004],[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[49]&amp;amp;[2004],[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[50]&amp;amp;[2004]})'  &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;&lt;span style="color: blue"&gt;select&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  {[Week Count]} &lt;span style="color: blue"&gt;on&lt;/span&gt; &lt;span style="color: blue"&gt;columns&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;&lt;span style="color: blue"&gt;from&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  [Adventure Works]&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  &lt;span style="color: blue"&gt;where&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  [Customer].[Customer Geography].[CM]&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;Here we are attempting to count the existing fiscal weeks in slicer.  However, the AGGREGATE member is built on a different dimension (in name) than the one EXISTING is trying to detect.  In this case the query returns (174) which is the total number of [Date].[Fiscal Weeks].[Fiscal Week].members defined in the dimension.&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;Now another twist, the AGGREGATE member will be named appropriately and contain the hierarchy we are trying to detect with EXISTING but it will be cross-joined with another hierarchy:&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;&lt;span style="color: blue"&gt;With&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  &lt;span style="color: blue"&gt;member&lt;/span&gt; [Week Count] &lt;span style="color: blue"&gt;as&lt;/span&gt; 'count(existing([Date].[Fiscal Weeks].[Fiscal Week].members))'&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;   &lt;span style="color: blue"&gt;member&lt;/span&gt; [Date].[Fiscal Weeks].[CM] &lt;span style="color: blue"&gt;as&lt;/span&gt; 'AGGREGATE({[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[47]&amp;amp;[2004],[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[48]&amp;amp;[2004],[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[49]&amp;amp;[2004],[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[50]&amp;amp;[2004]}*&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;   {[Customer].[Customer Geography].[Country].&amp;amp;[Australia],[Customer].[Customer Geography].[Country].&amp;amp;[United States]})' &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;&lt;span style="color: blue"&gt;select&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  {[Week Count]} &lt;span style="color: blue"&gt;on&lt;/span&gt; &lt;span style="color: blue"&gt;columns&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;&lt;span style="color: blue"&gt;from&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  [Adventure Works] &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  &lt;span style="color: blue"&gt;where&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  [Date].[Fiscal Weeks].[CM]&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;Once again, we are attempting to count the existing fiscal weeks in slicer.  Again, in this case the query returns (174) which is the total number of [Date].[Fiscal Weeks].[Fiscal Week].members defined in the dimension. However, in 2008 R2 this query returns the correct result of 4 and additionally , the following will return the count of existing countries as well (2):&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;&lt;span style="color: blue"&gt;With&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  &lt;span style="color: blue"&gt;member&lt;/span&gt; [Week Count] &lt;span style="color: blue"&gt;as&lt;/span&gt; 'count(existing([Date].[Fiscal Weeks].[Fiscal Week].members))'&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  &lt;span style="color: blue"&gt;member&lt;/span&gt; [Country Count] &lt;span style="color: blue"&gt;as&lt;/span&gt; 'count(existing([Customer].[Customer Geography].[Country].members))'&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt; &lt;span style="color: blue"&gt;member&lt;/span&gt; [Date].[Fiscal Weeks].[CM] &lt;span style="color: blue"&gt;as&lt;/span&gt; 'AGGREGATE({[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[47]&amp;amp;[2004],[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[48]&amp;amp;[2004],[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[49]&amp;amp;[2004],[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[50]&amp;amp;[2004]}*&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;   {[Customer].[Customer Geography].[Country].&amp;amp;[Australia],[Customer].[Customer Geography].[Country].&amp;amp;[United States]})' &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;&lt;span style="color: blue"&gt;select&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  {[Week Count]} &lt;span style="color: blue"&gt;on&lt;/span&gt; &lt;span style="color: blue"&gt;columns&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;&lt;span style="color: blue"&gt;from&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  [Adventure Works] &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  &lt;span style="color: blue"&gt;where&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  [Date].[Fiscal Weeks].[CM]&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;2008 R2 seems to work as long as the AGGREGATE member is on at least one of the hierarchies attempting to be detected (i.e. [Date].[Fiscal Weeks] or [Customer].[Customer Geography]). If not, it seems that the engine cannot find a "point of entry" into the aggregate member and ignores it for calculated members.&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;One way around this would be to put the sets from the AGGREGATE member explicitly in the WHERE clause (slicer).  I realize this is only supported in SSAS 2005 and 2008.  However, after talking with Chris Webb (his blog is &lt;a href="http://cwebbbi.spaces.live.com/"&gt;here&lt;/a&gt; and I highly recommend following his efforts and musings) it is a far more efficient way to filter/slice a query:&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;&lt;span style="color: blue"&gt;With&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  &lt;span style="color: blue"&gt;member&lt;/span&gt; [Week Count] &lt;span style="color: blue"&gt;as&lt;/span&gt; 'count(existing([Date].[Fiscal Weeks].[Fiscal Week].members))'&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;   &lt;span style="color: blue"&gt;select&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  {[Week Count]} &lt;span style="color: blue"&gt;on&lt;/span&gt; &lt;span style="color: blue"&gt;columns&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;&lt;span style="color: blue"&gt;from&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  [Adventure Works] &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  &lt;span style="color: blue"&gt;where&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  ({[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[47]&amp;amp;[2004],[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[48]&amp;amp;[2004],[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[49]&amp;amp;[2004],[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[50]&amp;amp;[2004]}&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  ,{[Customer].[Customer Geography].[Country].&amp;amp;[Australia],[Customer].[Customer Geography].[Country].&amp;amp;[United States]})&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;This query returns the correct result of (4) weeks.  Additionally, we can count the cross-join members of the two hierarchies in the slicer:&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;&lt;span style="color: blue"&gt;With&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  &lt;span style="color: blue"&gt;member&lt;/span&gt; [Week Count] &lt;span style="color: blue"&gt;as&lt;/span&gt; 'count(existing([Date].[Fiscal Weeks].[Fiscal Week].members)*existing([Customer].[Customer Geography].[Country].members))'&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;   &lt;span style="color: blue"&gt;select&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  {[Week Count]} &lt;span style="color: blue"&gt;on&lt;/span&gt; &lt;span style="color: blue"&gt;columns&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;&lt;span style="color: blue"&gt;from&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  [Adventure Works] &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  &lt;span style="color: blue"&gt;where&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  ({[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[47]&amp;amp;[2004],[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[48]&amp;amp;[2004],[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[49]&amp;amp;[2004],[Date].[Fiscal Weeks].[Fiscal Week].&amp;amp;[50]&amp;amp;[2004]}&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 7pt"&gt;  ,{[Customer].[Customer Geography].[Country].&amp;amp;[Australia],[Customer].[Customer Geography].[Country].&amp;amp;[United States]})&lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in; font-size: 11pt"&gt;We get the correct number of (8) here.&lt;/div&gt;
&lt;p&gt; &lt;/p&gt; &lt;img src="http://geekswithblogs.net/ManicArchitect/aggbug/140366.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>James Rogers</dc:creator>
            <guid>http://geekswithblogs.net/ManicArchitect/archive/2010/06/11/140366.aspx</guid>
            <pubDate>Sat, 12 Jun 2010 09:43:55 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ManicArchitect/comments/140366.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ManicArchitect/archive/2010/06/11/140366.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/ManicArchitect/comments/commentRss/140366.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ManicArchitect/services/trackbacks/140366.aspx</trackback:ping>
        </item>
        <item>
            <title>Performance, Named Sets, Calculated Measures, PerformancePoint and ProClarity</title>
            <link>http://geekswithblogs.net/ManicArchitect/archive/2008/02/13/119557.aspx</link>
            <description>&lt;p class="MsoNoSpacing"&gt;&lt;span&gt;                &lt;/span&gt;Many legacy Analysis Services (or OLAP Services) implementations use ProClarity as a querying tool and publishing framework.&lt;span&gt;  &lt;/span&gt;The server infrastructure of ProClarity allows crafty implementers to push much of the customization in KPI’s and additional measures into the “Presentation” layer of the infrastructure.&lt;span&gt;  &lt;/span&gt;This is easier to manage and change in many cases than creating named sets and calculated members in the cubes as this generally takes a SSAS administrator.&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span&gt;                &lt;/span&gt;With Microsoft purchasing ProClarity and its inclusion into PerformancePoint leads to a quandary for many solution designers.&lt;span&gt;  &lt;/span&gt;While ProClarity still works well as it was designed and is available as a report type in PerformancePoint, the ProClarity views have a very different look and feel than the native PerformancePoint report views.&lt;span&gt;  &lt;/span&gt;Also, due to the fact that the report views are basically ProClarity Web Standard views, the drill-from-anywhere-to-anywhere capabilities are not available directly though the PerformancePoint interface for these views. Additionally, the library of calculated measures and sets created and published in ProClarity are not available to PerformancePoint and thus cannot be used in scorecards and report views.&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span&gt;                &lt;/span&gt;In many cases, the optimum solution here is to build these ProClarity sets and measures into their respective cubes as named sets and calculated members.&lt;span&gt;  &lt;/span&gt;CAVEAT – this is not a silver bullet solution.&lt;span&gt;  &lt;/span&gt;There is a cost in terms of SSAS processing and resources for named sets and calculated measures so this should not be done without ample testing prior to implementation in production environments.&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span&gt;                &lt;/span&gt;Let’s first talk about calculated measures.&lt;span&gt;  &lt;/span&gt;Existing ProClarity solutions may have a laundry list of calculated measures in their libraries. Many times these may contain nested measures (i.e. a calculated measure that uses another calculated measure) and as these get more they tend to not perform as well as desired.&lt;span&gt;  &lt;/span&gt;First, it is important to identify which measures will get heavy use in other applications such as PerformancePoint (both scorecards and reports) and Excel.&lt;span&gt;  &lt;/span&gt;Those that have a wide range of applicability justify their creation and maintenance as calculations in their respective cubes.&lt;span&gt;  &lt;/span&gt;These calculation (and set) definitions can be extracted from the ProClarity repository database for those of you who are familiar with it.&lt;span&gt;  &lt;/span&gt;This is not a “recommended” approach in much the same way as using the “sys” tables in production code for SQL Server is discouraged.&lt;span&gt;  &lt;/span&gt;As a rule, I like to take these calculations and run through extensive performance analysis using Query Analyzer and Profiler.&lt;span&gt;  &lt;/span&gt;For instance, let’s convert a calculation that reflects sales growth over the prior week:&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;[Measures].[Sales]/paralleperiod([Date].[Week].[Week],1,[Date].[Week].currentmember)&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;The query would look something like:&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;With member [Measures].[Sales Growth] as ‘[Measures].[Sales]/paralleperiod([Date].[Week].[Week],1,[Date].[Week].currentmember)’&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;Select [Org].members on rows&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;,[Date].[Week].&amp;amp;[01/01/2007 – 01/07/2007] on columns&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;From sales&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;Where [Measures].[Sales Growth]&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;Make sure to test the query using dimension that can take advantage of your cube partitioning strategy (in this case [Date]).&lt;span&gt;  &lt;/span&gt;Test the query with the measure as a filter, on rows and on columns.&lt;span&gt;  &lt;/span&gt;Checking profiler to make sure that the query does not cause a scan of all process partitions or excessive subcubing.&lt;span&gt;  &lt;/span&gt;Once you have settled on a calculation formula that performs well in these cases it is now time to create the calculated member through Business Intelligence Studio.&lt;span&gt;  &lt;/span&gt;When you create the calculated member in the cube, make sure you define the format and especially the non-empty behavior.&lt;span&gt;  &lt;/span&gt;If the calculation involves division, I tend to use one of the measures from the denominator as the non-empty behavior measure.&lt;span&gt;  &lt;/span&gt;I realize that this may not always be feasible if the resulting non-empty behavior is not correct so do not do this thoughtlessly.&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span&gt;                &lt;/span&gt;Next, let’s talk about named sets.&lt;span&gt;  &lt;/span&gt;Many times users and/or publishers have created dimensional sets in ProClarity to ease reporting and facilitate exception-based metrics (I will talk to this in a later post).&lt;span&gt;  &lt;/span&gt;Putting these into the cube involves much the same process as the calculated measures.&lt;span&gt;  &lt;/span&gt;First I test the named set through Query Analyzer watching with Profiler.&lt;span&gt;  &lt;/span&gt;Let’s consider a named set for a dimension Sales Type that identifies gift card sales:&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;{[Sales Type].[Sales Type].&amp;amp;[Gift Card], [Sales Type].[Sales Type].&amp;amp;[Vendor Card]}&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;Next we use this in the query:&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;With set [Gift Card] as ‘{[Sales Type].[Sales Type].&amp;amp;[Gift Card], [Sales Type].[Sales Type].&amp;amp;[Vendor Card]}’&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;member [Measures].[Sales Growth] as &lt;span&gt; &lt;/span&gt;‘[Measures].[Sales]/paralleperiod([Date].[Week].[Week],1,[Date].[Week].currentmember)’&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;Select [Org].members on rows&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;,[Date].[Week].&amp;amp;[01/01/2007 – 01/07/2007] on columns&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;From sales&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;Where ([Measures].[Sales Growth], [Gift Card])&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;Move the set around in the query to test it from all angles and try using it as part of an aggregate measure as well: &lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;With set [Gift Card] as ‘{[Sales Type].[Sales Type].&amp;amp;[Gift Card], [Sales Type].[Sales Type].&amp;amp;[Vendor Card]}’&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;member [Measures].[Gift Card Sales] as &lt;span&gt; &lt;/span&gt;‘sum([Gift Card],[Measures].[Sales])’&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;Select [Org].members on rows&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;,[Date].[Week].&amp;amp;[01/01/2007 – 01/07/2007] on columns&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;From sales&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;Where ([Measures].[Gift Card Sales])&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;If the results are satisfactory then create the set in the cube through Business Intelligence Studio.&lt;span&gt;  &lt;/span&gt;Keep in mind that sets are cached in memory for each connection so extremely large sets are not recommended in some cases as are too many sets.&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span&gt;                &lt;/span&gt;I tend to define the named sets at the top of my calculations definition so they can be used in all the subsequent calculations, if necessary.&lt;span&gt;  &lt;/span&gt;The sets and calculations created in Business Intelligence Studio are appended to the cube definition as an MDXScript so order of creation in the Studio is important as you must define parent sets and calculations before their dependent sets and calculations. &lt;span&gt; &lt;/span&gt;Adding and modifying these generally does not require cube reprocessing but I have seen it happen in rare instances.&lt;span&gt;  &lt;/span&gt;Make sure you test the cube modifications first in a non-production environment to make sure that they do not require reprocessing.&lt;span&gt;  &lt;/span&gt;You wouldn’t want to do something that would cause reprocessing the cube partitions as the source data may have been purged and unrecoverable (hopefully you have planned for this with a good archive process).&lt;span&gt;  &lt;/span&gt;Since named sets are cached in memory and calculated members are generally resolved in memory, often the combination of these results in better query performance.&lt;span&gt;  &lt;/span&gt;Using named sets in calculated measures often requires aggregate functions (such as SUM) which have a higher CPU requirement so consider the calculation mdx definition carefully to find the correct balance of query performance and scalability considering your server resources.&lt;span&gt;  &lt;/span&gt;On last advantage of calculated measures is that the mdx definition is static so you lessen the likelihood of the same measure being calculated multiple, different ways which can not only end up with different results but vastly different queries and performance.&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span&gt;                &lt;/span&gt;With these high-use sets and calculations defined in the cube(s) in an optimum way they are now available to all applications that connect to the cube such as PerformancePoint, Excel and Reporting Services as well as ProClarity and the resulting query performance should be more predictable than when they were in the ProClarity repository and assembled on the fly by ProClarity.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/ManicArchitect/aggbug/119557.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>James Rogers</dc:creator>
            <guid>http://geekswithblogs.net/ManicArchitect/archive/2008/02/13/119557.aspx</guid>
            <pubDate>Thu, 14 Feb 2008 10:15:46 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ManicArchitect/comments/119557.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ManicArchitect/archive/2008/02/13/119557.aspx#feedback</comments>
            <slash:comments>7</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/ManicArchitect/comments/commentRss/119557.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ManicArchitect/services/trackbacks/119557.aspx</trackback:ping>
        </item>
        <item>
            <title>Finding and killing SSAS Sessions</title>
            <link>http://geekswithblogs.net/ManicArchitect/archive/2008/01/22/118801.aspx</link>
            <description>&lt;p&gt; If you have a reasonably large Analysis Services implementation with users running adhoc queries via multiple tools (ProClarity, Excel, etc...) then you have probably run into problems with long-running queries.  While longer-running queries may be acceptable in many data warehousing implementations, there will occasionally be a query (maybe even more than one ;) ) that causes resource issues and runs beyond the established limits of reason for your environment. Analysis Services does not have a native tool in SQL Management Studio for monitoring session activity and/or killing connections (hint: please add one). There is some sample code you can get from Microsoft along these lines but I wanted something simpler. In digging around for info on how to do this I found pieces of how to do it but nothing comprehensive so this is what I have put together so that I can do this through the SQL Management Studio.&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 11pt"&gt;Open a XMLA query window connected to the Analysis Services server in question.&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 11pt"&gt;&lt;span style="font-weight: bold"&gt;Command 1 (Session Monitoring/Find it!):&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 11pt"&gt;&lt;span style="text-decoration: underline"&gt;Old School&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;&amp;lt;Discover xmlns="&lt;/span&gt;&lt;span style="color: blue"&gt;urn:schemas-microsoft-com:xml-analysis&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt; &amp;lt;RequestType&amp;gt;DISCOVER_SESSIONS&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;RequestType&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt; &amp;lt;Restrictions&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;    &amp;lt;RestrictionList /&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt; &amp;lt;/Restrictions&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt; &amp;lt;Properties&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;    &amp;lt;PropertyList /&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt; &amp;lt;/Properties&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;&amp;lt;/Discover&amp;gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 11pt"&gt;&lt;span style="text-decoration: underline"&gt;Using ASSP:&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 11pt"&gt;&lt;span style="text-decoration: underline"&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;Call ASSP.DiscoverSessions&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 11pt"&gt;&lt;span style="text-decoration: underline"&gt;SQL 2008 Using DMV:&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 11pt"&gt;&lt;span style="text-decoration: underline"&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;Select * from $system.DiscoverSessions&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 11pt"&gt;&lt;span style="text-decoration: underline"&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 11pt"&gt;&lt;span style="font-weight: bold"&gt;Command 2 (Kill it!):&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 11pt"&gt;&lt;span style="text-decoration: underline"&gt;Old School (Through XMLA Window)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;&amp;lt;Cancel xmlns="&lt;/span&gt;&lt;a href="http://schemas.microsoft.com/analysisservices/2003/engine"&gt;http://schemas.microsoft.com/analysisservices/2003/engine&lt;/a&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt; &amp;lt;SPID&amp;gt;121672&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;SPID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt; &amp;lt;CancelAssociated&amp;gt;1&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;CancelAssociated&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;&amp;lt;/Cancel&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 11pt"&gt;&lt;span style="text-decoration: underline"&gt;Using ASSP:&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 11pt"&gt;&lt;span style="text-decoration: underline"&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;Call ASSP.CancelSpid(121672)&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 11pt"&gt;&lt;span style="text-decoration: underline"&gt;Using ASCMD:&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 11pt"&gt;&lt;span style="text-decoration: underline"&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;ASCMD.exe –S localhost –Q “Call ASSP.CancelSPID(121672)”&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 11pt"&gt;Command 1 uses the Discover method to list the sessions. A lot of good info is in the output of this command: See the following example (from XMLA window output – using DMV or ASSP is much easier to read and is my preference):&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;&amp;lt;return xmlns="&lt;/span&gt;&lt;span style="color: blue"&gt;urn:schemas-microsoft-com:xml-analysis&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt; &amp;lt;root xmlns="&lt;/span&gt;&lt;span style="color: blue"&gt;urn:schemas-microsoft-com:xml-analysis:rowset&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;xmlns:xsi&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;xmlns:xsd&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;http://www.w3.org/2001/XMLSchema&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;    &amp;lt;xsd:schematargetNamespace="&lt;/span&gt;&lt;span style="color: blue"&gt;urn:schemas-microsoft-com:xml-analysis:rowset&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;xmlns:sql&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;urn:schemas-microsoft-com:xml-sql&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;elementFormDefault&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;qualified&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;      &amp;lt;xsd:elementname="&lt;/span&gt;&lt;span style="color: blue"&gt;root&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;        &amp;lt;xsd:complexType&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;          &amp;lt;xsd:sequenceminOccurs="&lt;/span&gt;&lt;span style="color: blue"&gt;0&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;maxOccurs&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;unbounded&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;            &amp;lt;xsd:elementname="&lt;/span&gt;&lt;span style="color: blue"&gt;row&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;row&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;          &amp;lt;/xsd:sequence&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;        &amp;lt;/xsd:complexType&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;      &amp;lt;/xsd:element&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;      &amp;lt;xsd:simpleTypename="&lt;/span&gt;&lt;span style="color: blue"&gt;uuid&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;        &amp;lt;xsd:restrictionbase="&lt;/span&gt;&lt;span style="color: blue"&gt;xsd:string&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;          &amp;lt;xsd:patternvalue="&lt;/span&gt;&lt;span style="color: blue"&gt;[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;        &amp;lt;/xsd:restriction&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;      &amp;lt;/xsd:simpleType&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;      &amp;lt;xsd:complexTypename="&lt;/span&gt;&lt;span style="color: blue"&gt;xmlDocument&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;        &amp;lt;xsd:sequence&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;          &amp;lt;xsd:any /&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;        &amp;lt;/xsd:sequence&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;      &amp;lt;/xsd:complexType&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;      &amp;lt;xsd:complexTypename="&lt;/span&gt;&lt;span style="color: blue"&gt;row&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;        &amp;lt;xsd:sequence&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;          &amp;lt;xsd:elementsql:field="&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_ID&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_ID&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;xsd:string&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;minOccurs&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;0&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;          &amp;lt;xsd:elementsql:field="&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_SPID&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_SPID&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;xsd:int&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;minOccurs&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;0&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;          &amp;lt;xsd:elementsql:field="&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_CONNECTION_ID&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_CONNECTION_ID&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;xsd:int&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;minOccurs&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;0&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;          &amp;lt;xsd:elementsql:field="&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_USER_NAME&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_USER_NAME&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;xsd:string&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;minOccurs&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;0&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;          &amp;lt;xsd:elementsql:field="&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_CURRENT_DATABASE&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_CURRENT_DATABASE&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;xsd:string&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;minOccurs&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;0&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;          &amp;lt;xsd:elementsql:field="&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_USED_MEMORY&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_USED_MEMORY&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;xsd:int&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;minOccurs&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;0&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;          &amp;lt;xsd:elementsql:field="&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_PROPERTIES&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_PROPERTIES&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;xsd:string&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;minOccurs&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;0&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;          &amp;lt;xsd:elementsql:field="&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_START_TIME&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_START_TIME&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;xsd:dateTime&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;minOccurs&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;0&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;          &amp;lt;xsd:elementsql:field="&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_ELAPSED_TIME_MS&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_ELAPSED_TIME_MS&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;xsd:unsignedLong&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;minOccurs&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;0&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;          &amp;lt;xsd:elementsql:field="&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_LAST_COMMAND_START_TIME&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_LAST_COMMAND_START_TIME&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;xsd:dateTime&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;minOccurs&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;0&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;          &amp;lt;xsd:elementsql:field="&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_LAST_COMMAND_END_TIME&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_LAST_COMMAND_END_TIME&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;xsd:dateTime&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;minOccurs&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;0&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;          &amp;lt;xsd:elementsql:field="&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_LAST_COMMAND_ELAPSED_TIME_MS&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_LAST_COMMAND_ELAPSED_TIME_MS&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;xsd:unsignedLong&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;minOccurs&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;0&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;          &amp;lt;xsd:elementsql:field="&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_IDLE_TIME_MS&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_IDLE_TIME_MS&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;xsd:unsignedLong&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;minOccurs&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;0&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;          &amp;lt;xsd:elementsql:field="&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_CPU_TIME_MS&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_CPU_TIME_MS&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;xsd:unsignedLong&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;minOccurs&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;0&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;          &amp;lt;xsd:elementsql:field="&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_LAST_COMMAND&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_LAST_COMMAND&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;xsd:string&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;minOccurs&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;0&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;          &amp;lt;xsd:elementsql:field="&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_LAST_COMMAND_CPU_TIME_MS&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;SESSION_LAST_COMMAND_CPU_TIME_MS&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;xsd:unsignedLong&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: red"&gt;minOccurs&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt;0&lt;/span&gt;&lt;span style="color: black"&gt;"&lt;/span&gt;&lt;span style="color: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;        &amp;lt;/xsd:sequence&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;      &amp;lt;/xsd:complexType&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;    &amp;lt;/xsd:schema&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;    &amp;lt;row&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;      &amp;lt;SESSION_ID&amp;gt;9EBAB2DE-A23E-4183-8508-7A729BF41C85&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;SESSION_ID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;      &amp;lt;SESSION_SPID&amp;gt;126449&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;SESSION_SPID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;      &amp;lt;SESSION_CONNECTION_ID&amp;gt;233&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;SESSION_CONNECTION_ID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;      &amp;lt;SESSION_USER_NAME&amp;gt;DOMAIN\User&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;SESSION_USER_NAME&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;      &amp;lt;SESSION_CURRENT_DATABASE&amp;gt;Cubes&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;SESSION_CURRENT_DATABASE&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;      &amp;lt;SESSION_START_TIME&amp;gt;2007-10-19T12:54:58&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;SESSION_START_TIME&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;      &amp;lt;SESSION_ELAPSED_TIME_MS&amp;gt;34141&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;SESSION_ELAPSED_TIME_MS&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;      &amp;lt;SESSION_LAST_COMMAND_START_TIME&amp;gt;2007-10-19T12:55:09&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;SESSION_LAST_COMMAND_START_TIME&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;      &amp;lt;SESSION_LAST_COMMAND_END_TIME&amp;gt;2007-10-19T12:55:07&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;SESSION_LAST_COMMAND_END_TIME&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;      &amp;lt;SESSION_LAST_COMMAND_ELAPSED_TIME_MS&amp;gt;23438&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;SESSION_LAST_COMMAND_ELAPSED_TIME_MS&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;      &amp;lt;SESSION_IDLE_TIME_MS&amp;gt;0&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;SESSION_IDLE_TIME_MS&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;      &amp;lt;SESSION_CPU_TIME_MS&amp;gt;390&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;SESSION_CPU_TIME_MS&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;      &amp;lt;SESSION_LAST_COMMAND&amp;gt;SELECT&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;HIERARCHIZE( { [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[00:00 (1:00 a.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[01:00 (2:00 a.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[02:00 (3:00 a.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[03:00 (4:00 a.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[04:00 (5:00 a.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[05:00 (6:00 a.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[06:00 (7:00 a.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[07:00 (8:00 a.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[08:00 (9:00 a.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[09:00 (10:00 a.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[10:00 (11:00 a.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[11:00 (12:00 a.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[12:00 (1:00 p.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[13:00 (2:00 p.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[14:00 (3:00 p.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[15:00 (4:00 p.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[16:00 (5:00 p.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[17:00 (6:00 p.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[18:00 (7:00 p.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[19:00 (8:00 p.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[20:00 (9:00 p.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[21:00 (10:00 p.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[22:00 (11:00 p.m.)], [Quarter Hour].[Time - Time-Half Hour-Hour].[Hour].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[23:00 (12:00 p.m.)] } )&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;ON COLUMNS,&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;{ [Measures].[Gross Sales], [Measures].[Gross Sales LY] }&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;ON ROWS&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;FROM [Sales]&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt; WHERE ( [Org Hierarchy].[Hierarchy - Org Hierarchy].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[1000001], [Date].[Hierarchy - Calendar Week].[Date - Calendar - Week].&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;amp;&lt;/span&gt;&lt;span style="color: black"&gt;[2007 - (09/23/07 - 09/29/07)] )&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;SESSION_LAST_COMMAND&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; font-size: 7pt"&gt;&lt;span style="color: black"&gt;      &amp;lt;SESSION_LAST_COMMAND_CPU_TIME_MS&amp;gt;109&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon"&gt;SESSION_LAST_COMMAND_CPU_TIME_MS&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;    &amp;lt;/row&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt; &amp;lt;/root&amp;gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 7pt"&gt;&amp;lt;/return&amp;gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Verdana; color: black; font-size: 11pt"&gt;Each &amp;lt;row&amp;gt;&amp;lt;/row&amp;gt; corresponds to a session. You can see the SPID (&amp;lt;SESSION_SPID&amp;gt;), user (&amp;lt;SESSION_USER_NAME&amp;gt;), the last command, etc. This is info can be the basis of a session monitoring/auto kill process (many of us have written similar applications in SQL Stored Procedures for SQL Server). We could even get more sophisticated and have a .NET application that runs this, applies a transform and outputs something far more readable and extend it with cancel/kill functionality, etc. Most of the information I found while researching this alludes to using the .NET application approach. However, I wanted something simpler. &lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Verdana; color: black; font-size: 11pt"&gt;We take the &amp;lt;SESSION_SPID&amp;gt; value from the output of the DISCOVER_SESSIONS command and plug it into Command 2’s &amp;lt;SPID&amp;gt; value. Notice I use the &amp;lt;CancelAssociated&amp;gt; options with a value of 1 (true). This cancels the process and any associated processes with the SPID in question. There are a host of options with the Cancel command and I am not going to cover them here. MSDN has fairly comprehensive documentation on it as well as the DISCOVER command.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/ManicArchitect/aggbug/118801.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>James Rogers</dc:creator>
            <guid>http://geekswithblogs.net/ManicArchitect/archive/2008/01/22/118801.aspx</guid>
            <pubDate>Wed, 23 Jan 2008 06:47:27 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ManicArchitect/comments/118801.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ManicArchitect/archive/2008/01/22/118801.aspx#feedback</comments>
            <slash:comments>10</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/ManicArchitect/comments/commentRss/118801.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ManicArchitect/services/trackbacks/118801.aspx</trackback:ping>
        </item>
    </channel>
</rss>
