Administration and Optimization: SQL Server Profiler for Analysis Services Queries - Page 5

April 9, 2007

24.  Click the Execute button within the toolbar, as shown in Illustration 19.


Illustration 19: Click the Execute Button to Run the Query ...

25.  Shift immediately back to the SQL Server Profiler window.

26.  Pause the trace once again, as we did earlier.

27.  Scroll to the bottom of the rows in the viewer (the most recent events logged are based upon the MDX query we executed above), and select the row containing the “Query BeginEventClass / 0 – MDXQueryEventSubClass combination, as depicted in Illustration 20.


Illustration 20: Select the Query Begin Event for the MDX Query ...

The MDX query appears in the lower half of the trace viewer, as follows:

SELECT
   {[MEASURES].[Internet Order Quantity]} ON AXIS(0),
   NON EMPTY {[Customer].[Customer Geography].[Full Name].MEMBERS}
      ON AXIS (1)
FROM
 
   [Adventure Works]
<PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis">
     <Catalog>Adventure Works DW</Catalog>
<SspropInitAppName>Microsoft SQL Server Management Studio -    
   Query</SspropInitAppName>
          <LocaleIdentifier>1033</LocaleIdentifier>
          <ClientProcessID>5820</ClientProcessID>
          <Format>Native</Format>
          <AxisFormat>TupleFormat</AxisFormat>
          <Content>SchemaData</Content>
          <Timeout>0</Timeout>
        </PropertyList>

The Query Begin event indicates the syntax that was dispatched to the Analysis Server. The Query Cube events that follow provide notification that the formula engine has initiated query execution, indicating code as it is executed. Moreover, subsequent events are logged (other than the core events, these can differ, depending upon query complexity) to report upon events that occurred in resolution of our query. The information provided can be highly useful when we need to diagnose issues, or if we otherwise want to understand details of the steps of query execution. We can filter for MDX queries just as we did for SQL queries, should isolation of this sort prove useful.

28.  Click the Stop Selected Trace button within the toolbar, as shown in Illustration 21, to stop the trace.


Illustration 21: Click the Stop Selected Trace Button ...

And so we see, through our brief overview of its capabilities, that SQL Server Profiler can serve as a formidable tool in assisting us in understanding the details of what is going on within Analysis Services. The trace mechanism that the Profiler provides us allows for sophisticated control over the selection of events for our analysis and diagnosis efforts. As we have discussed, the SQL Server Profiler trace can be highly useful in our efforts with tuning of processing and query performance within Analysis Services 2005. We employ the SQL Server Profiler within other articles of this series, as well is in my MDX Essentials Series, here at Database Journal.

29.  Experiment further with the trace, and with SQL Server Profiler, as desired.

30.  Select File -> Exit to dismiss SQL Server Profiler, when ready, as depicted in Illustration 22.


Illustration 22: Exiting SQL Server Profiler

31.  Within the SQL Server Management Studio, Select File -> Exit to leave the application, when ready, as shown in Illustration 23.


Illustration 23: Exiting SQL Server Management Studio

32.  Save the MDX query file, if desired, by navigating to a convenient location, and clicking the Save button, on the Save File As dialog that appears next, similar to that depicted in Illustration 24.


Illustration 24: Saving the MDX Query (If Desired) ...

Conclusion

In this article, we introduced the SQL Server Profiler, a monitoring and troubleshooting tool that is highly useful in performance tuning Analysis Services 2005, including SQL and MDX queries. Our examination of the Profiler began with a discussion surrounding its use, in preparation for gaining some hands-on exposure via our practice exercise. We performed a connection to the Analysis Server with SQL Server Profiler, and defined a trace to monitor examples of processing and queries within Analysis Services.

We next executed our trace to monitor Analysis Services events, adding a filter as we proceeded to examine sample processing events, and then moving on to monitor sample query events, all of which we initiated, for purposes of our practice session, via the SQL Server Management Studio, just as we might in many real-world scenarios. Throughout the steps of our practice session, we touched upon various details to consider surrounding the usage of the SQL Server Profiler trace within our respective business environments.

» See All Articles by Columnist William E. Pearson, III

Discuss this article in the MSSQL Server 2000 Analysis Services and MDX Topics Forum.

