0% found this document useful (0 votes)
84 views

Ssrsnssasnssis Concepts

SSRS concepts

Uploaded by

rajmuthiar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views

Ssrsnssasnssis Concepts

SSRS concepts

Uploaded by

rajmuthiar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Contents at a Glance

Part I

Understanding Business Intelligence and Analysis


Services

1 Business Intelligence: A Data Analysis Foundation . . . . . . . . . . . . . 1


2 Understanding OLAP and Analysis Services . . . . . . . . . . . . . . . . . 23
3 Accessing Source Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Part II

Design Fundamentals

Creating Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Creating a Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Creating Advanced Measures and Calculations . . . . . . . . . . . . . 139
Advanced Dimension Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

4
5
6
7

Part III Advanced

8
9
10
11
12
13

Design

Working with Account Intelligence . . . . . . . . . . . . . . . . . . . . . . . .


Currency Conversion and Multiple Languages . . . . . . . . . . . . . .
Interacting with a Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Retrieving Data from Analysis Services . . . . . . . . . . . . . . . . . . . .
Implementing Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Designing Aggregations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Part IV Production

197
215
233
257
293
313

Management

14 Managing Partitions and Database Processing . . . . . . . . . . . . . . 341


15 Managing Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
16 Advanced Monitoring and Management Tools . . . . . . . . . . . . . 385

iii

Table of Contents
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii

Part I

Understanding Business Intelligence and Analysis


Services

1 Business Intelligence: A Data Analysis Foundation . . . . . . . . . . . . . 1


Introducing Business Intelligence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Multidimensional Data Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Attributes in Data Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Hierarchies in Data Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Dimensions in Data Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Understanding a Dimensional Data Warehouse . . . . . . . . . . . . . . . . . . . . . . . . . 14
A Fact Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Dimension Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Surrogate Keys and Slowly Changing Dimensions . . . . . . . . . . . . . . . . . . 17
Alternative Table Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Multidimensional OLAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

2 Understanding OLAP and Analysis Services . . . . . . . . . . . . . . . . . 23


Understanding OLAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Consistently Fast Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Metadata-Based Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Spreadsheet-Style Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Understanding Analysis Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Analysis Services and Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Analysis Services and Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Analysis Services and the Microsoft Business Intelligence Platform . . . . . . . . 34
Analysis Services Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

What do you think of this book? We want to hear from you!


Microsoft is interested in hearing your feedback so we can continually improve our books and learning
resources for you. To participate in a brief online survey, please visit:

www.microsoft.com/learning/booksurvey/

vi

Table of Contents

3 Accessing Source Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37


Creating a Business Intelligence Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Creating a Data Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Creating a Data Source View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Modifying a Data Source View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Part II

Design Fundamentals

4 Creating Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Previewing Dimension Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Creating a Standard Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Deploying an Analysis Services Database . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Modifying a Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Creating a Time Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Creating a Parent-Child Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

5 Creating a Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101


Previewing Cube Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Using the Wizard to Create a Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Role-Playing Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Deploying and Browsing a Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Using the Cube Designer to Modify a Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Adding User-Friendly Names to a Cube . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Formatting Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Modifying the Interaction of Dimensions and Measure Groups . . . . . 126
Adding Measures and Measure Groups to a Cube . . . . . . . . . . . . . . . . . 129
Creating a Calculated Member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Redeploying and Browsing a Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

6 Creating Advanced Measures and Calculations . . . . . . . . . . . . . 139


Using Aggregate Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Using MDX to Retrieve Values from a Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Creating Calculated Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Applying Conditional Formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Calculating Contribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Creating Calculated Members Outside of the
Measures Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Calculation Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Creating KPIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171

Table of Contents

7 Advanced Dimension Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177


Dimension Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Creating Reference Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Creating a Fact Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Creating a Many-to-Many Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

Part III Advanced

Design

8 Working with Account Intelligence . . . . . . . . . . . . . . . . . . . . . . . . 197


Designing a Financial Analysis Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Working with Account Intelligence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Creating an Account Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Working with Non-Additive Financial Measures . . . . . . . . . . . . . . . . . . . 208
Creating a Non-Additive Calculated Member . . . . . . . . . . . . . . . . . . . . . 209
Working with a Scenario Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212

9 Currency Conversion and Multiple Languages . . . . . . . . . . . . . . 215


Supporting Foreign Currency Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Supporting Foreign Language Translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226

10 Interacting with a Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233


Implementing Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Creating Standard Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Creating Drillthrough Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Linking to Reporting Services Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Using Writeback to Modify Analysis Services Data . . . . . . . . . . . . . . . . . . . . . . 249
Enabling Dimension Writeback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Enabling Cube Writeback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252

11 Retrieving Data from Analysis Services . . . . . . . . . . . . . . . . . . . . 257


