Tải bản đầy đủ (.pdf) (1,056 trang)

Professional Microsoft SQL Server Analysis Services 2008 with MDX pdf

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (19.73 MB, 1,056 trang )

Professional
Microsoft
®
SQL Server
®
Analysis Services 2008 with MDX
www.wrox.com
$49.99 USA
$59.99 CAN
Wrox Professional guides are planned and written by working programmers to meet the real-world needs of programmers,
developers, and IT professionals. Focused and relevant, they address the issues technology professionals face every day. They
provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job.
Recommended
Computer Book
Categories
Database Management
General
ISBN: 978-0-470-24798-3
The new features of Analysis Services 2008 make it even easier to use and
build your databases for efficient and improved performance. This authoritative
book, written by key members of the Analysis Services product team at
Microsoft, explains how to best use these enhancements for your business
needs. The authors provides you with valuable insight on how to use Analysis
Services 2008 effectively to build, process, and deploy top-of-the-line
business intelligence applications.
You’ll explore everything that Analysis Services 2008 has to offer and examine
the important features of this product with the help of step-by-step instructions
on building multi-dimensional databases. Within each chapter, you will not only
learn how to use the features, but you’ll also discover more about the features
at a user level and what happens behind the scenes to make things work.
You’ll get a look at how features really operate, enabling you to understand


how to use them to their full potential. Plus, you’ll sharpen your ability to debug
problems that you might not have been able to otherwise.
What you will learn from this book
● The basic concepts of using Analysis Services and the common operations
you need to design your databases
● How to create multi-dimensional databases (such as multiple measure
groups, business intelligence wizards, key performance indicators, and
more)
● Methods for extending MDX via external functions
● Ways to administer your Analysis Services programmatically and design and
optimize your cube for best performance
● How data mining along with Microsoft Office 2007 makes it easy to use
and effective to perform analysis on data
Enhance Your Knowledge
Advance Your Career
Who this book is for
This book is for database and data warehouse developers and administrators interested in exploiting the power of business
intelligence and leveraging the SQL Server 2008 tool set.
Microsoft
®
SQL Server
®
Analysis Services 2008 with MDX
Harinath, Carroll,
Meenakshisundaram,
Zare, Lee
Professional
spine=2.16"
Updates, source code, and Wrox technical support at www.wrox.com
Professional

Microsoft
®
SQL Server
®
Analysis Services 2008
with MDX
Wrox Programmer to Programmer
TM
Wrox Programmer to Programmer
TM
Professional
Microsoft
®
SQL Server
®
Analysis Services 2008 with MDX
Enhance Your Knowledge
Advance Your Career
Professional Microsoft SQL Server 2008
Integration Services
978-0-470-24795-2
This book shows developers how to master the 2008 release of SSIS, covering topics
including data warehousing with SSIS, new methods of managing the SSIS platform,
and improved techniques for ETL operations.
Professional SQL Server 2008 Reporting Services
978-0-470-24201-8
This book teaches solutions architects, designers, and developers how to use
Microsoft’s reporting platform to create reporting and business intelligence solutions.
Professional Microsoft SQL Server 2008 Analysis Services
978-0-470-24798-3

Professional Microsoft SQL Server 2008 Analysis Services shows readers how to
build data warehouses and multidimensional databases, query databases, and
use Analysis Services and other components of SQL Server to provide end-to-end
solutions.
Professional Microsoft SQL Server 2008 Programming
978-0-470-25702-9
This updated new edition of Wrox’s best-selling SQL Server book has been expanded
to include coverage of SQL Server 2008’s new datatypes, new indexing structures,
manageability features, and advanced time-zone handling.
Professional Microsoft SQL Server 2008 Administration
978-0-470-24796-9
A how-to guide for experienced database administrators, this book is loaded with
unique tips, tricks, and workarounds for handling the most difficult SQL Server
administration issues. The authors discuss data capture, performance studio, Query
Governor, and new techniques for monitoring and policy management.
Beginning Microsoft SQL Server 2008 Programming
978-0-470-25701-2
This comprehensive introduction to SQL Server covers the fundamentals and moves on to discuss how to create and change tables, manage
keys, write scripts, work with stored procedures, and much more.
Beginning T-SQL with Microsoft SQL Server 2005 and 2008
978-0-470-25703-6
Beginning T-SQL with Microsoft SQL Server 2005 and 2008 provides a comprehensive introduction to the T-SQL programming language, with
concrete examples showing how T-SQL works with both SQL Server 2005 and SQL Server 2008.
Beginning Database Design Solutions
978-0-470-38549-4
Beginning Database Design Solutions introduces IT professionals—both DBAs and database developers—to database design. It explains what
databases are, their goals, and why proper design is necessary to achieve those goals. It tells how to decide what should be in a database to
meet the application’s requirements. It tells how to structure the database so it gives good performance while minimizing the chance for error.
spine=2.16"
Get more out of

WROX.com
Programmer to Programmer

Interact
Take an active role online by participating in
our P2P forums
Wrox Online Library
Hundreds of our books are available online
through Books24x7.com
Wrox Blox
Download short informational pieces and
code to keep you up to date and out of
trouble!
Chapters on Demand
Purchase individual book chapters in pdf
format
Join the Community
Sign up for our free monthly newsletter at
newsletter.wrox.com
Browse
Ready for more Wrox? We have books and
e-books available on .NET, SQL Server, Java,
XML, Visual Basic, C#/ C++, and much more!
Contact Us.
We always like to get feedback from our readers. Have a book idea?
Need community support? Let us know by e-mailing
Professional Microsoft
®
SQL Server
®


Analysis Services 2008 with MDX
Introduction xxix
Part I: Introduction
Chapter 1: Introduction to Data Warehousing and SQL Server 2008 Analysis
Services 3
Chapter 2: First Look at Analysis Services 2008 23
Chapter 3: Introduction to MDX 67
Chapter 4: Working with Data Sources and Data Source Views 93
Chapter 5: Dimension Design 117
Chapter 6: Cube Design 161
Chapter 7: Administering Analysis Services 197
Part II: Advanced Topics
Chapter 8: Advanced Dimension Design 245
Chapter 9: Advanced Cube Design 285
Chapter 10: Advanced Topics in MDX 367
Chapter 11: Extending MDX Using External Functions 395
Chapter 12: Data Writeback 413
Part III: Advanced Administration and
Performance Optimization
Chapter 13: Programmatic and Advanced Administration 441
Chapter 14: Designing for Performance 457
Chapter 15: Analyzing and Optimizing Query Performance 517
Part IV: Integration with Microsoft Products
Chapter 16: Data Mining 553
Chapter 17: Analyzing Cubes Using Microsoft Office Components 601
Chapter 18: Using Data Mining with Office 2007 677
Continues
ffirs.indd iffirs.indd i 2/10/09 7:20:52 PM2/10/09 7:20:52 PM
Do w nloa d f rom W ow! e Book <w ww.w o webo o k.co m >

Chapter 19: Integration Services 747
Chapter 20: Reporting Services 779
Part V: Scenarios
Chapter 21: Designing Real-Time Cubes 833
Chapter 22: Securing Your Data in Analysis Services 855
Chapter 23: Inventory Scenarios 897
Chapter 24: Financial Scenarios 923
Chapter 25: Web Analytics 951
Appendix A: MDX Functions 991
Index 993
ffirs.indd iiffirs.indd ii 2/10/09 7:20:53 PM2/10/09 7:20:53 PM
Professional
Microsoft
®
SQL Server
®

Analysis Services 2008 with MDX
ffirs.indd iiiffirs.indd iii 2/10/09 7:20:53 PM2/10/09 7:20:53 PM
ffirs.indd ivffirs.indd iv 2/10/09 7:20:53 PM2/10/09 7:20:53 PM
Professional
Microsof t
®
SQL Server
®

Analysis Services 2008 with MDX
Sivakumar Harinath
Matt Carroll
Sethu Meenakshisundaram

Robert Zare
Denny Guang-Yeu Lee
Wiley Publishing, Inc.
ffirs.indd vffirs.indd v 2/10/09 7:20:53 PM2/10/09 7:20:53 PM
Professional Microsoft
®
SQL Server
®
Analysis
Services 2008 with MDX
Published by
Wiley Publishing, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright © 2009 by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 978-0-470-24798-3
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
Library of Congress Cataloging-in-Publication Data is available from the publisher.
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by
any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted
under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written
permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the
Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600.
Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley &
Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at
/>Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or
warranties with respect to the accuracy or completeness of the contents of this work and specifically

disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No
warranty may be created or extended by sales or promotional materials. The advice and strategies contained
herein may not be suitable for every situation. This work is sold with the understanding that the publisher is
not engaged in rendering legal, accounting, or other professional services. If professional assistance is
required, the services of a competent professional person should be sought. Neither the publisher nor the
author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in
this work as a citation and/or a potential source of further information does not mean that the author or the
publisher endorses the information the organization or Web site may provide or recommendations it may
make. Further, readers should be aware that Internet Web sites listed in this work may have changed or
disappeared between when this work was written and when it is read.
For general information on our other products and services please contact our Customer Care Department
within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.
Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Programmer to Programmer, and related trade
dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United
States and other countries, and may not be used without written permission. Microsoft and SQL Server are
registered trademarks of Microsoft Corporation in the United States and/or other countries. All other
trademarks are the property of their respective owners. Wiley Publishing, Inc. is not associated with any
product or vendor mentioned in this book.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not
be available in electronic books.
ffirs.indd viffirs.indd vi 2/10/09 7:20:54 PM2/10/09 7:20:54 PM
I dedicate this book in the grandest possible manner to my dear wife, Shreepriya,
who has been fully supportive and patient with me for all the late nights I worked on this book.
It is also dedicated to my twins, Praveen and Divya, who have seen me work long hours on this book.
I dedicate this book in memory of my father, Harinath Govindarajalu, who passed away in 1999 and
who I am sure would have been proud of this great achievement, and to my mother, Sundar Bai,
and my sister, Geetha Harinath. Finally, I dedicate this book in memory of my uncle, Jayakrishnan Govindarajalu,
who passed away in 2007 and who was very proud of me co - authoring the first edition of this book,
and was eagerly looking forward to seeing this book.
— Siva Harinath

Thanks to my wife, Wendy, for her love and patience. Love and hope to Lawrence,
Loralei, and Joshua.
— Matt Carroll
To my Parents, Uncle & Aunt, Guru(s), and the Lord Almighty for molding
me into who I am today.
— Sethu Meenakshisundaram
To the patience and love from Isabella and Hua - Ping.
— Denny Lee
ffirs.indd viiffirs.indd vii 2/10/09 7:20:54 PM2/10/09 7:20:54 PM
ffirs.indd viiiffirs.indd viii 2/10/09 7:20:54 PM2/10/09 7:20:54 PM
About the Authors
Sivakumar Harinath was born in Chennai, India. Siva has a Ph.D. in Computer Science from the
University of Illinois at Chicago. His thesis title was “ Data Management Support for Distributed Data
Mining of Large Datasets over High Speed Wide Area Networks. ” Siva has worked for Newgen Software
Technologies (P) Ltd., IBM Toronto Labs, Canada; National Center for Data Mining, University of Illinois
at Chicago; and has been at Microsoft since February of 2002. Siva started as a Software Design Engineer
in Test (SDET) in the Analysis Services Performance Team and currently is a Senior Test Lead in the
Analysis Services team. Siva ’ s other interests include high - performance computing, distributed systems,
and high - speed networking. Siva is married to Shreepriya and has twins, Praveen and Divya. His
personal interests include travel, games, and sports (in particular carrom, chess, racquet ball, and board
games). You can reach Siva at
.
Matt Carroll is currently a Senior Development Lead on the SQL Server Integration Services team at
Microsoft. Prior to this, he spent 10 years working on the SQL Server Analysis Services team as a
developer and then development lead. He ’ s presented on Analysis Services at VSLive and compiled and
edited the whitepaper “ OLAP Design Best Practices for Analysis Services 2005. ”
Sethu Meenakshisundaram has more than 20 years of Enterprise System Software Development
experience. Sethu spent a good portion of his career at Sybase Inc. in architecture, development, and
management building world class OLTP and OLAP Database Systems. Sethu was instrumental in
developing and leading highly complex clustered systems of Adaptive Server Enterprise. Early in the

