Pro SQL Server 2012 BI Solutions
Contents at a Glance
Contents
Foreword
About the Authors
About the Technical Reviewers
Acknowledgments
Chapter 1: Business Intelligence Solutions
Who Should Read This Book?
What Is a Business Intelligence Solution?
Step 1: Interview and Identify Data
Step 2: Plan the BI Solution
Step 3: Create a Data Warehouse
Step 4: Create an ETL Process
Step 5: Create Cubes
Step 6: Create Reports
Step 7: Test and Tune the Solution
Step 8: Approve, Release and Prepare
Practice Exercises and More
Downloadable Content
Our Example Scenarios
Setup Instructions
Think Small, Win Big
Rapid Application Development for BI Solutions
Moving On
What’s Next?
Chapter 2: A Big-Picture Overview
The 10,000-Foot View
Interviewing and Isolating Data
Plan the Solution
Creating Planning Documents
Adding Documents to Visual Studio
Creating Visual Studio Solutions and Projects
Using Visual Studio
Creating a Blank Solution
Working with the Blank Solution
Creating the Data Warehouse
An Example Data Warehouse
Using SQL Code to Create a Data Warehouse
Create the Database
Create the Tables
Using the Identity Option
Adding Primary Key Constraints
Adding Foreign Key Constraints
Running SQL Code from Visual Studio
Create the ETL Process
ETL with an SSIS Project
Creating an SSIS Package
Outlining the Control Flow Tasks
SSIS Connections
Configuring a Flat File Connection
Configuring a SQL Server Connection
Configuring an Execute SQL Task
Configuring Data Flow Tasks
Configuring Additional Data Flows
Configuring a Data Source
Executing an SSIS Task
Completing the Package Execution
Creating a Cube
Making a Connection to the Data Warehouse
Creating a Data Source View
Creating Dimensions
Creating Cubes
Deploying and Processing
Creating Reports
Using the SSRS Wizard
Manually Creating SSRS Reports
Testing the Solution
Approve, Release, and Prepare
Moving On
What’s Next?
Chapter 3: Planning Solutions
Outline the Steps in the Process
Interviewing
Why Do We Need It?
What Are We Building?
Additional Considerations for Determining What You Will Build
Determining Your Ability to Complete the Solution
How Long Will It Take to Build?
How Will We Build It?
Who Will We Get to Build It?
When Will We Need It?
How Will We Finish It?
“Hey, Wait! I’m a Developer, Not a Manager”
Documenting the Requirements
Locating Data
Defining the Roles
Defining the Team
Determining the Schedule
The IT, Security and Licensing Requirements
Estimating the Cost
Documenting the Solution Plan
Implementation
Moving On
What’s Next?
Chapter 4: Designing a Data Warehouse
What Is a Data Warehouse?
What Is a Data Mart?
Competing Definitions
Starting with an OLTP Design
A Typical OLTP Database Design
Normalized Tables
Table Relationships
Many-to-Many Tables
One-to-Many Tables
Parent–Child One-to-Many Tables
A Typical Data Warehouse Database Design
Measures
Granularity
The Fact Table
Dimensions
Stars and Snow fl akes
Performance Considerations
Comparing Designs
Foreign Keys
Missing Features
Dimensional Patterns
Standard Dimensions
Fact or Degenerate Dimensions
Time Dimensions
Tracking Dates and Times
Using DateTime Keys
Having It All
Using Foreign Key Constraints
Role-Playing Dimensions
Parent–Child Dimensions
Junk Dimensions
Many-to-Many Dimensions
Fact vs. Bridge Tables
Changing the Connection
Direct Many-to-Many Relationships
Indirect Many-to-Many Relationships
The Takeaway
Conformed Dimensions
Adding Surrogate Keys
Slowly Changing Dimensions
Type I
Type II
Type III
Moving On
What’s Next?
Chapter 5: Creating a Data Warehouse
SQL Server Management Studio
Connecting to Servers
Server Aliases
Configuration Manager
Management Studio Windows
Object Explorer
The Query Window
Changing the Query Window Focus
Executing a Query
Creating Data Warehouse Database
Setting the Database Owner
Setting the Database Size
Setting the Recovery Model
Performing Database Backups
Shrinking Log Files
Keeping Data Warehouse Backups
Using the Filegroups Option
Creating Tables
Using the Table Designer
Generating SQL Scripts
Changing an Existing Table
Using the Diagramming Tool
Creating New Tables with the Diagram Tool
Creating Foreign Keys with the Diagramming Tool
Using the Query Window
Creating a Date Dimension Table
Getting Organized
Backing Up the Data Warehouse
Scripting the Database
Organizing Your Files with Visual Studio
Moving On
What’s Next?
Chapter 6: ETL Processing with SQL
Performing the ETL Programming
Deciding on Full or Incremental Loading
Isolating the Data to Be Extracted
Formatting Your Code
Identifying the Transformation Logic
Programming Your Transformation Logic
Reducing the Data
Using Column Aliases
Converting the Data Types
Looking Up Surrogate Key Values
Provide Conformity
Generate Date Data
Dealing with Nulls
Nulls in a Fact Table
Nulls in a Dimension Table
A Null Lookup Table
The SQL Query Designer
Updating Your BI Documentation
Building an ETL Script
Working in the Abstract
Views
Stored Procedures
User-De fined Functions
Moving On
What’s Next?
Chapter 7: Beginning the ETL Process with SSIS
Starting Your SSIS Project
Adding a Project to an Existing Solution
Renaming Your SSIS Package
The Anatomy of an SSIS Package
The Control Flow Tab
The Data Flow Tab
Data Sources
Data Transformations
Data Destinations
Using Sequence Containers
Using Precedence Constraint Arrows
SSIS Variables
Outlining Your ETL Process
Data Connections
The File Connection Manager
The OLE DB Connection Manager
The ADO.NET Connection Manager
Configuring a Connection
Execute SQL Tasks
Editing Your Execute SQL Task
Executing Your Execute SQL Tasks
The Progress/Execution Results Tabs
Resetting Your Destination Database
Moving On
What’s Next?
Chapter 8: Concluding the ETL Process with SSIS
Data Flows
Outlining a Data Flow Task
Con figuring the Data Source
The OLE DB Source Editor
The Connection Manager Page
SQL Command and SQL Command from a Variable
The Columns Manager Page
The Error Output Page
Data Flow Paths
Error Outputs Paths
Configuring the Data Destination
The Connection Manager Page
Mappings Page
Error Output Page
Executing the Entire Package
Moving On
What’s Next?
Chapter 9: Beginning the SSAS Project
SQL Server vs. Analysis Server Databases
OLAP Cubes vs. Reporting Tables
SQL Server vs. Analysis Server Applications
SSAS Projects
Data Sources
Define a Connection
Impersonation Information
Service Account Option
Current User Account Option
Inherit Option
Specific Windows Account Option
Data Source Views
The Data Source View Wizard
Select a Data Source
Name Matching
Select Tables and Views
Completing the Wizard
The Data Source View Designer
The Explore Data Option
Friendly Names
Named Queries
Named Calculation
Relationships
Dimensions
The Dimension Wizard
Select Creation Method
Specify Source Information
Select Related Tables
Select Dimension Attributes
Setting Attribute Types
Completing the New Dimension Wizard
Building the SSAS Project
Moving On
What’s Next?
Chapter 10: Configuring Dimensions with SSAS
The Dimension Designer
Dimension Structure Tab
The Attributes Pane
The Hierarchies Pane
Creating Hierarchies
Configuring Hierarchies
Attribute Relationships Tab
Configuring Relationships
Testing Your Progress
Translations Tab
Browser Tab
Build, Deploy, and Process
Building
Deploying
The Build and Debugging Pages
The Deployment Page
Deployment Target Folder
Deploying from Visual Studio
The Deployment Process Window
Processing
Browsing the Dimension
Moving On
What’s Next?
Chapter 11: Creating and Configuring SSAS Cubes
Creating Cubes
Processing the Cube
Configuring Cubes
The Browser Tab
Validate the Measures
Review the Dimensions
Validating the Results
The Cube Structure Tab
Common Measure Properties
Measure Group Properties
The Dimension Usage Tab
Configuring a Relationship
The Calculations Tab
Adding a Calculated Member
Configuring a Calculated Member
Calculated Members vs. Derived Members
Making a Test Copy of a Cube
KPIs
Moving On
What’s Next?
Chapter 12: Additional Cube and Dimension Configurations
Additional Cube Configurations
Actions
URL Actions
Drillthrough Actions
Report Actions
Partitions
Partition Sources
The Partition Wizard
Partition Storage Designs
ROLAP and HOLAP
Partition Storage Settings
Aggregations
The Aggregation Design Wizard
The Set Aggregation Options Dialog Window
Perspectives
Translations
Browser
Additional Dimension Configurations
Parent-Child Dimensions
Role-Playing Dimensions
Reference Dimensions
Managing Your Cubes and Dimensions
SQL Server Management Studio
Visual Studio (Live)
Moving On
What’s Next?
Chapter 13: Creating Reports with SQL Queries
Identifying the Data
Joining Table Data
Ordering Results
Formatting Results Using SQL Functions
Filtering Results
Adding Dynamic Filters with Parameters
Adding Aggregations
Using Subqueries
Creating KPI Queries
Adding Abstraction Layers
Using Views
Using Stored Procedures
Using Your Code in Reporting Applications
Moving On
What’s Next?
Chapter 14: Reporting with MDX Queries
Key Concepts and Terms
Programming with MDX
Comments
Basic and Raw Syntax
Running Your MDX Code
Optional Syntax
Default Members
Using Key vs. Name Identifiers
Using the Axis 0 and 1 Instead of Column and Row
Cells and Tuples
Calculated Members
Member Properties
Members and Levels
The NonEmpty Function
Member and Level Paths
Common Functions
PrevMember and NextMember Functions
The Children Function
The Parent Function
The CurrentMember Function
The Order Function
The CrossJoin Operator (*) and Function
Joining More than Two Dimensions
Where Clause
Using Your Code in Reporting Applications
Moving On
What Next?
Chapter 15: Reporting with Microsoft Excel
Microsoft’s BI Reporting
Excel Reports from the Data Warehouse
Creating a Connection
The Data Connection Wizard
Creating a Report
Configuring a Report
Changing Connection Properties
Reconfiguring a Connection
Using Stored Procedures
Working with Excel Reports from a Cube
Connecting to Your Cube
Testing Your Reports
Creating Charts
Adding a Header
Saving to PDF
Moving On
What’s Next?
Chapter 16: Creating Reports with SSRS
SSRS Architecture
Developer Tools
Report Builder
Visual Studio
The Administrative Services
SSRS Web Applications
SSRS Services
SSRS Databases
SSRS Configuration Manager
Creating SSRS Objects
Data Sources
Datasets
Reports
Configuring Report Data
Adding Report Items
Configuring Report Items
Previewing Reports
Deploying the Report
Managing the Report
Moving On
What’s Next?
Chapter 17: Configuring Reports with SSRS
Creating a Report Template
Adding a Header and Footer
Setting Report Properties
Page Size and Report Margins
Designing the Header
Rectangles
Textboxes
Images
Lines
Renaming Report Items
Using Expressions
Category and Item Panes
Expression Editing Pane
Placeholders
Variables
Completing the Header
Configuring the Footer
Saving the Report Template
Using Network Templates
Using Local Templates
Moving On
What’s Next
Chapter 18: Testing and Tuning BI Solutions
Testing the BI Solution
Validation
Objective Verification
Improvement Identification
Tuning the BI Solution
ETL Performance
ETL Hardware Options
ETL Software Options
Processing Performance
Filter Data in SSAS
SSAS Hardware Options
Reporting Performance
Rendering Options
Filtering Data in SSRS
Indexing Options
Archiving Stored Data
Caching Report Data
Common Design Strategies
Performance Measurements
Absolute Performance
Relative Performance Measurements
Measuring Performance with SQL Profiler
Creating a Profiler Trace
Running a Trace
An Example Scenario
Creating a Metadata Database
Moving On
Chapter 19: Approve, Release, and Prepare
The End of the Cycle
The Final Approval Process
The Sign-Off Document
Announcing the Release
The Press Release Title
The Press Release Body
The Press Release Boilerplate
Releasing the Solution
Collecting the Solution Artifacts
Deploying the Files
Manual and Automated Deployment
Deploying the Data Warehouse with SQL Code
Deploying the SSIS ETL Process
Combining the SQL Server and SSIS Deployment Code
Deploying the SSAS Database
Deploying the SSRS Reports
Using SSIS Packages Instead of Batch Files
Release Documentation
SDKs
Developer Specifications
User Documentation
Style Guides
User Manuals
The Anatomy of a User Manual
Subject Headings
Step-by-Step Instructions
Figures
Figure Captions
User Manual Testing
Help Files
PDF Files
HTML Files
User Training
Say Thank You
Moving On
What’s Next?
Index