Creating Perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Creating MDX Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Accessing Analysis Services Using Excel 2007 . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Creating Reporting Services Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283

12 Implementing Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293


Understanding Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Securing Administrative Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Assigning Server-Level Administrative Access . . . . . . . . . . . . . . . . . . . . . 295

vii

viii

Table of Contents

Assigning Database-Level Administrative Access . . . . . . . . . . . . . . . . . . 298


Securing Data Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Granting Access to Cubes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Restricting Access to Dimension Members . . . . . . . . . . . . . . . . . . . . . . . 302
Restricting Access to Cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309

13 Designing Aggregations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313


Understanding Aggregation Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Using the Aggregation Design Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
Attribute Relationships, User-Defined Hierarchies, and
Aggregation Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Designing an Aggregation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
Changing Partition Counts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Using the Usage-Based Optimization Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . 332

Part IV Production

Management

14 Managing Partitions and Database Processing . . . . . . . . . . . . . . 341


Working with Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Understanding Dimension Storage Modes . . . . . . . . . . . . . . . . . . . . . . . 343
Understanding Partition Storage Modes . . . . . . . . . . . . . . . . . . . . . . . . . 344
Changing Data in a Warehouse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
Managing Analysis Services Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
Processing a Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Processing a Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
Proactive Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
Working with Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Understanding Partition Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Creating Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362

15 Managing Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371


Deployment Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
Deployment Mechanics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
Deployment Using Business Intelligence Development Studio . . . . . . . . . . . 372
Deployment Using the Deployment Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
Deployment Wizard UI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
Understanding Deployment Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Migrating Databases and Disaster Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Detaching and Attaching an Analysis Services Database . . . . . . . . . . . 380

Table of Contents

Synchronizing Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381


Backing Up and Restoring a Database . . . . . . . . . . . . . . . . . . . . . . . . . . . 381

16 Advanced Monitoring and Management Tools . . . . . . . . . . . . . 385


Monitoring Analysis Services Using Windows Reliability And Performance
Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
Monitoring Analysis Services Using SQL Server Profiler . . . . . . . . . . . . . . . . . . 392
Analysis Services Dynamic Management Views . . . . . . . . . . . . . . . . . . . . . . . . 399

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403

What do you think of this book? We want to hear from you!


Microsoft is interested in hearing your feedback so we can continually improve our books and learning
resources for you. To participate in a brief online survey, please visit:

www.microsoft.com/learning/booksurvey/

ix

ffirs.indd ii

8/28/08 7:49:19 PM

Professional SQL Server 2008 Integration Services


Introduction .............................................................................................. xxix
Chapter 1: Welcome to SQL Server Integration Services ..................................1
Chapter 2: The SSIS Tools.............................................................................21
Chapter 3: SSIS Tasks ..................................................................................47
Chapter 4: Containers.................................................................................117
Chapter 5: The Data Flow ...........................................................................131
Chapter 6: Using Expressions and Variables ................................................199
Chapter 7: Joining Data ..............................................................................237
Chapter 8: Creating an End-to-End Package .................................................271
Chapter 9: Scripting in SSIS ........................................................................293
Chapter 10: Loading a Data Warehouse .......................................................355
Chapter 11: Using the Relational Engine .....................................................413
Chapter 12: Accessing Heterogeneous Data ................................................449
Chapter 13: Reliability and Scalability .........................................................491
Chapter 14: Understanding and Tuning the Data Flow Engine .......................521
Chapter 15: Source Control and Software Development Life Cycle ................567
Chapter 16: DTS 2000 Migration ................................................................609
Chapter 17: Error and Event Handling ..........................................................623
Chapter 18: Programming and Extending SSIS.............................................661
Chapter 19: Adding a User Interface to Your Component ..............................717
Chapter 20: External Management and WMI Task Implementation ...............741
Chapter 21: Using SSIS with External Applications ......................................787
Chapter 22: Administering SSIS ..................................................................809
Chapter 23: Case Study: A Programmatic Example ......................................843
Index .........................................................................................................937

ffirs.indd i

8/28/08 7:49:18 PM

Contents
Introduction
Chapter 1: Welcome to SQL Server Integration Services
SQL Server SSIS Historical Overview
Whats New in SSIS
Getting Started
Import and Export Wizard
The Business Intelligence Development Studio

Architecture

1
2
2
3
3
4

Packages
Tasks
Data Source Elements
Data Source Views

7
8
9
10

Precedence Constraints

11

Constraint Value
Conditional Expressions

11
11

Containers
Variables
Data Flow Elements

12
13
13

Sources
Destinations
Transformations

14
15
15

Error Handling and Logging


Editions of SQL Server
Summary

Chapter 2: The SSIS Tools


Import and Export Wizard
Business Intelligence Development Studio
Creating Your First Package
The Solution Explorer Window
The Toolbox
The Properties Windows
Navigation Pane
Other Windows