Introduction to MSSQL Server Analysis Services Series
Introduction to Security in Analysis Services
Cube Storage: Planning Partitions from a SQL Server Management Studio Perspective
Cube Storage: Planning Partitions (Business Intelligence Development Studio Perspective)
Cube Storage: Introduction to Partitions
Introduction to Cube Storage
Attribute Discretization: Customize Grouping Names
Attribute Discretization: Using the "Clusters" Method
Attribute Discretization: Using the "Equal Areas" Method
Attribute Discretization: Using the Automatic Method
Introduction to Attribute Discretization
More Exposure to Settings and Properties in Analysis Services Attribute Relationships
Attribute Relationships: Settings and Properties
Introduction to Attribute Relationships in MSSQL Server Analysis Services
Attribute Member Values in Analysis Services
MSSQL Analysis Services - Attribute Member Names
Attribute Member Keys - Pt II: Composite Keys
Attribute Member Keys - Pt 1: Introduction and Simple Keys
Dimension Attributes: Introduction and Overview, Part V
Dimension Attributes: Introduction and Overview, Part IV
Dimension Attributes: Introduction and Overview, Part III
Dimension Attributes: Introduction and Overview, Part II
Dimension Attributes: Introduction and Overview, Part I
Dimensional Model Components: Dimensions Part II
Dimensional Model Components: Dimensions Part I
Manage Unknown Members in Analysis Services 2005, Part II
Manage Unknown Members in Analysis Services 2005, Part I
Alternatively Sorting Attribute Members in Analysis Services 2005
Introduction to Linked Objects in Analysis Services 2005
Distinct Counts in Analysis Services 2005
Positing the Intelligence: Conditional Formatting in the Analysis Services Layer
Administration and Optimization: SQL Server Profiler for Analysis Services Queries
Mastering Enterprise BI: Time Intelligence Pt. II
Mastering Enterprise BI: Time Intelligence Pt. I
Design and Documentation: Introducing the Visio 2007 PivotDiagram
Actions in Analysis Services 2005: The URL Action
Actions in Analysis Services 2005: The Drillthrough Action
Mastering Enterprise BI: Introducing Actions in Analysis Services 2005
Mastering Enterprise BI: Introduction to Translations
Mastering Enterprise BI: Introduction to Perspectives
Introduction to the Analysis Services 2005 Query Log
Mastering Enterprise BI: Working with Measure Groups
Mastering Enterprise BI: Introduction to Key Performance Indicators
Mastering Enterprise BI: Extend the Data Source with Named Calculations, Pt. II
Mastering Enterprise BI: Extend the Data Source with Named Calculations, Pt. I
Process Analysis Services Objects with Integration Services
Usage-Based Optimization in Analysis Services 2005
Introduction to MSSQL Server Analysis Services: Named Sets Revisited
Introduction to MSSQL Server Analysis Services: Migrating an Analysis Services 2000 Database to Analysis Services 2005
Introduction to MSSQL Server Analysis Services: Introducing Data Source Views
Introduction to MSSQL Server Analysis Services: Reporting Options for Analysis Services Cubes: MS Excel 2003 and More ...
Introduction to MSSQL Server Analysis Services: Mastering Enterprise BI: Create Aging "Buckets" in a Cube
Introduction to MSSQL Server Analysis Services: Mastering Enterprise BI: Relative Time Periods in an Analysis Services Cube, Part II
Introduction to MSSQL Server Analysis Services: Mastering Enterprise BI: Relative Time Periods in an Analysis Services Cube
Introduction to MSSQL Server Analysis Services: Process Analysis Services Cubes with DTS
Introduction to MSSQL Server Analysis Services: Presentation Nuances: CrossTab View - Same Dimension
Introduction to MSSQL Server Analysis Services: Point-and-Click Cube Schema Simplification
Introduction to MSSQL Server 2000 Analysis Services: Manage Distinct Count with a Virtual Cube
Introduction to MSSQL Server 2000 Analysis Services: Distinct Count Basics: Two Perspectives
Introduction to MSSQL Server 2000 Analysis Services: Semi-Additive Measures and Periodic Balances
Introduction to MSSQL Server 2000 Analysis Services: Performing Incremental Cube Updates - An Introduction
Introduction to MSSQL Server 2000 Analysis Services: Partitioning a Cube in Analysis Services - An Introduction
Introduction to MSSQL Server 2000 Analysis Services: Basic Storage Design
Introduction to MSSQL Server 2000 Analysis Services: Derived Measures vs. Calculated Measures
Introduction to MSSQL Server 2000 Analysis Services: Creating a Dynamic Default Member
Introduction to MSSQL Server 2000 Analysis Services: Another Approach to Local Cube Design and Creation
Introduction to MSSQL Server 2000 Analysis Services: Introduction to Local Cubes
Introduction to MSSQL Server 2000 Analysis Services: Actions in Virtual Cubes
Introduction to MSSQL Server 2000 Analysis Services: Putting Actions to Work in Regular Cubes
Introduction to MSSQL Server 2000 Analysis Services: Reporting Options for Analysis Services Cubes: ProClarity Part II
Introduction to MSSQL Server 2000 Analysis Services: Reporting Options for Analysis Services Cubes: ProClarity Professional, Part I
Introduction to MSSQL Server 2000 Analysis Services: Using Calculated Cells in Analysis Services , Part II
Introduction to MSSQL Server 2000 Analysis Services: Using Calculated Cells in Analysis Services, Part I
Introduction to MSSQL Server 2000 Analysis Services: MSAS Administration and Optimization: Toward More Sophisticated Analysis
Introduction to MSSQL Server 2000 Analysis Services: MSAS Administration and Optimization: Simple Cube Usage Analysis
Introduction to MSSQL Server 2000 Analysis Services: Build a Web Site Traffic Analysis Cube: Part II
Build a Web Site Traffic Analysis Cube: Part I
Reporting Options for Analysis Services Cubes: Cognos PowerPlay
Reporting Options for Analysis Services Cubes: MS FrontPage 2002
Reporting Options for Analysis Services Cubes: MS Excel 2002
Introduction to MSSQL Server 2000 Analysis Services: Drilling Through to Details: From Two Perspectives
Introduction to MSSQL Server 2000 Analysis Services: Custom Cubes: Financial Reporting - Part II
Introduction to MSSQL Server 2000 Analysis Services Custom Cubes: Financial Reporting (Part I)
Introduction to SQL Server 2000 Analysis Services: Exploring Virtual Cubes
Introduction to SQL Server 2000 Analysis Services: Working with the Cube Editor
Introduction to SQL Server 2000 Analysis Services: Parent-Child Dimensions
Introduction to SQL Server 2000 Analysis Services: Handling Time Dimensions
Introduction to SQL Server 2000 Analysis Services: Working with Dimensions
Introduction to SQL Server 2000 Analysis Services: Creating Our First Cube








The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers