| How to use MDW to collect Analysis Services 2008 performance counters |
| Written by Vidas Matelis |
| Thursday, 18 September 2008 23:28 |
|
In one of my previous blog posts I described SQL Server 2008 Management Data Warehouse (MDW) and how it can be used to collect performance information. This post will describe how you can create new MDW data collection sets to capture SQL Server Analysis Services (SSAS) 2008 performance counters. SQL Server 2008 does not have a graphical interface to create MDW data collection sets, so the best way to do that is by scripting an existing system data collection set and then changing it. To script an existing data collector, start SQL Server Management Studio, expand “Management”->”Data Collection”->”System Data Collection Sets” folder then right mouse click-> “Script Data Collection As..”->”Create To”->”New Query Editor Window”. For my starting point I scripted the data collection set ”Server Activity” and got this script.
The original script collects information from two different collector types: “Generic T-SQL Query Collector Type” and “Performance Counters Collector Type”. For this exercise I removed part of the script related to the first collector type. Then I updated the data collection set name and replaced the performance counters that I am interested in collecting. All performance counters are listed in the string as XML node attributes. Here is example of one counter:
For counters you can specify value “*” and that will include all counters from a specific object. You do not have to specify the “Instances” attribute. For this exercise I selected just a few Analysis Services related counters that I wanted to track. I see myself having at least a few SSAS related data collection sets - for example I would want to have a separate set to track cube processing performance that I would run just during nightly cube reprocessing. Here is the list of Analysis Services 2008 performance counters that you could use to build your data collection sets. So below is the script to create a new data collection set ”Server Activity SSAS Counters 1″. This script should be executed in MDW database:
Here is the link to the text file with SQL statements. After you execute this script, in SSMS you will see a new data collection set ”Server Activity SSAS Counters 1″. To begin collecting data, you will need to start this new collector (right mouse click, “Start Data Collection Set”). After your custom data collection set is up and running, you have to build custom reports to show data that was collected. Creating custom report deserves a separate blog post or even two, as it is not very easy. The best way would be to follow the steps that Microsoft did for system MDW reports. I run the profiler to capture how Microsoft does that and found that all data for reports comes back from parameterized stored procedures. For this demo, I just quickly created a query to get the captured data and used that in the SSRS report. Captured performance counter data is stored in the MDW database tables snapshots.performance_counter_values and snapshots.performance_counter_instances. Here is the structure for these tables: MDW Peformance counter related tables Microsoft also has a view snapshots.performance_counters that is a inner join of these two tables. I used that view for my queries. Here is sample of my query:
Big surprise to me was that you cannot use BIDS 2008 to build custom reports, you have to use Reporting Services with BIDS 2005. Based on this Microsoft connect feedback it is by design, but it is quite a big inconvieniece, so I hope Microsoft will fix this in the future. If you are building custom reports for SQL Server 2008, please make sure you leave your vote for this connect feedback, as more votes should make Microsoft consider to make this change sooner. I created a sample dashboard type report just to show 2 SSAS performance counters. Here is screenshot for my dashboard: RDL code for this report can be downloaded here. After downloading this file, please change the file extension from .txt to .rdl and copy it to your SQL Server server machine. Then in SSMS you should select the data collection set, right mouse click, then “Reports”->”Custom reports”->”Add Custom Report” and select the rdl file from the saved location. You will need to add your custom report just once, after that it will appear in the custom report list. Please note again, that the above report is just a sample of how to build custom reports. To show captured SSAS performance counters for a real environment you will need to spend much more time in building nicer looking reports. I like MDW because this framework provided by Microsoft takes care of data collection, storage and purge and because it is easy to integrate reports into SQL Server Management Studio. I am just waiting from Microsoft (or a third party) for a set of data collectors and reports related to Analysis Services. |
Latest Author Articles
- Speeding up the Query Parameters Dialog in the SSRS Query Designer
- How to use MDW to collect Analysis Services 2008 performance counters
- Analysis Services 2008 performance counters
- Microsoft SQL Server 2008 RC0 - New Adventure Works Sample Databases for SSAS
- SSAS 2008 RC0 - New function SYSTEMRESTRICTSCHEMA for restricted schema rowsets - DMVs