ftoc.indd xv

xxix

17
19
20

21
21
28
30
32
33
34
35
36

8/28/08 7:51:37 PM

Contents
The SSIS Package Designer
Control Flow
Connection Managers
Variables
Data Flow
Event Handlers
Package Explorer
Executing a Package

Package Installation Wizard


Management Studio
Summary

36
37
40
41
42
43
44
44

45
45
46

Chapter 3: SSIS Tasks

47

SSIS Task Objects

47

Using the Task Editor


The Task Editor Expressions Tab
Execution Results
Common Properties

Looping and Sequence Tasks


Scripting Tasks
ActiveX Script Task
Script Task (.NET)

Analysis Services Tasks


Analysis Services Execute DDL Task
Analysis Services Processing Task
Data Mining Query Task

Data Flow Task


Data Preparation Tasks

48
49
50
51

53
53
53
55

57
57
58
59

61
61

Data Profiler
File System Task
FTP Task
Web Service Task
XML Task

62
64
67
69
75

RDBMS Server Tasks

79

Bulk Insert Task


Execute SQL Task

79
85

Workflow Tasks
Execute Package Task
Execute Process Task
Message Queue Task
Send Mail Task

98
98
102
104
105

xvi

ftoc.indd xvi

8/28/08 7:51:38 PM

Contents
WMI Data Reader Task
WMI Event Watcher Task

106
108

SMO Administration Tasks

110

Transfer
Transfer
Transfer
Transfer
Transfer
Transfer

Database Task
Error Messages
Logins Task
Master Stored Procedures Task
Jobs Task
SQL Server Objects Task

Summary

Chapter 4: Containers
Task Host Containers
Sequence Containers
Groups
For Loop Container
Foreach Loop Container
Foreach File Enumerator Example
Foreach ADO Enumerator Example

Summary

Chapter 5: The Data Flow


The Data Flow
Data Viewers
Sources
OLE DB Source
Excel Source
Flat File Source
Raw File Source
XML Source
ADO.NET Source

Destinations
Data Mining Model Training
DataReader Destination
Dimension and Partition Processing
Excel Destination
Flat File Destination
OLE DB Destination
Raw File Destination
Recordset Destination
SQL Server and Mobile Destinations

110
112
112
113
114
115

116

117
117
117
118
119
122
123
125

129

131
131
132
132
132
135
136
142
142
142

142
143
144
144
144
145
145
146
146
146

xvii

ftoc.indd xvii

8/28/08 7:51:38 PM

Contents
Transformations
Synchronous versus Asynchronous Transformations
Aggregate
Audit
Cache Transform
Character Map
Conditional Split
Copy Column
Data Conversion
Data Mining Query
Derived Column
Export Column
Fuzzy Lookup
Fuzzy Grouping
Import Column
Lookup Transform
Merge Transform
Merge Join
Multicast
OLE DB Command
Percentage and Row Sampling
Pivot Transform
Unpivot
Row Count
Script Component
Slowly Changing Dimension
Sort
Term Extraction
Term Lookup
Union All

Data Flow Example


Summary

Chapter 6: Using Expressions and Variables


The Paradigm
Expression Overview
Variable Overview

Understanding Data Types


SSIS Data Types
Additional Date and Time Type Support
Wrong Data Types and Sizes Can Affect Performance

146
147
147
149
150
150
151
153
153
154
154
155
157
163
167
170
170
170
171
172
175
175
179
182
184
184
185
186
190
192

193
197

199
199
200
201

202
202
204
204

xviii

ftoc.indd xviii

8/28/08 7:51:38 PM

Contents
Unicode and Non-Unicode Conversion Issues
Casting in SSIS Expressions

Using Variables
Defining Variables
Variable Data Types

Working with Expressions


C#-Like? Close, but Not Completely
The Expression Builder
Syntax Basics
Using Expressions in SSIS Packages

Summary

Chapter 7: Joining Data


The Lookup Component
The Merge Join Component
Contrasting to the Relational Join
New Lookup Features
Building the Basic Package
Creating the Basic Package
Using a Relational Join in the Source
Using the Merge Join Component

Using the Lookup Component


Full-Cache Mode
No-Cache Mode
Partial-Cache Mode
Multiple Outputs
Expressionable Properties
Cascaded Lookup Operations

205
206

208
208
209

211
211
213
214
227

236

237
238
239
239
242
242
244
245
247

252
252
255
257
259
264
264

Cache Connection Manager and Transform


Summary

266
268

Chapter 8: Creating an End-to-End Package

271

Basic Transformation Tutorial


Creating Connections
Creating the Tasks
Creating the Data Flow
Completing the Package
Saving the Package
Executing the Package

