1. Ing. Eduardo Castro, PhD
MVP de Microsoft SQL Server
PASS Regional de Mentor
PASS Board of Directors
eduardo.castro@sqlpass.org
http://www.youtube.com/eduardocastrom
SQL Server 2016 Vistazo a
todo lo nuevo!
2. Material de Referencia
SQL Server Evolution. SQL 2016 new innovations. Lindsey Allen Principal Group Program Manager, Borko Novakovic
Program Manager
New in Master Data Services and Integration Services in SQL Server 2016. Matt Masson
SQL Server Evolution. Shawn Bice Engineering Partner Director
Operational Analytics in SQL Server. Sunil Agarwal Principal Program Manager
3. ¿Qué hay en esta sesión
SQL 2016 qué hay de Nuevo!
Scaling up aumentado – 16 sockets
Mejoras en el In-memory Engine
Query flight recorder - Query Store
Time travel y auditoria con Temporal database
Advanced Analytics en la base de datos OLTP
4. Mejoras en Column Store
Artículo de Microsoft
http://bit.ly/sql2016-columnstore
5. Columnstore Index Feature
SQL Server
2012
SQL Server
2014
SQL Server
2016 (CTP2)
Azure SQL
Database
Batch execution for multi-threaded queries yes yes yes yes
Batch execution for single-threaded queries yes yes
Archival compression option. yes yes yes
Snapshot isolation and read-committed snapshot isolation yes yes
Specify columnstore index when creating a table. yes yes
AlwaysOn supports columnstore indexes. yes yes yes yes
AlwaysOn readable secondary supports read-only columnstore indexes. yes yes yes yes
AlwaysOn readable secondary supports updateable columnstore indexes. yes
Read-only nonclustered columnstore index on heap or btree. yes yes yes
1
yes
1
Updateable nonclustered columnstore index on heap or btree yes yes
Additional btree indexes allowed on a heap or btree that has a columnstore index. yes yes yes yes
Updateable clustered columnstore index. yes yes yes
Btree index on a clustered columnstore index. yes yes
Columnstore index on a memory-optimized table. Yes!
Nonclustered columnstore index definition supports using a filtered condition. yes yes
7. Mejoras en InMemory OLTP
• Recomendado tamaño máximo de tabla en memoria pasa de 256MB-> 2 TB
• Intercalaciones además BIN2 permitieron columnas en los índices (aconsejado que no se
desempeñan tan bien)
• ALTER TABLE se puede utilizar en las tablas de memoria para agregar, eliminar o
alterar las columnas, o para agregar, eliminar o reconstruir los índices.
• ALTER PROCEDURE se puede usar en forma nativa compilado procedimientos
almacenados
• Procedimientos compilados de forma nativa permite sintaxis adicional (LEFT JOIN,
SELECT DISTINCT, UNION, todas las funciones matemáticas)
• Permite escalar con mayor cantidad de sockets
• AlwaysOn replicas ven in-memory cambios de datos “undelayed”.
• Mejor garbage collection
8. Mejoras en InMemory OLTP
Feature/Limit SQL Server 2014 SQL Server 2016
Maximum size of durable table 256 GB 2 TB
LOB (varbinary(max), [n]varchar(max)) Not supported Supported*
Transparent Data Encryption (TDE) Not supported Supported
Offline Checkpoint Threads 1 1 per container
ALTER PROCEDURE / sp_recompile Not supported Supported (fully online)
Nested native procedure calls Not supported Supported
Natively-compiled scalar UDFs Not supported Supported
ALTER TABLE
Not supported
(DROP / re-CREATE)
Partially supported
(offline – details below)
DML triggers Not supported
Partially supported
(AFTER, natively compiled)
Indexes on NULLable columns Not supported Supported
Non-BIN2 collations in index key
columns
Not supported Supported
Non-Latin codepages for [var]char
columns
Not supported Supported
Non-BIN2 comparison / sorting in
native modules
Not supported Supported
Foreign Keys Not supported Supported
Check/Unique Constraints Not supported Supported
Parallelism Not supported Supported
OUTER JOIN, OR, NOT, UNION [ALL],
DISTINCT, EXISTS, IN
Not supported Supported
Multiple Active Result Sets (MARS)
(Means better Entity Framework
support.)
Not supported Supported
SSMS Table Designer Not supported Supported
Fuente: http: //sqlperformance.com/2015/05/sql-server-2016/in-memory-oltp-enhancements
9. ColumnStore + In Memory OLTP
= OPERATIONAL ANALYTICS
In-memory, updateable, non-clustered
columnstore index ya sea sobre disk-based or
in-memory tables.
12. Qué es el Query Store
Almacenar el historial de los planes de ejecución
Capturar el desempeño de los planes a través del tiempo
Identificar consultas que se han vuelto lentas
Permitir forzar planes de forma fácil
Hacer que funcione aunque se reinicie el servidor
14. Temporal Tables
Demo
Ver los datos a travéz del tiempo
Table Templates
Trabajo junto a SQL AUDIT para tener un historial completo
de los cambios (QUIEN, QUE, CUANDO)
16. Fuente: https://msdn.microsoft.com/en-us/library/dn935015%28v=sql.130%29.aspx
Expression Qualifying Rows Description
AS OF<date_time> SysStartTime <= date_time AND SysEndTime >
date_time
Returns a table with single record for each row containing the values that were actual (current) at the
specified point in time in the past. Internally, a union is performed between the temporal table and
its history table and the results are filtered to return the values in the row that was valid at the point
in time specified by the <date_time> parameter. The value for a row is deemed valid if
thesystem_start_time_column_name value is less than or equal to the <date_time> parameter value
and thesystem_end_time_column_name value is greater than the <date_time> parameter value.
FROM<start_date_time>TO
<end_date_time>
SysStartTime < end_date_time AND
SysEndTime > start_date_time
Returns a table with the values for all record versions that were active within the specified time range,
regardless of whether they started being active before the <start_date_time> parameter value for the
FROM argument or ceased being active after the<end_date_time> parameter value for the TO
argument. Internally, a union is performed between the temporal table and its history table and the
results are filtered to return the values for all row versions that were active at any time during the
time range specified. Records that became active exactly on the lower boundary defined by the
FROM endpoint are included and records that became active exactly on the upper boundary defined
by the TO endpoint are not included.
BETWEEN<start_date_time
>AND<end_date_time>
SysStartTime <= end_date_time AND
SysEndTime > start_date_time
Same as above in the FOR SYSTEM_TIME FROM <start_date_time>TO <end_date_time>
description, except the table of rows returned includes rows that became active on the upper
boundary defined by the <end_date_time> endpoint.
CONTAINED
IN(<start_date_time> ,
<end_date_time>)
SysStartTime >= start_date_time AND
SysEndTime <= end_date_time
Returns a table with the values for all record versions that were opened and closed within the
specified time range defined by the two datetime values for the CONTAINED IN argument. Records
that became active exactly on the lower boundary or ceased being active exactly on the upper
boundary are included.
17. Always Encrypted
Los datos son encriptados durante el transporte en red y en disco
Mejor que TDE, puesto que está encriptado para todos los usuarios y administradores
Require .NET 4.6
Fuente (MSDN Blog):
http: //bit.ly/sql2016-always-encrypted-walkthru
19. Stretch Database
Solución que permite almacenar datos históricos en la nube
Permite liberar espacio de discos locales o de SAN
No requiere cambios en los TSQL
El engine de SQL Server realiza un procesamiento “distribuido”
de las consultas
27. Dynamic Data Masking
Permite que los datos sensible no sean guardados de
forma literal sino que mediante una máscara
Ya está disponible en la versión V12 de SQL Azure Base
de datos
Efectivamente protege datos sensibles en la capa de
aplicación, no revela los datos a los administradores o
usuarios con derechos SELECT.
29. Otras cosas
SELECT * FROM Table FOR JSON AUTO
PolyBase
Managed Backup & Backup to Azure Improvements (Backup to Blob)
Multiple TempDBs upon install
Online ALTER COLUMN
Para saber más:
http: //bit.ly/sql2016-whats-new-db-engine
33. Lo nuevo en SQL Server 2016
Rendimiento mejorado en memoria proporciona hasta 30x transacciones más rápidas,
más de 100x consultas más rápidas que las bases de datos relacionales basados en
disco y análisis de operaciones en tiempo real.
La nueva tecnología Always Encrypted ayuda a proteger sus datos en reposo y en
movimiento, OnPremises y en la nube, con llaves maestras, sin cambios en las
aplicaciones.
Tecnología de base de datos Strech mantiene más de los datos históricos de sus
clientes a su alcance de forma transparente sus datos OLTP a Microsoft Azure de forma
segura y sin cambios en las aplicaciones.
Analíticas avanzadas integradas ofrecen la escalabilidad y rendimiento con beneficios
en la construcción y explotación con algoritmos de análisis avanzados directamente en
el SQL Server base de datos transaccional.
34. Lo nuevo en SQL Server 2016
Visualizaciones en dispositivos móviles con aplicaciones nativas
para Windows, iOS y Android.
Simplifique la gestión de datos relacionales y no relacionales
mediante la consulta tanto con T-SQL utilizando Polybase.
Copias de seguridad híbridos más rápidos, alta disponibilidad y
escenarios de recuperación de desastres de copia de seguridad y
restaurar sus bases de datos en las instalaciones de Microsoft
Azure y colocan su SQL Server secundarias en Azure.