‘ 90s, Sethu developed a version of Sybase Adaptive Server running on the Windows platform. Most
recently he was an Architect in the SQL Server BI team driving technology and partner strategy. Prior to
Microsoft, Sethu managed all of Server development as Senior Director at Sybase including building
teams in the U.S., India, and China. He is currently a Vice President in charge of Technology Strategy at
SAP Labs, USA.
Rob Zare is a program manager on the SQL Server development team. He ’ s worked on the product since
shortly before the first service pack of SQL Server 2000. During that time, he ’ s focused primarily on
Analysis Services, though for the next major release of SQL Server he ’ ll be focused on Integration
Services. He is the co - author of Fast Track to MDX and regularly speaks at major technical conferences
around the world.
Denny Lee is a Senior Program Manager based out of Redmond, WA in the SQLCAT Best Practices Team.
He has more than 12 years experience as a developer and consultant implementing software solutions to
complex OLTP and data warehousing problems. His industry experience includes accounting, human
resources, automotive, retail, web analytics, telecommunications, and healthcare. He had helped create
the first OLAP Services reporting application in production at Microsoft and is a co - author of “ SQL Server
2000 Data Warehousing with Analysis Services ” and “ Transforming Healthcare through Information
[Ed. Joan Ash] (2008) ” . In addition to contributing to the SQLCAT Blog, SQL Server Best Practices, and
SQLCAT.com, you can also review Denny ’ s Space (). Denny
specializes in developing solutions for Enterprise Data Warehousing, Analysis Services, and Data Mining;
he also has focuses in the areas of Privacy and Healthcare.
ffirs.indd ixffirs.indd ix 2/10/09 7:20:54 PM2/10/09 7:20:54 PM
ffirs.indd xffirs.indd x 2/10/09 7:20:55 PM2/10/09 7:20:55 PM
Contributors
Akshai Mirchandani
Wayne Robertson
Leah Etienne
Grant Paisley
Executive Editor
Robert Elliott
Development Editor

Kelly Talbot
Technical Editor
Ron Pihlgren
Prashant Dhingra
Production Editor
Daniel Scribner
Copy Editor
Kim Cofer
Editorial Manager
Mary Beth Wakefield
Production Manager
Tim Tate
Vice President and Executive Group Publisher
Richard Swadley
Vice President and Executive Publisher
Barry Pruett
Associate Publisher
Jim Minatel
Project Coordinator, Cover
Lynsey Stanford
Proofreader
Nancy Carrasco
Indexer
Ron Strauss
Credits
ffirs.indd xiffirs.indd xi 2/10/09 7:20:55 PM2/10/09 7:20:55 PM
ffirs.indd xiiffirs.indd xii 2/10/09 7:20:55 PM2/10/09 7:20:55 PM
Acknowledgments
Wow!!! It has been an amazing 15 months from when we decided to partner in writing this book. The
first edition of this book started when Siva jokingly mentioned to his wife the idea of writing a book on

SQL Server Analysis Services 2005. She took it seriously and motivated him to start working on the idea
in October 2003. Because the first edition was well received, Siva identified co-authors for the new
edition. All the co-authors of this book were part of the SQL Server team when they started writing this
book. As always, there are so many people who deserve mentioning that we are afraid we will miss
someone. If you are among those missed, please accept our humblest apologies. We first need to thank
the managers of each co-author and Kamal Hathi, Product Unit Manager of the Analysis Services team
for permission to moonlight. Siva specifically thanks his manager Lon Fisher for his constant
encouragement and support to help Analysis Services customers. We thank our editors, Bob Elliott and
Kelly Talbot, who supported us right from the beginning but also prodded us along, which was
necessary to make sure the book was published on time.
We would like to thank our technical reviewers, Ron Pihlgren and Prashant Dhingra, who graciously
offered us their assistance and significantly helped in improving the content and samples in the book.
We thank Akshai Mirchandani, Wayne Robertson, Leah Etienne, and Grant Paisley for their
contributions in the book for Chapters 5, 6, 14, 17, and 18. We thank all our colleagues in the Analysis
Services product team (including Developers, Program Managers, and Testers) who helped us in
accomplishing the immense feat of writing the book on a development product. To the Analysis Services
team, special thanks go to Akshai Mirchandani, T. K. Anand, Cristian Petculescu, Bogdan Crivat, Dana
Cristofor, Marius Dumitru, Andrew Garbuzov, Bo Simmons, and Richard Tkachuk from the SQL Server
Customer Advisory team for patiently answering our questions or providing feedback to enhance the
content of the book.
Most importantly, we owe our deepest thanks to our wonderful families. Without their support and
sacrifice, this book would have become one of those many projects that begins and never finishes. Our
families were the ones who truly took the brunt of it and sacrificed shared leisure time, all in support of
our literary pursuit. We especially want to thank them for their patience with us, and the grace it took to
not kill us during some of the longer work binges.
ffirs.indd xiiiffirs.indd xiii 2/10/09 7:20:55 PM2/10/09 7:20:55 PM
ffirs.indd xivffirs.indd xiv 2/10/09 7:20:56 PM2/10/09 7:20:56 PM
Contents
Introduction xxix
Part I: Introduction

