SQL Club- Reimagining New SQL Server...

28
SQL Club- Reimagining New SQL Server 2014 !

Transcript of SQL Club- Reimagining New SQL Server...

Page 1: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

SQL Club- Reimagining New SQL Server 2014 !

Page 2: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

The Road to SQL Server 2014

SQL Server 2008 R2• Multi-Server Admin

• Data-Tier Applications

• PowerPivot

• Report Builder 2.0

• Master Data Services

• Prepared Instances

2008 2010 2012 2014

SQL Server 2008• Audit

• Compression

• Change Data Capture

• Data Collector

• Resource Governor

• Policy-Based

Management

• PowerShell provider

• Spatial Data

• Filestream Data

SQL Server 2012• AlwaysOn HA

• Columnstore Indexes

• Contained databases

• User-Defined Server

Roles

• Data Quality Services

• SSAS Tabular Mode

• SSIS Catalog

• SSRS Power View

• SSRS Data Alerts

• Deploy to SQL Azure

SQL Server 2014• In-Memory OLTP

• Updateable columnstore

• Buffer Pool Extensions

• Enhanced AlwaysOn HA

• New server-level

permissions

• Deploy to Azure VM

• Power View from MD

SQL AzureSQL Database Services (REST)

SQL Azure= SQL Database SQL Server in VMs

Azu

re

Office 2013• Power

View(Excel)Off

ice

• Power Query• Power Map

O365 Power BIOffice 2010• PowerPivot (Excel/SP)

MDS Add-in (Excel)

Data Market

Office 2007• Data Mining

Add-Ins (Excel)

Win Srvr 2008

OS Win Srvr 2008 R2 Win Srvr 2012 Win Srvr 2012 R2

Sys Center 2007 Sys Center 2012 Sys Center 2012 R2

SQL Azure Reporting

Page 3: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

Upgrading from Previous Versions

In-place Upgrade Side-by-side Upgrade

• Easier, mostly automated • More granular control over process

• System data upgraded • Can be used to perform test migration

• No additional hardware • Relatively straightforward rollback

• No change to applications • Can leverage failover/switchover

SQL Server 2005 SP4

SQL Server 2008 SP2

SQL Server 2008 R2 SP1

SQL Server 2012

SQL Server 2014

Run the Upgrade Advisor to check for upgrade issues

Page 4: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

Preview

What’s New in SQL Server Database Development

Page 5: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

Overview

• Transact-SQL Enhancements

•New and Enhanced Transact-SQL Functions

• Enhancements to Spatial Data Support

• Storing and Querying Documents with SQL Server

2014

• FileTables

• Full-Text Enhancements

• Customizable Proximity

• Statistical Semantic Search

Page 6: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

Inline Syntax for Indexes

•Create indexes when creating tables

CREATE TABLE dbo.SalesOrders(

SalesOrderID INTEGER PRIMARY KEY NONCLUSTERED,OrderDate DATETIME NOT NULL,CustomerID INTEGER NOT NULL,ProductID INTEGER NOT NULL,INDEX ix_SalesOrders_OrderDate CLUSTERED (OrderDate)

);

Page 7: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

Preview

In-Memory Database Capabilities

Page 8: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

What ‘s In-Memory Database

• The Buffer Pool Extension

•Columnstore Indexes

•Memory-Optimized Tables

Page 9: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

What Is the Buffer Pool Extension?

Data files(Disk)

Buffer cache(RAM)

Buffer cache extension(SSD)

Pages

Clean Pages

• Extends buffer cache to non-volatile storage

• Improves performance for read-heavy OLTP workloads

•SSD devices are often more cost-effective than adding physical memory

•Simple configuration with no changes to existing applications.

Page 10: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

Configuring the Buffer Pool Extension

• Enable using ALTER SERVER CONFIGURATION

• To Reconfigure, disable and then re-enable

• https://www.facebook.com/groups/222546864546

011/384103261723703/

ALTER SERVER CONFIGURATIONSET BUFFER POOL EXTENSION ON(FILENAME = 'E:\SSDCACHE\MYCACHE.BPE',SIZE = 50 GB);

Page 11: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

What Are Columnstore Indexes?

• In-memory, compressed data in pages based on columns instead of rows

ProductID OrderDate Cost

310 20010701 2171.29

311 20010701 1912.15

312 20010702 2171.29

313 20010702 413.14

data page1000

ProductID OrderDate Cost

314 20010701 333.42

315 20010701 1295.00

316 20010702 4233.14

317 20010702 641.22data page1001

ProductID

310

311

312

313

314

315

316

317

318

319

320

321

data page2001

OrderDate

20010701

20010702

20010703

20010704

data page2000

data page2002

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

Page 12: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

Clustered and Non-Clustered Columnstore Indexes

•Clustered Columnstore Indexes

SQL Server 2014 Enterprise, Developer, and Evaluation Edition Only

Includes all columns in the table

Only index on the table

Updatable

•Non-Clustered Columnstore Indexes

Includes some or all columns in the table

Can be combined with other indexes

Read-Only

Page 13: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

What Are Memory-Optimized Tables?

•Defined as C structs, compiled into DLLs, and

loaded into memory

•Can be persisted as filestreams, or non-durable

•Do not apply any locking semantics

•Can be indexed using hash indexes

•Can co-exist with disk-based tables

•Can be queried using Transact-SQL

•Cannot include some data types, including text,

image, and nvarchar(max)

•Do not support identity columns or foreign key