271
272
274
275
276
277
277

xix

ftoc.indd xix

8/28/08 7:51:39 PM

Contents
Typical Mainframe ETL with Data Scrubbing
Creating the Data Flow
Handling Dirty Data
Finalizing
Handling More Bad Data

278
280
280
284
285

Looping and the Dynamic Task

288

Looping
Making the Package Dynamic

288
289

Summary

Chapter 9: Scripting in SSIS

291

293

Scripting?
Getting Started in SSIS Scripting

293
295

Selecting the Scripting Language


Using the VSTA Scripting IDE
Example: Hello World
Adding Code and Classes
Using Managed Assemblies

296
297
298
300
302

Using the Script Task


Configuring the Script Task Editor
The Script Task Dts Object
Accessing Variables in the Script Task
Connecting to Data Sources in a Script Task
Raising an Event in a Script Task
Writing a Log Entry in a Script Task

Using the Script Component


Differences from a Script Task
Configuring the Script Component Editor
Accessing Variables in a Script Component
Connecting to Data Sources in a Script Component
Raising Events
Logging
Example: Data Validation

Essential Coding, Debugging, and Troubleshooting Techniques


Structured Exception Handling
Script Debugging and Troubleshooting

Summary

306
306
307
308
315
322
329

330
330
331
334
335
335
336
337

347
347
350

353

xx

ftoc.indd xx

8/28/08 7:51:39 PM

Contents
Chapter 10: Loading a Data Warehouse
Data Profiling
Initial Execution of the Data Profiling Task
Reviewing the Results of the Data Profiling Task
Turning Data Profile Results into Actionable ETL Steps

Data Extraction
Dimension Table Loading
Loading a Simple Dimension Table
Loading a Complex Dimension Table
Considerations and Alternates to the SCD Transformation

Fact Table Loading


SSAS Processing
Master ETL Package
Summary

Chapter 11: Using the Relational Engine


Data Extraction
SELECT * Is Bad
WHERE Is your Friend
Transform during Extract
Many ANDs Make Light Work
SORT in the Database
Modularize
SQL Server Does Text Files Too
Use Set-Based Logic

SQL Server 2008 Change Data Capture


Benefits of SQL Server 2008 CDC
Preparation
Capture Instance Tables
The CDC API
Using CDC from within SSIS

Data Loading
Database Snapshots
The MERGE Operator

Summary

355
356
356
359
365

366
366
367
375
387

388
400
408
411

413
414
414
416
417
420
421
423
425
428

430
431
432
434
436
438

442
442
444

448

xxi

ftoc.indd xxi

8/28/08 7:51:39 PM

Contents
Chapter 12: Accessing Heterogeneous Data
Excel and Access
Limited 64-Bit Support
Working with Excel Files
Access

Oracle
Oracle Client Setup
Importing Oracle Data

XML and Web Services


Configuring the Web Service Task
Working with XML Data as a Source

Flat Files
Loading Flat Files
Extracting Data from Flat Files

ODBC
Other Heterogeneous Sources
Summary

Chapter 13: Reliability and Scalability


Restarting Packages
Simple Control Flow
Containers within Containers and Checkpoints
Variations on a Theme
Inside the Checkpoint File

Package Transactions
Single Package, Single Transaction
Single Package, Multiple Transactions
Two Packages, One Transaction
Single Package Using a Native Transaction in SQL Server

Error Outputs
Scaling Out
Architectural Improvements
Scale Out Memory Pressures
Scale Out by Staging Data

Summary

Chapter 14: Understanding and Tuning the Data Flow Engine


The SSIS Engine
Understanding the SSIS Data Flow and Control Flow
Handling Workflows with the Control Flow

449
450
450
452
452

460
460
460

463
463
476

481
481
483

486
489
490

491
491
492
496
499
501

502
503
506
508
509

511
514
514
515
515

520

521
521
522
525

xxii

ftoc.indd xxii

8/28/08 7:51:40 PM

Contents
Data Processing in the Data Flow
Memory Buffer Architecture
Types of Transformations
Advanced Data Flow Execution Concepts

SSIS Data Flow Design and Tuning


Data Flow Design Practices
Optimizing Package Processing
Troubleshooting Data Flow Performance Bottlenecks

Pipeline Performance Monitoring


Summary

Chapter 15: Source Control and Software Development Life Cycle

526
527
529
538

548
548
555
560

562
565

567

Introduction to Software Development Life Cycles

568

Software Development Life Cycles: A Brief History


Types of Software Development Life Cycles

568
569

Versioning and Source Code Control


Microsoft Visual SourceSafe
Team Foundation Server, Team System, and SSIS
MSF Agile and SSIS
The Project Portal
Putting It to Work

