CTE Ottawa Seminar Day - September 7th, 2012
This clinic introduces the key features and enhancements in SQL Server 2012. It is designed to provide a high-level overview of the product and the key new capabilities in this release.
This course is intended for technology managers and database professionals who want to understand the key capabilities of SQL Server 2012. In many cases, it is assumed that senior technical managers may attend this clinic in order to assess the further training that their technology-focused employees will need in order to adopt SQL Server 2012.
9. Key Trend – Appliances
• Pre-configured hardware and software solutions
• Optimized for specific workloads
• Generally purchased from a single supplier with a single
support package
10. Lesson 2: SQL Server 2012 Overview
• SQL Server 2012 Editions
• SQL Server 2012 Components
• SQL Server 2012 and Other Microsoft Technologies
• SQL Server 2012 Licensing
11. SQL Server 2012 Editions
Premium Editions
Parallel Data Warehouse Enterprise
Core Editions
Business Intelligence Standard
Other Editions
Express Compact
Developer SQL Azure
Web
12. SQL Server 2012 Components
• Not just a database engine
• Relational and Business Intelligence Components
SQL Server Components
Database Engine Analysis Services
Integration Services Reporting Services
Master Data Services StreamInsight
Data Mining Full-Text Search
PowerPivot Replication
Data Quality Services Power View
13. SQL Server 2012 and Other Microsoft Technologies
Product Relationship to SQL Server
Microsoft Windows Server The operating system on which SQL Server is
installed
Microsoft SharePoint Server A Web platform for collaboration through which
users can access SQL Server Reporting Services,
PowerPivot, and Power View
Microsoft System Center A suite of technologies for provisioning and
managing server infrastructure. SQL Server can
be deployed on virtual servers in a private cloud
and managed by System Center
Microsoft Office An information worker productivity suite that
provides an intuitive way for users to consume
SQL Server BI technologies and manage master
data models
The .NET Framework A software development runtime that includes
class libraries for creating applications that
interact with data in a SQL Server database
Windows Azure A cloud platform for developing applications that
can leverage cloud-based databases and
reporting
14. SQL Server 2012 Licensing
• Core-based Licensing – licensing by computing power
• Server + CAL Licensing – licensing by user
• Virtual Machine Licensing – licensing VMs
Edition Licensing Model
Server + CAL Core-based
Enterprise
Business Intelligence
Standard
15. Module Review
• Enterprise Data Scenarios and Trends
• SQL Server 2012 Overview
Learn more at www.microsoft.com/sqlserver
16. Module 2: SQL Server
2012 as a Platform for
Mission-Critical Data
CTE Ottawa Seminar Day
September 7th, 2012
18. Lesson 1: Database Development Enhancements
• Transact-SQL Enhancements
• New Functions
• Spatial Data Enhancements
• Storing and Querying Documents
19. Transact-SQL Enhancements
• The WITH RESULT SETS Clause
EXECUTE GetOrderPickList 'SO59384'
WITH RESULT SETS
(
([SalesOrder] nvarchar(20) NOT NULL,[LineItem] int, [Product] int, [Quantity] int)
)
• The THROW Statement
THROW 50001, 'Customer doers not exist', 1
• Paging with the OFFSET and FETCH Keywords
SELECT SalesOrderNumber, OrderDate, CustomerName FROM SalesOrders
ORDER BY SalesOrderNumber ASC
OFFSET 20 ROWS
FETCH NEXT 10 ROWS ONLY
• Sequence Objects
CREATE SEQUENCE OrderNumbers
START WITH 1000 INCREMENT BY 10
...
CREATE TABLE Orders
(OrderNumber int PRIMARY KEY DEFAULT(NEXT VALUE FOR OrderNumbers),
CustomerKey int, ProductKey int, Quantity int)
• The OVER Clause
SELECT City, OrderYear, OrderQuantity,
SUM(OrderQuantity) OVER (PARTITION BY City ORDER BY OrderYear
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS RunningQty
FROM CitySalesByYear
20. Demonstration: Using Transact-SQL Enhancements
In this demonstration, you will see how to:
Use the WITH RESULT SETS Clause
Use the THROW Statement
Implement Paging
Use a Sequence Object
Use the OVER Subclause
22. Demonstration: Using New Functions
In this demonstration, you will see how to:
Use Conversion Functions
Use Data and Time Functions
Use Logical Functions
Use String Functions
23. Spatial Data Enhancements
• New Spatial Shapes
CIRCULARSTRING COMPOUNDCURVE CURVEPOLYGON
• Shapes larger than a Hemisphere
• New FULLGLOBE Shape
24. Demonstration: Using Spatial Data Enhancements
In this demonstration, you will see how to:
Create a CIRCULARSTRING Shape
Create a COMPOUNDCURVE Shape
Create a CURVEPOLYGON Shape
Create a Shape that is Larger than a Hemisphere
Use the FULLGLOBE Shape
25. Storing and Querying Documents
CREATE TABLE FileStore AS FileTable
WITH (FileTable_Directory = 'Documents')
SELECT [name] As FileName FROM FileStore
WHERE CONTAINS(PROPERTY(file_stream,'Title'),'Bike OR Cycling')
SELECT [name] As FileName
FROM FileStore
WHERE CONTAINS(file_stream, 'NEAR((bicycle, race), 15)')
26. Demonstration: Working with Documents
In this demonstration, you will see how to:
Create a FileTable
Use the NEAR Operator
29. Demonstration: Using SQL Server Management Studio
In this demonstration, you will see how to:
Use Code Snippets
Debug Transact-SQL Code
30. Security Enhancements
• User-Defined Server Roles
CREATE SERVER ROLE [AGAdmins] AUTHORIZATION [sa];
GRANT ALTER ANY AVAILABILITY GROUP TO [AGAdmins];
GRANT ALTER ANY ENDPOINT TO [AGAdmins];
GRANT CREATE AVAILABILITY GROUP TO [AGAdmins];
GRANT CREATE ENDPOINT TO [AGAdmins];
ALTER SERVER ROLE [AGAdmins]
ADD MEMBER [JohnDoe];
• Contained Databases
CREATE DATABASE [MyContainedDB]
CONTAINMENT = PARTIAL
GO
USE [MyContainedDB]
CREATE USER [SalesAppUser] WITH PASSWORD = 'Pa$$w0rd'
GO
31. Demonstration: Using Security Enhancements
In this demonstration, you will see how to:
Create a Server Role
Create a Contained Database
32. Lesson 3: Database Availability Enhancements
• Backup and Restore Enhancements
• AlwaysOn Availability Groups
36. Demonstration: Using AlwaysOn Availability Groups
In this demonstration, you will see how to:
Verify Cluster and AlwaysOn Configuration
Perform a Full Database Backup
Create an AlwaysOn Availability Group
View Availability Group Configuration
Connect to an AlwaysOn Availability Group
Use a Readable Secondary Replica
Use a Readable Secondary Replica with a Read-Intent Connection
Perform a Manual Failover
Observe Automatic Failover
37. Module Review
• Database Development Enhancements
• Database Manageability Enhancements
• Database Availability Enhancements
For more information, attend the following courses:
• 10774A: Querying Microsoft® SQL Server® 2012
• 10775A: Administering Microsoft® SQL Server® 2012 Databases
• 10776A: Developing Microsoft® SQL Server® 2012 Databases
• 40008A: Updating your Database Skills to Microsoft® SQL Server® 2012
39. Module Overview
• SQL Server 2012 Data Quality Services
• SQL Server 2012 Master Data Services
• SQL Server 2012 Integration Services
• SQL Server 2012 for Data Warehousing
40. Lesson 1: SQL Server 2012 Data Quality Services
• Overview of SQL Server Data Quality Services
• Data Quality Services Knowledge Bases
• Data Cleansing
• Data Matching
41. Overview of SQL Server Data Quality Services
DQS Server
• DQS is a knowledge-
based solution for:
KB
Data Cleansing
Data Matching 1011000110
• DQS Components:
DQS Client
Server
Client
Data Cleansing SSIS Data Cleansing Transformation
Transformation
SSIS
42. Data Quality Services Knowledge Bases
• Repository of knowledge about
data:
KB
Domains define values and rules for
each field
Matching policies define rules for
identifying duplicate records
1011 000110
43. Demonstration: Creating a Knowledge Base
In this demonstration, you will see how to:
Create a Knowledge Base
Perform Knowledge Discovery
Perform Domain Management
44. Data Cleansing
1. Select a knowledge base
2. Map columns to domains
3. Review suggestions and
corrections
4. Export results
45. Demonstration: Cleansing Data
In this demonstration, you will see how to:
Create a Data Cleansing Project.
View Cleansed Data.
47. Demonstration: Matching Data
In this demonstration, you will see how to:
Create a Matching Policy.
Create a Data Matching Project.
View Data Matching Results.
48. Lesson 2: SQL Server 2012 Master Data Services
• Overview of SQL Server Master Data Services
• Master Data Models
• The Master Data Services Add-in for Excel
• Implementing a Master Data Hub
49. Overview of SQL Server Master Data Services
CRM
Customer ID Name Address Phone
1235 Ben Smith 1 High St, Seattle 555 12345
Customer ID Account No Contact No Customer Address Phone
Master Data Hub 1235 531 22 Ben Smith 1 High St, Seattle 555 12345
Master Data Services
Data Steward
Other consumers
(e.g. Data Warehouse ETL)
Order Processing System Marketing System
Account No Customer Address Phone Contact No Name Address Phone
531 Benjamin Smith 1 High St, Seattle 555 12345 22 B Smith 5 Main St, Seattle 555 54321
50. Master Data Models
• A versioned data model for
Customers Model
specific business item or area
of the business Version 1
• Contains definitions for Account Type Entity Member
entities required in the Attributes:
•
•
Code: 1
Name: Standard
business area •
•
Code (string)
Name (string) Member
• Code: 2
Often an entity with the same • Name: Premier
name as the model, as well as
related entities
Customer Entity Member
• Each entity has a defined set • Code: 1235
Attributes:
of attributes • Code (free-form text)
•
•
Name: Ben Smith
Address: 1 High St, Seattle
• Name (free-form text) • Phone: 555-12345
• Address (free-form text) • AccountType: 1
All entities have Code and • Phone (free-form text) • CreditLimit: 1000
• AccountType (domain-based)
Name attributes • CreditLimit (free-form number)
Contact Details Attribute Group
Attributes can be categorized in
attribute groups
• Each instance of an entity is a Version 2 Version 3
known as a member
51. Demonstration: Creating a Master Data Model
In this demonstration, you will see how to:
Create a Master Data Model
Create Entities
Create Attributes
Add and Edit Members
52. The Master Data Services Add-in for Excel
• Use the Master Data
Services Add-In for
Excel to connect to a
model
• Create entities
• Add columns to
create attributes
• Edit entity member
data in worksheets
• Publish changes to
Master Data Services
53. Demonstration: Editing a Model in Microsoft Excel
In this demonstration, you will see how to:
View a Master Data Entity in Excel
Add a Member
Add a Free-Form Attribute
Add a Domain-Based Attribute and a Related Entity
54. Implementing a Master Data Hub
CRM
Master Data Hub
Other consumers
SSIS (e.g. Data Warehouse ETL)
SSIS
SSIS
SSIS
Order Processing System
Data Steward
Marketing System
• Users insert and update data in application data stores
• Application data is loaded into the master data hub via staging
tables for consolidation and management by data stewards
• Master data flows back to application data stores and other
consumers across the enterprise via subscription views
55. Demonstration: Importing and Consuming Master Data
In this demonstration, you will see how to:
Use an SSIS Package to Import Data
View Import Status
Create a Subscription View
Query a Subscription View
56. Lesson 3: SQL Server 2012 Integration Services
• Overview of SQL Server Integration Services
• Extracting Modified Data
• Deploying and Managing Integration Services Projects
57. Overview of SQL Server Integration Services
• SSIS project:
A versioned container for parameters and packages
A unit of deployment to an SSIS Catalog
• SSIS package:
A unit of task flow execution
A unit of deployment (package deployment model)
Project Project-level parameter
Project-level connection manager
Deploy SSIS Catalog
Package Package
Package-level parameter Package-level parameter
Package connection manager Package connection manager
Control Flow
Package
Control Flow
Deploy Deployment
Data Flow Data Flow
Model
58. Extracting Modified Data
Initial Extraction Incremental Extraction
1 CDC Control
CDC Control 1 Get Processing Range
Mark Initial Load Start
CDC CDC
CDC CDC Source
Source State State
Data Flow
2
Data Flow
Variable Variable
2
CDC Splitter
Staged Inserts
3
CDC State Table
3 Staged Staged Staged
CDC Control
Mark Initial Load End Inserts Updates Deletes
4 CDC Control
Mark Processed Range
1. A CDC Control Task records the 1. CDC Control Task establishes the range of
starting LSN LSNs to be extracted
2. A data flow extracts all records 2. A CDC Source extracts records and CDC
metadata
3. A CDC Control task records the ending
LSN 3. Optionally, a CDC Splitter splits the data
flow into inserts, updates, and deletes
4. A CDC Control task records the ending LSN
59. Demonstration: Using the CDC Control Task
In this demonstration, you will see how to:
Enable Change Data Capture
Perform an Initial Extraction
Extract Modified Records
61. Demonstration: Deploying an Integration Services Project
In this demonstration, you will see how to:
Create an SSIS Catalog
Deploy an SSIS Project
Create Environments and Variables
Run an SSIS Package
View Execution Information
62. Lesson 4: SQL Server 2012 for Data Warehousing
• Overview of SQL Server Data Warehousing
• Options for SQL Server Data Warehousing
• Optimizing Performance with Columnstore Indexes
63. Overview of SQL Server Data Warehousing
• A centralized store of business data for reporting and analysis
• Typically, a data warehouse:
Contains large volumes of historical data
Is optimized for querying data (as opposed to inserting or updating)
Is incrementally loaded with new business data at regular intervals
Provides the basis for enterprise business intelligence solutions
64. Options for SQL Server Data Warehousing
Custom-build
Reference Data warehouse
architectures appliances
66. Demonstration: Using a Columnstore Index
In this demonstration, you will see how to:
View Logical Reads for a Query
Create a Columnstore Index
View Performance Improvement
67. Module Review
• SQL Server 2012 Data Quality Services
• SQL Server 2012 Master Data Services
• SQL Server 2012 Integration Services
• SQL Server 2012 for Data Warehousing
For more information, attend the following courses:
• 10777A: Implementing a Data Warehouse with Microsoft® SQL Server® 2012
• 40009A: Updating your Business Intelligence Skills to Microsoft® SQL
Server® 2012