Chapter 1: Introduction to Data Warehousing and SQL Server 2008 Analysis
Services 3
A Closer Look at Data Warehousing 4
Key Elements of a Data Warehouse 7
Fact Tables 7
Dimension Tables 8
Dimensions 9
Cubes 10
The Star Schema 11
The Snowflake Schema 12
Inmon Versus Kimball — Different Approaches 13
Business Intelligence Is Data Analysis 13
Microsoft Business Intelligence Capabilities 14
Integrating Data 14
Storing Data 15
The Model 15
Exploring Data 15
Visualizing 15
Deliver 15
SQL Server Analysis Services 2008 17
The Unified Dimensional Model 20
Summary 22
Chapter 2: First Look at Analysis Services 2008 23
Differences between Analysis Services 2000, Analysis Services 2005,
and Analysis Services 2008 24
Development, Administrative, and Client Tools 24
Analysis Services Version Differences 25
ftoc.indd xvftoc.indd xv 2/10/09 12:22:50 PM2/10/09 12:22:50 PM
Contents
xvi

Upgrading to Analysis Services 2008 26
Using Business Intelligence Development Studio 35
Creating a Project in the Business Intelligence Development Studio 35
Creating an Analysis Services Database Using Business Intelligence Development Studio 38
Using SQL Server Management Studio 59
The Object Explorer Pane 61
Querying Using the MDX Query Editor 63
Summary 65
Chapter 3: Introduction to MDX 67
What Is MDX? 67
Fundamental Concepts 68
Members 70
Cells 71
Tuples 73
Sets 74
MDX Queries 75
The SELECT Statement and Axis Specification 76
The FROM Clause and Cube Specification 77
The WHERE Clause and Slicer Specification 77
The WITH Clause and Calculated Members 79
MDX Expressions 82
Operators 84
Arithmetic Operators 84
Set Operators 84
Comparison Operators 84
Logical Operators 85
Special MDX Operators — Curly Braces, Commas, and Colons 85
MDX Functions 85
MDX Function Categories 86
Set Functions 87

Member Functions 89
Numeric Functions 90
Dimension Functions, Level Functions, and Hierarchy Functions 91
String Manipulation Functions 91
Other Functions 91
Summary 92
ftoc.indd xviftoc.indd xvi 2/10/09 12:22:51 PM2/10/09 12:22:51 PM
Contents
xvii
Chapter 4: Working with Data Sources and Data Source Views 93
Data Sources 93
Data Sources Supported by Analysis Services 95
.NET versus OLE DB Data Providers 98
Data Source Views 99
DSV Wizard 100
DSV Designer 100
Data Source Views in Depth 107
Data Source View Properties 109
Different Layouts in DSVs 111
Validating Your DSV and Initial Data Analysis 112
Multiple Data Sources within a DSV 114
Summary 115
Chapter 5: Dimension Design 117
Working with the Dimension Wizard 117
Working with the Dimension Designer 124
Attributes 125
Attribute Relationships 127
Hierarchies and Levels 132
Browsing the Dimension 136
Sorting Members of a Level 145

Optimizing Attributes 147
Defining Translations in Dimensions 148
Creating a Snowflake Dimension 150
Creating a Time Dimension 153
Creating a Parent-Child Hierarchy 156
Summary 160
Chapter 6: Cube Design 161
The Unified Dimensional Model 161
Creating a Cube Using the Cube Wizard 163
Browsing Cubes 169
Cube Dimensions 173
Relationship Types 174
Browsing Reference Dimensions 178
Measures and Measure Groups 180
Calculated Members 187
Calculated Measures 188
Querying Calculated Measures 191
ftoc.indd xviiftoc.indd xvii 2/10/09 12:22:51 PM2/10/09 12:22:51 PM
Contents
xviii
Creating Perspectives 192
Creating Translations 193
Browsing Perspectives and Translations 194
Summary 196
Chapter 7: Administering Analysis Services 197
Administration Using SQL Server 2008 Tools 197
Managing Analysis Servers 198
Managing Analysis Services Objects 200
Database Creation 201
Processing Analysis Services Database Objects 204

