- SQL Server Reference Guide
- Introduction
- SQL Server Reference Guide Overview
- Table of Contents
- Microsoft SQL Server Defined
- SQL Server Editions
- SQL Server Access
- Informit Articles and Sample Chapters
- Online Resources
- Microsoft SQL Server Features
- SQL Server Books Online
- Clustering Services
- Data Transformation Services (DTS) Overview
- Replication Services
- Database Mirroring
- Natural Language Processing (NLP)
- Analysis Services
- Microsot SQL Server Reporting Services
- XML Overview
- Notification Services for the DBA
- Full-Text Search
- SQL Server 2005 - Service Broker
- Using SQL Server as a Web Service
- SQL Server Encryption Options Overview
- SQL Server 2008 Overview
- SQL Server 2008 R2 Overview
- SQL Azure
- The Utility Control Point and Data Application Component, Part 1
- The Utility Control Point and Data Application Component, Part 2
- Microsoft SQL Server Administration
- The DBA Survival Guide: The 10 Minute SQL Server Overview
- Preparing (or Tuning) a Windows System for SQL Server, Part 1
- Preparing (or Tuning) a Windows System for SQL Server, Part 2
- Installing SQL Server
- Upgrading SQL Server
- SQL Server 2000 Management Tools
- SQL Server 2005 Management Tools
- SQL Server 2008 Management Tools
- SQL Azure Tools
- Automating Tasks with SQL Server Agent
- Run Operating System Commands in SQL Agent using PowerShell
- Automating Tasks Without SQL Server Agent
- Storage – SQL Server I/O
- Service Packs, Hotfixes and Cumulative Upgrades
- Tracking SQL Server Information with Error and Event Logs
- Change Management
- SQL Server Metadata, Part One
- SQL Server Meta-Data, Part Two
- Monitoring - SQL Server 2005 Dynamic Views and Functions
- Monitoring - Performance Monitor
- Unattended Performance Monitoring for SQL Server
- Monitoring - User-Defined Performance Counters
- Monitoring: SQL Server Activity Monitor
- SQL Server Instances
- DBCC Commands
- SQL Server and Mail
- Database Maintenance Checklist
- The Maintenance Wizard: SQL Server 2000 and Earlier
- The Maintenance Wizard: SQL Server 2005 (SP2) and Later
- The Web Assistant Wizard
- Creating Web Pages from SQL Server
- SQL Server Security
- Securing the SQL Server Platform, Part 1
- Securing the SQL Server Platform, Part 2
- SQL Server Security: Users and other Principals
- SQL Server Security – Roles
- SQL Server Security: Objects (Securables)
- Security: Using the Command Line
- SQL Server Security - Encrypting Connections
- SQL Server Security: Encrypting Data
- SQL Server Security Audit
- High Availability - SQL Server Clustering
- SQL Server Configuration, Part 1
- SQL Server Configuration, Part 2
- Database Configuration Options
- 32- vs 64-bit Computing for SQL Server
- SQL Server and Memory
- Performance Tuning: Introduction to Indexes
- Statistical Indexes
- Backup and Recovery
- Backup and Recovery Examples, Part One
- Backup and Recovery Examples, Part Two: Transferring Databases to Another System (Even Without Backups)
- SQL Profiler - Reverse Engineering An Application
- SQL Trace
- SQL Server Alerts
- Files and Filegroups
- Partitioning
- Full-Text Indexes
- Read-Only Data
- SQL Server Locks
- Monitoring Locking and Deadlocking
- Controlling Locks in SQL Server
- SQL Server Policy-Based Management, Part One
- SQL Server Policy-Based Management, Part Two
- SQL Server Policy-Based Management, Part Three
- Microsoft SQL Server Programming
- An Outline for Development
- Database
- Database Services
- Database Objects: Databases
- Database Objects: Tables
- Database Objects: Table Relationships
- Database Objects: Keys
- Database Objects: Constraints
- Database Objects: Data Types
- Database Objects: Views
- Database Objects: Stored Procedures
- Database Objects: Indexes
- Database Objects: User Defined Functions
- Database Objects: Triggers
- Database Design: Requirements, Entities, and Attributes
- Business Process Model Notation (BPMN) and the Data Professional
- Business Questions for Database Design, Part One
- Business Questions for Database Design, Part Two
- Database Design: Finalizing Requirements and Defining Relationships
- Database Design: Creating an Entity Relationship Diagram
- Database Design: The Logical ERD
- Database Design: Adjusting The Model
- Database Design: Normalizing the Model
- Creating The Physical Model
- Database Design: Changing Attributes to Columns
- Database Design: Creating The Physical Database
- Database Design Example: Curriculum Vitae
- NULLs
- The SQL Server Sample Databases
- The SQL Server Sample Databases: pubs
- The SQL Server Sample Databases: NorthWind
- The SQL Server Sample Databases: AdventureWorks
- The SQL Server Sample Databases: Adventureworks Derivatives
- UniversalDB: The Demo and Testing Database, Part 1
- UniversalDB: The Demo and Testing Database, Part 2
- UniversalDB: The Demo and Testing Database, Part 3
- UniversalDB: The Demo and Testing Database, Part 4
- Getting Started with Transact-SQL
- Transact-SQL: Data Definition Language (DDL) Basics
- Transact-SQL: Limiting Results
- Transact-SQL: More Operators
- Transact-SQL: Ordering and Aggregating Data
- Transact-SQL: Subqueries
- Transact-SQL: Joins
- Transact-SQL: Complex Joins - Building a View with Multiple JOINs
- Transact-SQL: Inserts, Updates, and Deletes
- An Introduction to the CLR in SQL Server 2005
- Design Elements Part 1: Programming Flow Overview, Code Format and Commenting your Code
- Design Elements Part 2: Controlling SQL's Scope
- Design Elements Part 3: Error Handling
- Design Elements Part 4: Variables
- Design Elements Part 5: Where Does The Code Live?
- Design Elements Part 6: Math Operators and Functions
- Design Elements Part 7: Statistical Functions
- Design Elements Part 8: Summarization Statistical Algorithms
- Design Elements Part 9:Representing Data with Statistical Algorithms
- Design Elements Part 10: Interpreting the Data—Regression
- Design Elements Part 11: String Manipulation
- Design Elements Part 12: Loops
- Design Elements Part 13: Recursion
- Design Elements Part 14: Arrays
- Design Elements Part 15: Event-Driven Programming Vs. Scheduled Processes
- Design Elements Part 16: Event-Driven Programming
- Design Elements Part 17: Program Flow
- Forming Queries Part 1: Design
- Forming Queries Part 2: Query Basics
- Forming Queries Part 3: Query Optimization
- Forming Queries Part 4: SET Options
- Forming Queries Part 5: Table Optimization Hints
- Using SQL Server Templates
- Transact-SQL Unit Testing
- Index Tuning Wizard
- Unicode and SQL Server
- SQL Server Development Tools
- The SQL Server Transact-SQL Debugger
- The Transact-SQL Debugger, Part 2
- Basic Troubleshooting for Transact-SQL Code
- An Introduction to Spatial Data in SQL Server 2008
- Performance Tuning
- Performance Tuning SQL Server: Tools and Processes
- Performance Tuning SQL Server: Tools Overview
- Creating a Performance Tuning Audit - Defining Components
- Creating a Performance Tuning Audit - Evaluation Part One
- Creating a Performance Tuning Audit - Evaluation Part Two
- Creating a Performance Tuning Audit - Interpretation
- Creating a Performance Tuning Audit - Developing an Action Plan
- Understanding SQL Server Query Plans
- Performance Tuning: Implementing Indexes
- Performance Monitoring Tools: Windows 2008 (and Higher) Server Utilities, Part 1
- Performance Monitoring Tools: Windows 2008 (and Higher) Server Utilities, Part 2
- Performance Monitoring Tools: Windows System Monitor
- Performance Monitoring Tools: Logging with System Monitor
- Performance Monitoring Tools: User Defined Counters
- General Transact-SQL (T-SQL) Performance Tuning, Part 1
- General Transact-SQL (T-SQL) Performance Tuning, Part 2
- General Transact-SQL (T-SQL) Performance Tuning, Part 3
- Performance Monitoring Tools: An Introduction to SQL Profiler
- Performance Tuning: Introduction to Indexes
- Performance Monitoring Tools: SQL Server 2000 Index Tuning Wizard
- Performance Monitoring Tools: SQL Server 2005 Database Tuning Advisor
- Performance Monitoring Tools: SQL Server Management Studio Reports
- Performance Monitoring Tools: SQL Server 2008 Activity Monitor
- The SQL Server 2008 Management Data Warehouse and Data Collector
- Performance Monitoring Tools: Evaluating Wait States with PowerShell and Excel
- Practical Applications
- Choosing the Back End
- The DBA's Toolbox, Part 1
- The DBA's Toolbox, Part 2
- Scripting Solutions for SQL Server
- Building a SQL Server Lab
- Using Graphics Files with SQL Server
- Enterprise Resource Planning
- Customer Relationship Management (CRM)
- Building a Reporting Data Server
- Building a Database Documenter, Part 1
- Building a Database Documenter, Part 2
- Data Management Objects
- Data Management Objects: The Server Object
- Data Management Objects: Server Object Methods
- Data Management Objects: Collections and the Database Object
- Data Management Objects: Database Information
- Data Management Objects: Database Control
- Data Management Objects: Database Maintenance
- Data Management Objects: Logging the Process
- Data Management Objects: Running SQL Statements
- Data Management Objects: Multiple Row Returns
- Data Management Objects: Other Database Objects
- Data Management Objects: Security
- Data Management Objects: Scripting
- Powershell and SQL Server - Overview
- PowerShell and SQL Server - Objects and Providers
- Powershell and SQL Server - A Script Framework
- Powershell and SQL Server - Logging the Process
- Powershell and SQL Server - Reading a Control File
- Powershell and SQL Server - SQL Server Access
- Powershell and SQL Server - Web Pages from a SQL Query
- Powershell and SQL Server - Scrubbing the Event Logs
- SQL Server 2008 PowerShell Provider
- SQL Server I/O: Importing and Exporting Data
- SQL Server I/O: XML in Database Terms
- SQL Server I/O: Creating XML Output
- SQL Server I/O: Reading XML Documents
- SQL Server I/O: Using XML Control Mechanisms
- SQL Server I/O: Creating Hierarchies
- SQL Server I/O: Using HTTP with SQL Server XML
- SQL Server I/O: Using HTTP with SQL Server XML Templates
- SQL Server I/O: Remote Queries
- SQL Server I/O: Working with Text Files
- Using Microsoft SQL Server on Handheld Devices
- Front-Ends 101: Microsoft Access
- Comparing Two SQL Server Databases
- English Query - Part 1
- English Query - Part 2
- English Query - Part 3
- English Query - Part 4
- English Query - Part 5
- RSS Feeds from SQL Server
- Using SQL Server Agent to Monitor Backups
- Reporting Services - Creating a Maintenance Report
- SQL Server Chargeback Strategies, Part 1
- SQL Server Chargeback Strategies, Part 2
- SQL Server Replication Example
- Creating a Master Agent and Alert Server
- The SQL Server Central Management System: Definition
- The SQL Server Central Management System: Base Tables
- The SQL Server Central Management System: Execution of Server Information (Part 1)
- The SQL Server Central Management System: Execution of Server Information (Part 2)
- The SQL Server Central Management System: Collecting Performance Metrics
- The SQL Server Central Management System: Centralizing Agent Jobs, Events and Scripts
- The SQL Server Central Management System: Reporting the Data and Project Summary
- Time Tracking for SQL Server Operations
- Migrating Departmental Data Stores to SQL Server
- Migrating Departmental Data Stores to SQL Server: Model the System
- Migrating Departmental Data Stores to SQL Server: Model the System, Continued
- Migrating Departmental Data Stores to SQL Server: Decide on the Destination
- Migrating Departmental Data Stores to SQL Server: Design the ETL
- Migrating Departmental Data Stores to SQL Server: Design the ETL, Continued
- Migrating Departmental Data Stores to SQL Server: Attach the Front End, Test, and Monitor
- Tracking SQL Server Timed Events, Part 1
- Tracking SQL Server Timed Events, Part 2
- Patterns and Practices for the Data Professional
- Managing Vendor Databases
- Consolidation Options
- Connecting to a SQL Azure Database from Microsoft Access
- SharePoint 2007 and SQL Server, Part One
- SharePoint 2007 and SQL Server, Part Two
- SharePoint 2007 and SQL Server, Part Three
- Querying Multiple Data Sources from a Single Location (Distributed Queries)
- Importing and Exporting Data for SQL Azure
- Working on Distributed Teams
- Professional Development
- Becoming a DBA
- Certification
- DBA Levels
- Becoming a Data Professional
- SQL Server Professional Development Plan, Part 1
- SQL Server Professional Development Plan, Part 2
- SQL Server Professional Development Plan, Part 3
- Evaluating Technical Options
- System Sizing
- Creating a Disaster Recovery Plan
- Anatomy of a Disaster (Response Plan)
- Database Troubleshooting
- Conducting an Effective Code Review
- Developing an Exit Strategy
- Data Retention Strategy
- Keeping Your DBA/Developer Job in Troubled Times
- The SQL Server Runbook
- Creating and Maintaining a SQL Server Configuration History, Part 1
- Creating and Maintaining a SQL Server Configuration History, Part 2
- Creating an Application Profile, Part 1
- Creating an Application Profile, Part 2
- How to Attend a Technical Conference
- Tips for Maximizing Your IT Budget This Year
- The Importance of Blue-Sky Planning
- Application Architecture Assessments
- Transact-SQL Code Reviews, Part One
- Transact-SQL Code Reviews, Part Two
- Cloud Computing (Distributed Computing) Paradigms
- NoSQL for the SQL Server Professional, Part One
- NoSQL for the SQL Server Professional, Part Two
- Object-Role Modeling (ORM) for the Database Professional
- Business Intelligence
- BI Explained
- Developing a Data Dictionary
- BI Security
- Gathering BI Requirements
- Source System Extracts and Transforms
- ETL Mechanisms
- Business Intelligence Landscapes
- Business Intelligence Layouts and the Build or Buy Decision
- A Single Version of the Truth
- The Operational Data Store (ODS)
- Data Marts – Combining and Transforming Data
- Designing Data Elements
- The Enterprise Data Warehouse — Aggregations and the Star Schema
- On-Line Analytical Processing (OLAP)
- Data Mining
- Key Performance Indicators
- BI Presentation - Client Tools
- BI Presentation - Portals
- Implementing ETL - Introduction to SQL Server 2005 Integration Services
- Building a Business Intelligence Solution, Part 1
- Building a Business Intelligence Solution, Part 2
- Building a Business Intelligence Solution, Part 3
- Tips and Troubleshooting
- SQL Server and Microsoft Excel Integration
- Tips for the SQL Server Tools: SQL Server 2000
- Tips for the SQL Server Tools – SQL Server 2005
- Transaction Log Troubles
- SQL Server Connection Problems
- Orphaned Database Users
- Additional Resources
- Tools and Downloads
- Utilities (Free)
- Tool Review (Free): DBDesignerFork
- Aqua Data Studio
- Microsoft SQL Server Best Practices Analyzer
- Utilities (Cost)
- Quest Software's TOAD for SQL Server
- Quest Software's Spotlight on SQL Server
- SQL Server on Microsoft's Virtual PC
- Red Gate SQL Bundle
- Microsoft's Visio for Database Folks
- Quest Capacity Manager
- SQL Server Help
- Visual Studio Team Edition for Database Professionals
- Microsoft Assessment and Planning Solution Accelerator
- Aggregating Server Data from the MAPS Tool
In SQL Server 2000, Microsoft offered a powerful Business Intelligence tool they called Analysis Service. This feature was greatly enhanced in SQL Server 2005. Both versions, starting with the Standard Edition, contain this software as part of the standard licensing — there isn't anything else to buy to use it. You will, of course, have to pay for each user or processor, but if a user accesses both SQL Server and Analysis Services, you won't have to get a separate license for each.
In this overview I'll provide an overview of Business Intelligence and Analysis Services in the two versions. I'll also cover some of the vocabulary that you need to navigate Microsoft's documentation, as well as those of other industry vendors. I have an entire section on creating your own Business Intelligence system that you can read here.
Let's start out with a definition of Business Intelligence software, as opposed to the database application software you are already familiar with. In database applications, a front-end program of some sort (even if it is a web page) presents fields for a user to enter or read. The application connects directly to a database on one or more servers, or a "middle tier" intercepts the call and accesses, enters or changes the data on the application's behalf. This is usually in short bursts, no more than a few rows of specific data at a time. The data is stored in relational tables, which are highly normalized. Normalized in this case means that the data is broken out to many tables, related by a "key,"which is just numbers or text that represents a record in another table. You can read more about that here.
The following data represents some items from a car parts store sales table. It’s normalized, to some degree, which means that data is pointed to rather than stored over and over — the "key" points to another table, so that you could update one key record in the other table and instantly keep all the data current on the screen for the user when it is displayed.
Sales Table:
Sales Key |
Item Key |
Store Key |
Salesperson Key |
Date Sold |
1 |
2 |
1 |
2 |
01/01/03 |
2 |
4 |
7 |
4 |
03/15/02 |
Item Table:
Item Key |
Item Name |
Catalog Number |
1 |
BuckSpeed High Impacts |
17593 |
2 |
BuckSpeed Low Profiles |
72342 |
This is what the user will see when the application reads the data from the different tables, linking the first record (Sales Key number 1) with the other tables. In this case it reads the Item Name from the Item table, where the Item Key is the same in both the Sales table and the Item table. That way the text is shown to the users, but only the numbers have to be stored.
Record 1 Shown to user:
Sale Number |
Item |
Store |
Salesperson |
Date Sold |
1 |
BuckSpeed Low Profiles |
Tampa, FL |
John Smith |
01/01/03 |
If you would like to rename item number 2 to something like "BuckSpeed Super-Low Profiles,"you can just change the Item Name entry in the Item table for record number 2. Since the tables "fly together" when the application reads them, all of the "old" sales records will instantly change to the new number.
This arrangement of data is very efficient for applications that work with small bits of data very often. These applications are called On-Line Transaction Processing, or OLTP for short.
If you examine this table you’ll see that it’s fairly two-dimensional. You can only look at the data in rows or columns. It isn’t inherently calculated in any way. It’s kind of wide, in that it stores many attributes of the data in one set of columns.
A Business Intelligence application works slightly different. Although there is an interface the user chooses, they don't enter data, other than to specify what they want to see. The data that the user works with isn't very normalized. It has a different shape and storage method altogether. Even the levels of storage are different.
Most often in Business Intelligence (BI) applications you are working with historical data. So we won't change the name of the Item we sold, we'll just record that on a certain date a certain tire was sold to a certain customer. So the record for that sale looks more like the record shown to the user:
Item |
Store |
Salesperson |
Date Sold |
BuckSpeed Low Profiles |
Tampa, FL |
John Smith |
01/01/03 |
And many times the data is further modified to show groups of data, rather than an individual record. You may not care that a particular tire sold on that day, but you might want to know how many were sold on that day across all stores, or perhaps by which salespeople. The data begins to shape itself into a pattern of not very columns but many rows (skinny and deep), with the numbers of the combinations of the way you want to group things in the middle, joining them once again by a key. This is often called a "star" shape. If you combine many of these tables together, they can be called a "snowflake" arrangement.
When these shapes of data (stored in a regular database) are combined with an engine that can perform the calculations and present them to the user in various views, called dimensions, this structure is often called a "cube." Think of turning a Rubik's cube puzzle and you'll get the idea of how you can manipulate the data to show sales by salesperson, by region, by date and so on. This is called On-Line Analytical Processing or OLTP for short.
And that's the difference between the two applications — OLTP applications show two-dimensional data, and OLAP applications show data in multiple dimensions, or views.
Microsoft provides a great tutorial for Analysis Services to get you started with creating and assembling cubes, but it assumes you have the base data in the shape it needs to be before you start. This is a big assumption! As a matter of fact, getting the original data into the right format is probably one of the hardest things to learn about cubes.
While most of us are used to working with the data in the OLTP format, business people don’t often think like this. They want to see things repositioned, by various friendly criteria, on the fly. The two things that this data format lacks to do that are more than these two dimensions and summary functions to bring it to life. That’s where cubes come in.
Cube engines (such as the one in Microsoft Analysis Services) have the ability to process data by dimensions — which are just a particular view of the data. For instance, "Time" is a dimension, as are "Item" and "Salesperson." "Show me all sales by salesperson" you might ask the application. In that case the dimension is "Salesperson." All of the different salespeople's names are stored as a dimension.
The real power comes in the numbers that combine the salespeople with the number of things they sold. These numbers, with a key back to the salesperson table, are called facts and sometimes measures. Here is the salesperson dimension table:
1 |
Buck Woody |
2 |
John Smith |
3 |
Jane Doe |
4 |
Keisha Wilson |
And here is a small fact or measure table:
1 |
14 |
2 |
13 |
3 |
12 |
4 |
20 |
You can see that Buck Woody (record 1) sold 14 tires. This is a simple example of course, because you would want another dimension for the Date measure, so you could tell when he sold them.
You can also have levels within your measures, which are further break-downs of measures. Think of the measure called "Time." Within time you might have levels of "year,""month" and "day." If you add a Time dimension table to our example above, you'll need to change the facts or measures to have keys that point to the dates. Also, you'll need more facts to break down the levels. You can see it gets complicated quite quickly.
So let’s sum all this up. A cube is a database of de-normalized tables. Some of the tables are the dimensions (things you want to measure) and others are the measures (counts, sums and so forth of the items in those other tables). Using this fairly simple concept it’s now possible to answer questions like, "Which salesperson sold the most parts, and in which month?" and so forth. Quite powerful indeed.
So how do you get from what you’ve just learned to the tutorials Microsoft bundles with Analysis Services? And what is the roadmap for the entire process?
Here’s what you need to do to get your cube from concept to completion:
Determine the data that your users need to see
This is probably the most important step of all. You need to adequately plan for what the goal of your cube system is and where the data is currently located. Don’t worry about whether it’s in Access databases, SQL Server tables or Oracle sources — just define it all out.
Transform and load the data to the data warehouse
Next you’ll need to transport the data to a central location using batch files, programs and/or SQL Server 2000’s Data Transformation Services (DTS) or SQL Server 2005's SQL Server Integration Services (SSIS). In this step you also change the data from its native multiple table formats to those skinny, deep tables I mentioned earlier. The data will end up in one of two kinds of tables — dimension tables (which you’ve already seen) and fact tables (which are just the measures you learned about earlier). The two kinds of tables will be joined by a key field between them. This step is often the most laborious part of the job.
Create the cube
Now that your data is in the data warehouse, you can build the cube with Analysis Services. This is where the Microsoft tutorial picks up. Along the way you’ll pick the storage type for the cube, such as MOLAP, ROLAP, and HOLAP. For further information on these storage options, see the references section at the end of this article.
Process the cube
During this step the aggregations designed for the cube are calculated and loaded. The engine reads the dimension tables and the fact table, calculates the aggregations and then stores the results in the cube.
Distribute the results
Users can look at the cube data by using the Cube Browser in the Analysis Manager, by using Microsoft Excel, or by using other applications like the Microsoft Data Analyzer. Most cubes I’ve worked with use either the Microsoft Excel route or a custom designed program. Microsoft has a special language like SQL called MDX, which allows you to write queries to show the data stored in a cube.
In other articles on this site you’ll learn how to perform each of these steps.
InformIT Articles and Sample Chapters
Sometimes you don't really need a full BI application, you want a reporting system. You can find out more here.
Online Resources
The SQL Server 2000 reference documentation for Analysis Services is here. For SQL Server 2005 it is here, and for SQL Server 2008 it is here.