Code Deployment and Promotion from Development to Test to Production


The Deployment Wizard
Import a Package

Summary

Chapter 16: DTS 2000 Migration


Managing DTS 2000 Packages within SQL Server Management Studio
Running DTS 2000 Packages under SSIS
Migrating DTS 2000 Packages to SSIS
Using the Package Migration Wizard
Third-Party Migration Solution
Summary

Chapter 17: Error and Event Handling


Precedence Constraint
Precedence Constraint Basics
Advanced Precedence Constraints and Expressions

570
570
585
590
594
594

605
605
606

608

609
609
610
611
614
620
621

623
623
624
625

xxiii

ftoc.indd xxiii

8/28/08 7:51:40 PM

Contents
Event Handling
Events
Inventory Example
Event Handler Inheritance

Breakpoints
Error Rows
Logging
Logging Providers
Log Events

Summary

Chapter 18: Programming and Extending SSIS


The Sample Components

633
634
635
643

645
648
653
654
654

659

661
662

Component 1: Source Adapter


Component 2: Transformation
Component 3: Destination Adapter

662
663
663

The Pipeline Component Methods

664

Design-Time Functionality
Runtime
Connection Time

664
668
670

Building the Components

670

Preparation
Building the Source Component
Building the Transform Component
Building the Destination Adapter

Using the Components


Installing the Components
Debugging Components
Design-Time
Building the Complete Package
Runtime Debugging

Upgrading to SQL 2008


Summary

Chapter 19: Adding a User Interface to Your Component


Three Key Steps
Building the User Interface
Adding the Project
Implementing IDtsComponentUI
Setting the UITypeName
Building the Form

671
678
690
702

709
710
710
710
712
713

716
716

717
717
718
719
722
725
727

xxiv

ftoc.indd xxiv

8/28/08 7:51:40 PM

Contents
Further Development
Runtime Connections
Component Properties
Handling Errors and Warnings
Column Properties

Other Considerations
Summary

Chapter 20: External Management and WMI Task Implementation


External Management of SSIS with Managed Code
Setting up a Test SSIS Package for Demonstration Purposes
The DTS Runtime Managed Code Library

Application Object Maintenance Operations


Package Maintenance Operations
Package Folder Maintenance
Package Role Maintenance
Package Monitoring
Package Listing
A Package Management Example

Package Log Providers


Specifying Events to Log
Programming to Log Providers

Package Configurations
Creating a Configuration
Programming the Configuration Object
Configuration Object

Windows Management Instrumentation Tasks


WMI
WMI
WMI
WMI

Reader Task Explained


Data Reader Example
Event Watcher Task
Event Watcher Task Example

Summary

Chapter 21: Using SSIS with External Applications


InfoPath Documents
ASP.NET Applications
Winform .NET Applications
Summary

732
732
735
737
739

740
740

741
741
742
743

744
745
750
752
753
755
756

765
767
768

771
772
773
774

775
776
777
782
783

786

787
788
797
802
808

xxv

ftoc.indd xxv

8/28/08 7:51:41 PM

Contents
Chapter 22: Administering SSIS
Package Configuration
Deployment Utility
Creating the Deployment Manifest
The Package Deployment Wizard

The Package Store


Creating a Central SSIS Server
Clustering SSIS
File System or the MSDB Deployment

Management Studio
Running Packages with DTExecUI
Security
Command-Line Utilities
DTExec
DTUtil

Scheduling a Package
Proxy Accounts
64-Bit Issues
Performance Counters
Summary

Chapter 23: Case Study: A Programmatic Example


What You Will Take Away
Background
Business Problem
Solution Summary
Solution Architecture
Naming Conventions and Tips
Additional SSIS Tips Before You Start a Large Project

Data Architecture
File Storage Location Setup
Bank ACH Payments
Lockbox Files
PayPal or Direct Credits to Corporate Account
Case Study Database Model
Database Setup

Case Study Load Packages


Bank File Load Package
ACH Load Package
Email Load Package
Testing

809
809
814
814
815

818
820
822
824

825
826
832
834
834
835

836
838
839
840
841

843
843
844
845
845
846
849
850

850
851
851
852
853
853
854

863
864
894
913
919

xxvi

ftoc.indd xxvi

8/28/08 7:51:41 PM

Contents
Case Study Invoice Matching Process
Matching Process Control Flow
Matching Process High-Confidence Data Flow
Matching Process Medium-Confidence Data Flow
Interpreting the Results

Creating a Parent Driver Package


Driver Package Setup
Driver Package Deployment

Summary

Index

919
920
923
928
932

934
934
935

935

937

xxvii

ftoc.indd xxvii