Managing Partitions 215
Managing Assemblies 221
Backup and Restore 224
Detach and Attach 229
Synchronization 233
Managing Security 237
Online Mode 239
Summary 242
Part II: Advanced Topics
Chapter 8: Advanced Dimension Design 245
Custom Rollups 246
Enhancements to Parent-Child Hierarchies 255
Unary Operators 255
Specifying Names of Levels in a Parent-Child Hierarchy 259
Using Properties to Customize Dimensions 261
Ordering Dimension Members 261
The All Member, Default Member, and Unknown Member 262
Error Configurations for Processing 264
Storage Mode 264
Grouping Members 265
Dimension Intelligence Using the Business Intelligence Wizard 266
Account Intelligence 267
Time Intelligence 272
Dimension Intelligence 275
Server Time Dimension 277
Dimension Writeback 281
Summary 284
ftoc.indd xviiiftoc.indd xviii 2/10/09 12:22:52 PM2/10/09 12:22:52 PM
Contents
xix

Chapter 9: Advanced Cube Design 285
Measure Groups and Measures 286
Adding and Enhancing Dimensions 291
Fact Dimensions 292
Many-to-Many Dimensions 293
Data Mining Dimensions 295
Role-Playing Dimensions 296
Adding Calculations to Your Cube 297
Key Performance Indicators (KPIs) 305
KPI Creation 306
DRILLTHROUGH 315
Actions 315
Action Types 316
Action Target Types 316
URL Action 317
Report Actions 322
DRILLTHROUGH Action 324
Adding Intelligence to the Cube 329
Semi-Additive Measures 329
Currency Conversion 331
Working with Partitions 337
Building a Local Partition 339
Building a Remote Partition 341
Storage Modes and Storage Settings 349
Building Aggregations 351
The Aggregation Design Process 354
Usage-Based Optimization 357
Defining Security 358
AMO Warnings 361
Design Experience 362

Dismissing Warnings 363
Warnings Designer 364
Summary 365
Chapter 10: Advanced Topics in MDX 367
Calculation Fundamentals 368
MDX Scripts 368
Restricting Cube Space/Slicing Cube Data 383
Using the SCOPE Statement 383
Using CREATE and DROP SUBCUBE 384
Using EXISTS 385
ftoc.indd xixftoc.indd xix 2/10/09 12:22:52 PM2/10/09 12:22:52 PM
Contents
xx
Using EXISTING 385
Using Subselect 386
Removing Empty Cells 387
Filtering Members on Axes 389
Ranking and Sorting 390
Example 1 390
Example 2 390
Example 3 390
Example 4 391
Example 5 391
Parameterize Your Queries 392
MDX Functions 393
Summary 394
Chapter 11: Extending MDX Using External Functions 395
Built-in UDFs 395
Interacting with Server Objects in COM 396
.NET User-Defined Functions (Stored Procedures) 397

Creating Stored Procedures 397
Code Access Security 402
Adding Stored Procedures 403
Querying Stored Procedures 405
Debugging Stored Procedures 406
Analysis Services 2008 Plug-Ins 408
COM User-Defined Functions 409
Adding a COM UDF to an Analysis Services Database 410
Disambiguating between Functions 410
COM UDFs versus .NET Stored Procedures 410
Summary 411
Chapter 12: Data Writeback 413
Dimension Writeback 414
Dimension Writeback Prerequisites 414
Enabling Dimension Writeback 415
Adding a Member to a Dimension 418
Modifying Data of Members in a Dimension 421
Deleting Dimension Data 424
Cell Writeback 426
Cell Writeback Prerequisites 427
Enabling Cell Writeback 427
ftoc.indd xxftoc.indd xx 2/10/09 12:22:52 PM2/10/09 12:22:52 PM
Contents
xxi
Update a Single Cell Value 430
Update Non-Leaf Cell Value Using Allocation 433
What’s New in Analysis Services 2008? 437
Summary 437
Part III: Advanced Administration and Performance
Optimization

