Diving into sql server 2016
-
Upload
mohamed-zaatar-msc -
Category
Software
-
view
392 -
download
1
Transcript of Diving into sql server 2016
Diving into SQL Server 2016Mohamed Zaatar, M.Sc.Readify Developer@mzaatar
Page / Copyright ©2014 by Readify Limited2
Page / Copyright ©2014 by Readify Limited3
Page / Copyright ©201 by Readify Limited4
TO-DO List› Into Azure
› DB Stretching› SQL Server data files in Azure
› SQL Server Engine › JSON Support› Query Store
› In-Memory Computing› In-Memory OLTP - Memory-Optimized Tables› In-Memory Columnstore Indexes
› Security› Row-level security› Dynamic data masking
Page / Copyright ©201 by Readify Limited5
TO-DO List› Into Azure
› DB Stretching› SQL Server data files in Azure
› SQL Server Engine › JSON Support› Query Store
› In-Memory Computing› In-Memory OLTP - Memory-Optimized Tables› In-Memory Columnstore Indexes
› Security› Row-level security› Dynamic data masking
Page / Copyright ©2014 by Readify Limited6
Stretch Database
Page / Copyright ©2014 by Readify Limited7
Database Stretching› Why? Transactional data/save money› Not same as Linked Server› Microsoft charges you when query data not
when move itAzureLocal DB
Page / Copyright ©2014 by Readify Limited8
SQL Server data files in Azure› Save mdf /ldf files in Azure Blob storage› Why?
› Backups› High Availability› Security Azure
SQL Server (on premises)
DB 1
DB 2
DB 3
MDF LDF
Azure Blob Storage
Page / Copyright ©201 by Readify Limited9
TO-DO List› Into Azure
› DB Stretching› SQL Server data files in Azure
› SQL Server Engine › JSON Support› Query Store
› In-Memory Computing› In-Memory OLTP - Memory-Optimized Tables› In-Memory Columnstore Indexes
› Security› Row-level security› Dynamic data masking
Page / Copyright ©2014 by Readify Limited10
Page / Copyright ©2014 by Readify Limited11
JSON support› Native support (like xml)› What to do ?› Export/export data from string to JSON› Format strings (varchar) as JSON› Query› Validate string against JSON standards
Page / Copyright ©2014 by Readify Limited12
Page / Copyright ©2014 by Readify Limited13
Query store› New in 2016 and SQL Azure v12› Bunch of tables:
› sys.query_store_plan , sys.query_store_query , sys.query_store_query_text
› Why?› Find and fix› How many time execute a query› Top n queries› Audit the history of queries
Page / Copyright ©201 by Readify Limited14
TO-DO List› Into Azure
› DB Stretching› SQL Server data files in Azure
› SQL Server Engine › JSON Support› Query Store
› In-Memory Computing› In-Memory OLTP - Memory-Optimized Tables› In-Memory Columnstore Indexes
› Security› Row-level security› Dynamic data masking
Page / Copyright ©2014 by Readify Limited15
In-memory OLTP› i.e. Memory-optimized tables› ACID? YES !› Data in memory, saved on commits/check
points› Data consistency? Using row versioning› Durable/nondurable data? Both are available› How to access data? T-SQL and Native-
complied table/sp
Page / Copyright ©2014 by Readify Limited16
In-memory ColumnStore indexes
Page / Copyright ©2014 by Readify Limited17
In-memory ColumnStore indexes
ID Name Date Amount
Name
Date
ID Amount
RowStore ColumnStore
Page / Copyright ©2014 by Readify Limited18
In-memory ColumnStore indexes› Columnstore Index (memory-optimized)› What is new? Clustered Index› Massive better performance !
Page / Copyright ©201 by Readify Limited19
TO-DO List› Into Azure
› DB Stretching› SQL Server data files in Azure
› SQL Server Engine › JSON Support› Query Store
› In-Memory Computing› In-Memory OLTP - Memory-Optimized Tables› In-Memory Columnstore Indexes
› Security› Row-level security› Dynamic data masking
Page / Copyright ©2014 by Readify Limited20
Row-level Security – aka RLS› 2014 – enhancement in 2016› Why? Multi-tenants DB
Application Server
Clients
Database
Solution 1
Solution 2
Page / Copyright ©2014 by Readify Limited21
Mohamed Zaatar
XXXX-XXXX-XXXX-6543
xxx
Dynamic data masking› Customer service verifying credit cards› By a simple column attribute
Application Server
Database
Mohamed Zaatar
1234-6123-8787-6543
123
Matt Davies 7652-2372-2746-2815
789
Database
Page / Copyright ©2014 by Readify Limited22
Demos ?https://github.com/mzaatar/DBScripts/
Page / Copyright ©2014 by Readify Limited23
Resources› https://msdn.microsoft.com/en-us/library/dn935011.aspx › http://sqlwithmanoj.com/tag/stretch-database/› https://msdn.microsoft.com/en-US/library/dn466438.aspx› https://msdn.microsoft.com/en-au/library/dn934994.aspx› http://blog.sqlauthority.com/2011/10/29/sql-server-fundamentals-of-columnstore-ind
ex/› http://www.nikoport.com/2015/09/02/columnstore-indexes-part-64-t-sql-improvemen
ts-in-sql-server-2016/› https://msdn.microsoft.com/en-us/library/dn133165.aspx› https://azure.microsoft.com/en-us/blog/query-store-a-flight-data-recorder-for-your-dat
abase/› https://msdn.microsoft.com/en-us/library/dn765131.aspx› https://msdn.microsoft.com/en-us/library/mt163865.aspx
Thanks