8/28/08 7:51:41 PM

ffirs.indd xii

11/13/08 5:01:08 PM

Professional Microsoft SQL Ser ver2008


Reporting Ser vices
Foreword ...................................................................................................

xxv

Introduction .............................................................................................

xxvii

Part I: Getting Star ted


Chapter 1: Introducing Repor ting Ser vices ......................................................3
Chapter 2: Business Intelligence Solutions ....................................................23
Chapter 3: Repor ting Ser vices Installation ....................................................39
Chapter 4: Repor ting Ser vices Architecture ..................................................65

Part II: Repor t Design


Chapter 5: Basic Repor t Design ....................................................................89
Chapter 6: Repor t Layout and F ormatting ....................................................129
Chapter 7: Designing Data Access ..............................................................177
Chapter 8: Advanced Repor t Design ............................................................227

Part III: Business Intelligence Repor ting


Chapter 9: Repor ting with Analysis Ser vices ...............................................309
Chapter 10: Repor t Solution P atterns and Recipes ......................................345

Part IV: Enabling End-User Repor ting with


Report Builder 1.0
Chapter 11: Repor t Models ........................................................................391
Chapter 12: Repor t Builder 1.0 ..................................................................419

Part V: Administering Repor ting Ser vices


Chapter 13: Content Management ..............................................................451
Chapter 14: Repor t Ser ver Administration ...................................................503
(Continues)

ffirs.indd i

11/13/08 5:01:01 PM

Part VI: Reporting Ser vices Integration and


Custom Programming
Chapter 15: Integrating Repor ts into Custom Applications ...........................541
Chapter 16: Integrating Repor ts with ShareP oint .........................................595
Chapter 17: Extending Repor ting Ser vices ..................................................635
Appendix A: RDL Object Model ..................................................................

685

Appendix B: T-SQL Command Syntax Reference .........................................

693

Appendix C: T-SQL System V ariables and Functions ....................................

715

Appendix D: MDX Reference ......................................................................

735

Index ........................................................................................................

759

ffirs.indd ii

11/13/08 5:01:02 PM

Contents
Foreword
Introduction xxvii

xxv

Part I: Getting Star ted


Chapter 1: Introducing Repor ting Ser vices
Not Y our Fathers Repor ting Tool
Who Uses Repor ting Ser vices?
Application and Repor ting Technology
Blurring the Application/Reporting Line
Information, Now!

Solution Types
Out-of-the-Box Reports
Server-Based Reports
User-Designed and Ad hoc Reports

Report Design T ools


Report Builder 2.0
Business Intelligence Development Studio

Designing Repor ts
Simple Application Integration
Launching Reports from an Application
User Interaction and Dynamic Reporting
Intranet and Internet Report Access

4
5
7
8
8

9
10
11
11

12
12
13

13
15
15
16
17

Seamless Application Integration

17

Web Application Integration


Portal Integration
Windows Application Integration

18
19
19

Managing and Customizing the Repor t Ser ver


Summary

Chapter 2: Business Intelligence Solutions


Reporting Tool Options
Scalable Architecture

ftoc.indd xv

20
21

23
24
24

11/13/08 5:08:51 PM

Contents
Corporate Repor ting
Department and P ersonal Repor ting
Ad hoc and Self-Ser vice Repor ting
BI Solution Components
Report Data Sources
The BI Data Process
The BI Maturity Continuum
Report Types
Data Complexity and Report Performance

Summary

Chapter 3: Repor ting Ser vices Installation


The Basic Installation
Installing Reporting Services
Installing the Reporting Services Samples and SQL Server Sample Databases

The Enter prise Deployment


SQL Server Editions
Named Instances
Topology
Modes
Installation Options
Command-Line Installation

Summary

Chapter 4: Repor ting Ser vices Architecture


The Repor ting Life Cycle
Authoring
Management
Delivery

Reporting Ser vices T ools


Report Designer
Report Builder
Report Builder 2.0
Third-Party Authoring Tools
Report Manager
SharePoint Libraries and Web Parts
Reporting Services Configuration Manager
SQL Server Management Applications
Command-Line Utilities
HTML Viewer

24
25
26
26
26
28
29
30
35

38

39
39
40
58

59
60
62
62
63
63
64

64

65
66
66
67
67

67
67
68
68
68
68
69
69
69
70
70

xvi

ftoc.indd xvi

11/13/08 5:08:51 PM

Contents
Report Viewer Control

Reporting Ser vices W eb Ser vice


Reporting Services Windows Service
HT TP.SYS and the HT TP Listener
The Security Sublayer
Report Manager and the Web Service
Core Processing
Service Management
WMI and the RPC Interface
Reporting Services Processors and Extensions
The Report Processor
Data Processing Extensions
Report Items
Rendering Extensions
The Scheduling and Delivery Processor
Delivery Extensions

