Date post: | 10-May-2015 |
Category: |
Technology |
Upload: | cte-solutions-inc |
View: | 713 times |
Download: | 1 times |
Module 1: Introduction to SQL Server 2012
CTE Ottawa Seminar Day September 7th, 2012
Module Overview
• Enterprise Data Scenarios and Trends
•SQL Server 2012 Overview
Lesson 1: Enterprise Data Scenarios and Trends
•Common Data Workloads
•Key Trend – Mission-Critical Data
•Key Trend – Self-Service Business Intelligence
•Key Trend – Big Data
•Key Trend – Cloud Technologies
•Key Trend – Appliances
Common Data Workloads
Online Transaction Processing (OLTP)
Enterprise Integration Management (EIM)
Data Warehousing (DW)
Business Intelligence (BI)
Key Trend – Mission-Critical Data
•High availability
• Fast, up-to-the-minute data recoverability
Key Trend – Self-Service Business Intelligence
• Empower information workers
•Reduce IT workload
Key Trend – Big Data
• Large volumes of data
•Many data sources
•Diverse data formats
Key Trend – Cloud Technologies
• Public Cloud
• Private Cloud
•Hybrid Solutions
Key Trend – Appliances
• Pre-configured hardware and software solutions
•Optimized for specific workloads
•Generally purchased from a single supplier with a single support package
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
SQL Server 2012 Editions
Premium Editions
Parallel Data Warehouse Enterprise
Core Editions
Business Intelligence Standard
Other Editions
Express Compact
Developer SQL Azure
Web
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
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
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
Module Review
• Enterprise Data Scenarios and Trends
•SQL Server 2012 Overview
Learn more at www.microsoft.com/sqlserver
Module 2: SQL Server 2012 as a Platform for
Mission-Critical Data
CTE Ottawa Seminar Day September 7th, 2012
Module Overview
•Database Development Enhancements
•Database Manageability Enhancements
•Database Availability Enhancements
Lesson 1: Database Development Enhancements
• Transact-SQL Enhancements
•New Functions
•Spatial Data Enhancements
•Storing and Querying Documents
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)
)
THROW 50001, 'Customer doers not exist', 1
SELECT SalesOrderNumber, OrderDate, CustomerName FROM SalesOrders
ORDER BY SalesOrderNumber ASC
OFFSET 20 ROWS
FETCH NEXT 10 ROWS ONLY
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)
SELECT City, OrderYear, OrderQuantity,
SUM(OrderQuantity) OVER (PARTITION BY City ORDER BY OrderYear
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS RunningQty
FROM CitySalesByYear
• The THROW Statement
• Paging with the OFFSET and FETCH Keywords
• Sequence Objects
• The OVER Clause
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
New Functions
Conversion Functions
PARSE PARSE('£345.98' AS money USING 'en-GB')
TRY_PARSE TRY_PARSE('£345.98' AS money USING 'en-US')
TRY_CONVERT TRY_CONVERT(int, 'One')
Date and Time Functions
DATEFROMPARTS DATEFROMPARTS (2010, 12, 31)
DATETIMEFROMPARTS DATETIMEFROMPARTS ( 2010, 12, 31, 23, 59, 59, 0 )
SMALLDATETIMEFROMPARTS SMALLDATETIMEFROMPARTS ( 2010, 12, 31, 23, 59 )
DATETIME2FROMPARTS DATETIME2FROMPARTS ( 2010, 12, 31, 23, 59, 59, 1, 7 )
TIMEFROMPARTS TIMEFROMPARTS ( 23, 59, 59, 1, 5 )
DATETIMEOFFSETFROMPARTS DATETIMEOFFSETFROMPARTS(2010,12,31,14,23,23,1,8,0,7)
EOMONTH EOMONTH (GETDATE(), 1)
Logical Functions
CHOOSE CHOOSE (3,'Cash','Credit Card','Debit Card','Invoice')
IIF IIF(@i % 2 = 0, 'Even', 'Odd')
String Functions
CONCAT CONCAT(Firstname, ' ', LastName)
FORMAT FORMAT(UnitPrice, 'C', 'en-GB')
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
Spatial Data Enhancements
•New Spatial Shapes
•Shapes larger than a Hemisphere
•New FULLGLOBE Shape
CIRCULARSTRING COMPOUNDCURVE CURVEPOLYGON
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
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)')
Demonstration: Working with Documents
In this demonstration, you will see how to:
Create a FileTable
Use the NEAR Operator
Lesson 2: Database Manageability Enhancements
•Management Tool Enhancements
•Security Enhancements
Management Tool Enhancements
•Code Snippets
• Enhanced Debugging
Demonstration: Using SQL Server Management Studio
In this demonstration, you will see how to:
Use Code Snippets
Debug Transact-SQL Code
Security Enhancements
•User-Defined Server Roles
•Contained Databases
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];
CREATE DATABASE [MyContainedDB]
CONTAINMENT = PARTIAL
GO
USE [MyContainedDB]
CREATE USER [SalesAppUser] WITH PASSWORD = 'Pa$$w0rd'
GO
Demonstration: Using Security Enhancements
In this demonstration, you will see how to:
Create a Server Role
Create a Contained Database
Lesson 3: Database Availability Enhancements
•Backup and Restore Enhancements
•AlwaysOn Availability Groups
Backup and Restore Enhancements
• Point-In-Time Restore
• Page Restore
Demonstration: Using Backup and Restore Enhancements
In this demonstration, you will see how to:
Perform a Point-In-Time Restore
AlwaysOn Availability Groups
Windows Cluster
Node1 (Primary)
Node2 (Read-Only)
Node3
Async
Listener
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
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
Module 3: Enterprise Integration Management
and Data Warehousing
CTE Ottawa Seminar Day September 7th, 2012
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
Lesson 1: SQL Server 2012 Data Quality Services
•Overview of SQL Server Data Quality Services
•Data Quality Services Knowledge Bases
•Data Cleansing
•Data Matching
Overview of SQL Server Data Quality Services
•DQS is a knowledge-based solution for:
Data Cleansing
Data Matching
•DQS Components:
Server
Client
Data Cleansing SSIS Transformation
1011000110
KB
DQS Client
Data Cleansing Transformation
SSIS
DQS Server
Data Quality Services Knowledge Bases
•Repository of knowledge about data:
Domains define values and rules for each field
Matching policies define rules for identifying duplicate records
1011000110
KB
Demonstration: Creating a Knowledge Base
In this demonstration, you will see how to:
Create a Knowledge Base
Perform Knowledge Discovery
Perform Domain Management
Data Cleansing
1. Select a knowledge base
2. Map columns to domains
3. Review suggestions and corrections
4. Export results
Demonstration: Cleansing Data
In this demonstration, you will see how to:
Create a Data Cleansing Project.
View Cleansed Data.
Data Matching
•Matching Policies
•Data Matching Projects
Demonstration: Matching Data
In this demonstration, you will see how to:
Create a Matching Policy.
Create a Data Matching Project.
View Data Matching Results.
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
Overview of SQL Server Master Data Services
CRM
Marketing System Order Processing System
Customer ID Name Address Phone
1235 Ben Smith 1 High St, Seattle 555 12345
Account No Customer Address Phone
531 Benjamin Smith 1 High St, Seattle 555 12345
Contact No Name Address Phone
22 B Smith 5 Main St, Seattle 555 54321
Customer ID Account No Contact No Customer Address Phone
1235 531 22 Ben Smith 1 High St, Seattle 555 12345 Master Data Hub
Master Data Services
Other consumers (e.g. Data Warehouse ETL)
Data Steward
Master Data Models
• A versioned data model for specific business item or area of the business
• Contains definitions for entities required in the business area
Often an entity with the same name as the model, as well as related entities
• Each entity has a defined set of attributes
All entities have Code and Name attributes
Attributes can be categorized in attribute groups
• Each instance of an entity is a known as a member
Customers Model
Version 1
Version 2 Version 3
Account Type Entity
Customer Entity
Attributes: • Code (string) • Name (string)
• Code: 1 • Name: Standard
Member
• Code: 2 • Name: Premier
Member
• Code: 1235 • Name: Ben Smith • Address: 1 High St, Seattle • Phone: 555-12345 • AccountType: 1 • CreditLimit: 1000
Member
Attributes: • Code (free-form text) • Name (free-form text) • Address (free-form text) • Phone (free-form text) • AccountType (domain-based) • CreditLimit (free-form number)
Contact Details Attribute Group
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
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
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
Implementing a Master Data Hub
•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
CRM
Marketing System
Order Processing System
Master Data Hub
Data Steward
Other consumers (e.g. Data Warehouse ETL)
SSIS
SSIS SSIS
SSIS
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
Lesson 3: SQL Server 2012 Integration Services
•Overview of SQL Server Integration Services
• Extracting Modified Data
•Deploying and Managing Integration Services Projects
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
Package Package
Project-level parameter
Package-level parameter Package-level parameter
Deploy
Deploy
SSIS Catalog
Package Deployment Model
Project-level connection manager
Package connection manager Package connection manager
Control Flow
Data Flow
Control Flow
Data Flow
Extracting Modified Data Initial Extraction Incremental Extraction
CDC Control Mark Initial Load Start
Source
Staged Inserts
CDC Control Mark Initial Load End
CDC State Table
CDC State
Variable
CDC Control Get Processing Range
CDC Source
Staged Inserts
CDC Control Mark Processed Range
CDC State
Variable
CDC Splitter
Staged Updates
Staged Deletes
1. A CDC Control Task records the starting LSN
2. A data flow extracts all records
3. A CDC Control task records the ending LSN
1. CDC Control Task establishes the range of LSNs to be extracted
2. A CDC Source extracts records and CDC metadata
3. Optionally, a CDC Splitter splits the data flow into inserts, updates, and deletes
4. A CDC Control task records the ending LSN
Data
Flo
w
Data
Flo
w
1
2
3
1
2
3
4
CDC
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
Deploying and Managing Integration Services Projects
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
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
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
Options for SQL Server Data Warehousing
Reference architectures
Data warehouse appliances
Custom-build
Optimizing Performance with Columnstore Indexes
ProductID OrderDate Cost
310 20010701 2171.29
311 20010701 1912.15
312 20010702 2171.29
313 20010702 413.14
data page 1000
ProductID OrderDate Cost
314 20010701 333.42
315 20010701 1295.00
316 20010702 4233.14
317 20010702 641.22 data page 1001
ProductID
310
311
312
313
314
315
316
317
318
319
320
321
data page 2001
OrderDate
20010701
…
20010702
…
…
20010703
…
…
…
…
20010704
…
data page 2000
data page 2002
Cost
2171.29
1912.15
2171.29
413.14
333.42
1295.00
4233.14
641.22
24.95
64.32
1111.25
Row Store Column Store
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
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