constraints

Page 14: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

Memory-Optimized Table Scenarios

•Optimistic concurrency optimizes latch-bound

workloads:

• Multiple concurrent transactions modify large numbers

of rows

• A table contains “hot” pages

•Applications should handle conflict errors:

• Write conflicts

• Repeatable read validation failures

• Serializable validation failures

• Commit dependency failures

Page 15: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

Querying Memory-Optimized Tables

•Query Interop

• Interpreted Transact-

SQL

• Enables queries that

combine memory-

optimized and disk-

based tables

•Native Compilation

• Stored procedure

converted to C and

compiled

• Access to memory-

optimized tables only

Memory-Optimized Tables

Disk-BasedTables

Tab1 Tab2 Tab3 Tab4

Transact-SQL

SELECT t1.col1, t3.col2FROM Tab1 t1JOIN Tab2 t2ON t1.Col1 = t2.col1;

Query Interop

Native Compilation

CREATE PROCEDURE…

#define __inHRESULT hkp_(…

0110101101

Translate to C

Compile to DLL

Page 16: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

Preview

Implementing Security in Microsoft SQL Server 2014

Page 17: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

Auditing Enhancements

• Server level auditing included in all editions of SQL Server 2014

• New CREATE SERVER AUDIT options

• Generate user-defined audit events with sp_audit_write

• Extra information in audit logs to discriminate between queries

issued by applications and stored procedures

• Extra columns in auditing catalog views and system functions

CREATE SERVER AUDIT my_auditTO APPLICATION_LOGWITH (QUEUE_DELAY=1000, ON_FAILURE=FAIL_OPERATION)

IF APP_NAME() LIKE 'Microsoft SQL Server Management Studio%'BEGIN

EXEC sp_audit_write 1001, 1, N'Statement executed in SSMS'END

Page 18: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

Separation of duties enhancement

• Four new permissions• CONNECT ANY DATABASE (server scope)

• IMPERSONATE ANY LOGIN (server scope)

• SELECT ALL USER SECURABLES (server scope)

• ALTER ANY DATABASE EVEN SESSION (database scope)

• Main benefit• Greater role separation to restrict multiple DBA roles

• Ability to create new roles for database administrators who

are not sysadmin (super user)

• Ability to create new roles for users or apps with specific

purposes

Page 19: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

•Software Installer: • Specific Active Directory Windows user account enabled during installation and

disabled when not doing installation

• Instance Identity Manager:• Can be designated as server role (SQL Server 2012 or above)

• Enable ALTER ANY LOGIN, ALTER ANY SERVER ROLE permissions

•Highest-level DBA:• Can be designated as server role (SQL Server 2012 or above)

• Enable CONTROL SERVER permission but disable ALTER ANY LOGIN, ALTER ANY

SERVER ROLE, IMPERSONATE ANY LOGIN permissions

• Disable EXECUTE/SELECT/INSERT/UPDATE/DELETE on a per-database schema or

table level

• Or Disable SELECT ALL USER SECURABLES permission combined with disabling

EXECUTE permission because of ownership chaining

Example Roles for Separation of Duties

Page 20: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

AlwaysOn Technologies in SQL Server 2014

Windows Server

Failover Cluster

AlwaysOn Availability Group

Database-level protection

Windows Server

Failover Cluster

AlwaysOn Failover Cluster Instance

Server-level protection

Page 21: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

AlwaysOn Availability Groups

Windows Server

Failover Cluster

Primary Replica

Secondary Replica

Async

Listener

Secondary Replica

Page 22: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

Active Secondary Replicas

Primary Replica

Secondary Replica

Secondary Replica

ApplicationIntent=ReadOnly

Backup

Page 23: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

Preview

Self-Service BI with Microsoft Excel

Page 24: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

What’s the new features

• PowerPivot for Excel

• PowerPivot for SharePoint Server

• Power Query

• Power View

• Power Map

• Power BI for Office 365

Page 25: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

Data Management Gateway

•Client agent to publish on-premises data sources

to Office 365 Power BI

Excel / Power Query

On-premises data source

Data Management Gateway

Office 365 Power BI

OData Feed

Page 26: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

Preview

High Availability and Data Recovery Enhancements

Page 27: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

Review and Takeaways

• Welcome to join Super SQL Server

• How to add one node into SQL Server 2014 cluster with windows 2012 cluster

• https://www.facebook.com/groups/222546864546011/436830029784359/

• https://www.facebook.com/groups/222546864546011/433463356787693/

• SQL Server 2014 管理新功能 III 介紹-資源調控器上磁盤IO的新功能(SQL Server 2014 Management Topic 3- Resource Governor on disk IO)

• https://www.facebook.com/groups/222546864546011/393249594142403/

• SQL Server 2014 Management Topic 2- Buffer Pool Extension of SQL Server 2014

• https://www.facebook.com/groups/222546864546011/384103261723703/

• SQL Server 2014 Management Topic I-directly create SQL Server database on Azure Storage

• https://www.facebook.com/groups/222546864546011/382224858578210/

• PASS -SQL Server 2014高可用度High Availability組合活用

• https://www.facebook.com/groups/222546864546011/374187362715293/

Page 28: SQL Club- Reimagining New SQL Server 2014download.microsoft.com/.../20140321_Session1_SQL_Club.pdf2014/03/21  · The Road to SQL Server 2014 SQL Server 2008 R2 • Multi-Server Admin

Review and Takeaways

•Welcome to join Super SQL Server