Reporting Ser vices Application Databases


ReportServer
ReportServerTempDB

Summary

70

71
72
73
74
75
75
75
76
77
78
79
80
81
83
83

84
84
86

86

Part II: Repor t Design


Chapter 5: Basic Repor t Design
Report Design 101
Report Designer s
Report Builder 2.0
Viewing and Setting Properties
Report Design with Report Builder 2.0
Integrated Development Environment

Report Design Elements


Data Sources
Data Sets
Reports

Report Definition Language

89
90
91
92
98
99
104

108
108
108
108

109

Report Migration and Integration

110

Report Design Elements in Detail

111

Data Regions
Textboxes
Lines
Rectangles

111
111
113
113

xvii

ftoc.indd xvii

11/13/08 5:08:52 PM

Contents
Images
Subreports
The Tablix
Chart Essentials
Chart Type Categories
Gauges

113
114
116
119
120
124

Summary 128

Chapter 6: Repor t Layout and F ormatting


Report Layout T ypes
Tabular Reports
Matrix Reports
List Reports
Chart Reports
Gauge Reports and Dashboards

Page Layout
Designing Tabular Reports
Defining Table Groups
Adding Totals and Subtotals
Formatting Report Data
Introduction to Dynamic Formatting

Designing Multicolumn Repor ts


Designing Matrix Repor ts
Designing Char t Repor ts
Designing Gauge Repor ts
Converting Repor ts from Other F ormats and Products
Importing Access Reports
Designing for Extensibility

129
130
130
131
131
131
132

132
134
138
154
154
155

156
156
162
170
173
174
174

Summary 176

Chapter 7: Designing Data Access


Federating Data Sources
Linked Servers and Ad hoc Distributed Queries

Business Intelligence Repor ting


Reporting for Relational Data
Data and Quer y Basics
Data Sources
Data Sources and Query Languages

177
179
179

180
182
182
182
188

T-SQL Quer y Design


Filtering Techniques

189
197

Filtering a Query

199

xviii

ftoc.indd xviii

11/13/08 5:08:52 PM

Contents
Parameter Concepts
Filtering Data with Query Parameters
Using Stored Procedures

199
202
214

Using Other Data Sources

218

Microsoft Access
Microsoft Excel
Oracle P/L SQL
SyBase Adaptive Server

219
222
223
224

Best Practices
Summary 225

Chapter 8: Advanced Repor t Design


Configuring Headers and Footers
Aggregate Functions and Totals
Adding Totals to a Table or Matrix Report

Creating Repor t Templates


Creating Composite Repor ts
Anatomy of a Textbox
Padding and Indenting
Embedded Formatting
Designing Master/Detail Reports
Groups and Data-Set Scope

Designing Subrepor ts
Federating Data with a Subreport

Navigating Repor ts
Creating a Document Map
Links and Drill-through Reports

Reporting on Recur sive Relationships


Using Expressions and Custom Code
Using the Expression Builder
Calculated Fields
Conditional Expressions
IIF() Is Your Friend
Using Custom Code

Chart Repor ts
Chart Types
Column Charts
Area and Line Charts
Pie and Doughnut Charts
Bubble and Stock Charts
The Anatomy of a Chart

225

227
228
230
232

235
238
239
240
240
244
244

252
253

259
259
261

263
268
269
271
273
274
277

282
283
285
288
288
290
291

xix

ftoc.indd xix

11/13/08 5:08:52 PM

Contents
Chart Design Basics
Adding a Data Series
Adding a Secondary Axis
Using Multiple Chart Areas

292
298
299
302

Summary 304

Part III: Business Intelligence Repor ting


Chapter 9: Repor ting with Analysis Ser vices
Why Analysis Ser vices for Repor ting?
Using Repor ting Ser vices with Analysis Ser vices Data
Multidimensional Expression Language
MDX: Simple or Complex?
The MDX Builder

Non-Additive Measures
Using the Aggregate Function

MDX Proper ties and Cube F ormatting


Drill-Through Repor ts
Cube Report Actions
Parameter Safety Precautions

Best Practices and Pro visions


Summary 343

Chapter 10: Repor t Solution P atterns and Recipes


Reporting Project Requirement Guidelines
Key Success Factors
Reporting on Existing Data Sources
Building an End-to-End Reporting Solution
Report Specifications
Development Phases
Migrating and Converting Reports
Working with the Strengths and Limitations of the Architecture

Report Recipes
Multiple Criterion Report Filtering
Customizing Gauges with External Images
Creating a Business Scorecard
Reporting on SharePoint 3.0 List Data
Report Localization
Dynamic Grouping