Chapter 13: Programmatic and Advanced Administration 441
Analysis Management Objects (AMO) 441
Processing Analysis Services Databases 441
Back-Up and Restore 446
Adding Assemblies to Analysis Services 447
PowerShell and Analysis Services 449
Resource and Activity Monitoring 450
HTTP Connectivity to Analysis Services 451
Analysis Services and Fail-Over Clustering 453
Summary 455
Chapter 14: Designing for Performance 457
Optimizing UDM Design 459
Fine-Tuning Your Dimensions 460
Fine-Tuning Your Cube 466
Optimizing for Processing 476
Creating Partitions to Speed Up Processing 478
Choosing Small and Appropriate Data Types and Sizes 478
SQL Server and Analysis Services Installations 478
Optimizing a Relational Data Source 479
Avoiding Excessive Aggregation Design 480
Using Incremental Processing When Appropriate 480
Parallelism during Processing 482
Identifying Resource Bottlenecks 486
Designing Aggregations 487
Understanding Aggregations 487
Creating Aggregations 489
Usage-Based Aggregation Design 499
Aggregation Design Options 505
ftoc.indd xxiftoc.indd xxi 2/10/09 12:22:53 PM2/10/09 12:22:53 PM
Do w nloa d f rom W ow! e Book <w ww.w o webo o k.co m >

Contents
xxii
Managing Aggregation Designs 511
Scalability Optimizations 513
Configuring Server Configuration Properties 513
Scaling Out 514
Scaling Up 515
Handling Large Dimensions 515
Summary 515
Chapter 15: Analyzing and Optimizing Query Performance 517
The Calculation Model 518
MDX Script 519
Scope and Assignments 521
Dimension Attribute Calculations 521
Session and Query Calculations 521
Query Execution Architecture 522
Analysis Services Engine Components 523
Stages of Query Execution 524
Query Evaluation Modes 525
Performance Analysis and Tuning Tools 529
SQL Server Profiler 530
Performance Monitor 534
Task Manager 537
SQL Server Management Studio 538
Business Intelligence Development Studio 538
Analyzing Query Performance Issues 538
Understanding FE and SE Characteristics 539
Common Solutions for Slow Queries 540
Query Optimization Techniques 541
Using NON EMPTY on Axes 541

Using NON EMPTY for Filtering and Sorting 543
Using NON_EMPTY_BEHAVIOR for Calculations 544
Using SCOPE versus IIF and CASE 545
Auto Exists versus Properties 545
Member Value versus Properties 546
Move Simple Calculations to Data Source View 546
Features versus MDX Scripts 547
Scale Out with Read-Only Database 547
Writeback Query Performance 548
Summary 549
ftoc.indd xxiiftoc.indd xxii 2/10/09 12:22:53 PM2/10/09 12:22:53 PM
Contents
xxiii
Part IV: Integration with Microsoft Products
Chapter 16: Data Mining 553
The Data Mining Process 553
Topic Area Understanding 556
Data: Understand It, Configure It 556
Choose the Right Algorithm 557
Train, Analyze, and Predict 557
Real-World Applications 558
Fraud Detection 558
Increasing Profits in Retail 558
Data Mining in the NBA 558
Data Mining in Call Centers 559
Data Mining Algorithms in SQL Server Analysis Services 2008 559
Microsoft Decision Trees 560
Microsoft Naïve Bayes 561
Microsoft Clustering 561
Microsoft Sequence Clustering 561

Microsoft Association Rules 561
Microsoft Neural Network 561
Microsoft Time Series 562
Microsoft Linear Regression 562
Microsoft Logistic Regression 562
Working with Mining Models 563
Relational Mining Model 563
OLAP Mining Models 588
Analyzing the Cube with a Data Mining Dimension 597
Summary 599
Chapter 17: Analyzing Cubes Using Microsoft Office Components 601
Analyzing Data in Excel 2007 601
Analyzing Data Using Pivot Tables 602
Sheet Data Reports 651
Pivot Charts 657
Local Cubes 659
Excel Services 663
ProClarity 664
The Chart and Grid Views 664
The Decomposition Tree 669
The Performance Map 671
ftoc.indd xxiiiftoc.indd xxiii 2/10/09 12:22:53 PM2/10/09 12:22:53 PM

×