309
309
311
312
312
313

336
338

339
340
342
342

342

345
346
346
348
348
350
351
354
355

357
357
360
362
366
371
377

xx

ftoc.indd xx

11/13/08 5:08:53 PM

Contents
Dynamic Fields and Columns
Using Advanced and Third-Party Controls for Parameter Selection
Creating Sparklines

380
382
384

Summary 386

Part IV: Enabling End-User Repor ting with


Report Builder 1.0
Chapter 11: Repor t Models
Getting Star ted
Creating the Report Model Data Source
Building a Data Source View
Manipulating the Data Source View

Building the Repor t Model


Using the Report Model Wizard
Working with Reporting Services Report Models
Deploying the Report Model

Building Report Models from Analysis Ser vices Databases


Summary 416

391
391
392
395
398

404
404
408
413

414

Chapter 12: Repor t Builder 1.0

419

Report Model Over view


Accessing Repor t Builder 1.0
Building Reports

419
420
421

Table Layout
Matrix Layout
Chart Layout

Formatting Repor ts
Adding Text
Adjusting Column Width and Alignment
Modifying Font and Background Color

Filtering and Sor ting Repor ts


Filtering Reports
Sorting Reports

Adding Calculations with Expressions


Administration 446
The Future of Repor t Builder 1.0
Summary 448

422
425
430

434
434
435
436

438
438
443

443
447

xxi

ftoc.indd xxi

11/13/08 5:08:53 PM

Contents
Part V: Administering Repor ting Ser vices
Chapter 13: Content Management

451

Using Repor t Manager


Content-Management Activities

452
456

Folders
Shared Data Sources
Report Models
Reports
Report Resources
Shared Schedules

Item-Level Security
Content-Management Automation
The RS Utility
Reporting Services Scripts
The RSScripter

457
461
463
466
480
480

483
492
492
494
500

Summary 501

Chapter 14: Repor t Ser ver Administration


Security
Account Management
System-Level Roles
Surface Area Management

Backup and Reco very


Application Databases
Encryption Keys
Configuration Files
Other Items

503
503
504
508
510

511
511
513
515
516

Monitoring 516
Set-up Logs
Windows Application Event Logs
Trace Logs
Execution Logs
Performance Counters
Server Management Reports

516
517
517
520
522
527

Configuration 528
Memory Management
URL Reservations
E-mail Delivery
Rendering Extensions

528
529
531
533

xxii

ftoc.indd xxii

11/13/08 5:08:53 PM

Contents
My Reports

535

Summary 537

Part VI: Reporting Ser vices Integration and


Custom Programming
Chapter 15: Integrating Repor ts into Custom Applications
URL Access
URL Syntax
Accessing Reporting Services Objects
Reporting Services URL Parameters
Passing Report Information through the URL

Programmatic Rendering
Common Scenarios
Rendering through Windows
Rendering to the Web

Using the MicrosoftReportViewer Control


Embedding a Server-Side Report in a Windows Application

541
542
542
543
549
555

557
558
559
578

587
590

Summary 594

Chapter 16: Integrating Repor ts with ShareP oint


The ShareP oint Technologies
Windows SharePoint Services (WSS)
Microsoft Office SharePoint Server (MOSS)
SharePoint Web Parts

Native Mode

595
596
597
597
598

598

Installation
Report Viewer
Report Explorer

598
600
601

Integrated Mode

603

Installation/Configuration
Publishing Reports
SharePoint Site Settings
Report Models
Report Builder 1.0
Report Management
SQL Server Reporting Services Report Viewer for Integrated Mode

Architecture 631
Native Mode ver sus Integrated Mode
Summary 634

603
611
620
621
624
626
629

632

xxiii

ftoc.indd xxiii

11/13/08 5:08:54 PM

Contents
Chapter 17: Extending Repor ting Ser vices
Extension through Interfaces
What Is an Interface?
Interface Language Differences
Data Processing Extensions A Detailed Look

Creating a Custom Data Processing Extension


The Scenario
Creating and Setting up the Project
Creating the DataSetConnection Object
Creating the DataSetParameter Class
Implementing IDataParameter
Creating the DataSetParameterCollection Class
Creating the DataSetCommand Class
Creating the DataReader Object
Installing the DataSetDataProcessing Extension
Testing the DataSetDataExtension

635
637
637
638
640

643
643
644
647
655
656
658
660
673
677
680

Summary 684

Appendix A: RDL Object Model

685

Appendix B: T-SQL Command Syntax Reference

693

Appendix C: T-SQL System V ariables and Functions

715

Appendix D: MDX Reference 735


Index 759

xxiv

ftoc.indd xxiv

11/13/08 5:08:54 PM

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy