Edinburgh
SQL Server 2016
Discovery Day
@SQLScot @sqltomato
About Me
• Data Platform Consultant for Quorum in Edinburgh
• Using SQL Server since version 7.0
• MCDBA, MCITP and MCSE in SQL Server
• MCS in Azure Implementation and Hyper-V
• Certified Technical Trainer
• @sqltomato
• Sqltomato.com
SQL Server 2016 - Overview
How Microsoft develop SQL
Cloud-first but not cloud-only
Many interesting and compelling on-premises  cloud scenarios
Think of APS as the “evolution” of Microsoft's current SQL Server Parallel Data Warehouse product
SQL Server and
APS
Azure
SQL Virtual
Machines
Azure
SQL Database
Azure
SQL Data
Warehouse
SQL Server Physical through to PaaS
Shared
Lower Cost
Dedicated
Higher
Cost
Higher Administration Lower Administration
Off Premises
Hybrid Cloud
Physical
SQL Server
Physical Machines(raw Iron)SQL
Virtual
SQL Server Private Cloud
Virtualized Machines +
Appliances
Infrastructure
as a service
SQL Server in Azure VM
Virtualized machinesSQL
Platform as
a service
Software as
a services
SQL Database
Virtualized Databases
SQL
On Premises
What’s New?
 Live Query Statistics
 Query Store
 Temporal Tables
 Stretch Database
 Availability Groups
 T-SQL Extras
 Others
 Others – Business Intelligence
Live Query Statistics
 View the live execution plan of an active query
 Because this data is available in real time without needing
to wait for the query to complete, these execution
statistics are extremely useful for debugging query
performance issues
Live Query Statistics
 Not Supported:
 Queries using columnstore indexes
 Queries with memory optimized tables
 Natively compiled stored procedures
Query Store
 Provides database administrators with insight on query
plan choice and performance
 Stores history of queries, plans, and runtime statistics
 Has graphical interface! - Important for adoption
Query Store
Durability latency controlled by DB
option
DATA_FLUSH_INTERNAL_SECONDS
Compile
Execute
Plan store
Runtime
stats
Query
Store
schema
Stores all plan choices and performance metrics
Works across restarts / upgrades / recompiles
Query Store
Query Store
 Easy to enable either T-SQL or right-click per database
option
 ALTER DATABASE AdventureWorks2012 SET
QUERY_STORE = ON;
 To look at current options
 sys.database_query_store_options
Temporal Tables
 Tracking and analyzing changes in data is often important
 Easy to use and setup
 System versioned tables – SQL Server keeps track of the versioning
 Provides correct information about stored facts at any point in time, or
between two points in time using BETWEEN
 Standard Edition feature
Temporal Tables
 Simple syntax
Temporal Tables
 Temporal tables work by creating a new system versioned table
Temporal table (actual data)
* Old versions
History table
Stretch Database
 Per table archiving rows into the PaaS service Azure SQL
v12 Database
 Creates a database such as
 Creates a Standard service tier at the S3 performance
level 250GB maximum size (~£92/month)
 Blurring the line between on premise and cloud -
achieving a hybrid solution
Stretch Database
 Not Supported:
 Replicated, Memory-optimized or Change Data Capture
tables
 geometry, geography, XML, UDT types
 UPDATE or DELETE operations!
 ALTER TABLE operations
 Uniqueness is not enforced for UNIQUE constraints and
PRIMARY KEY constraints
Availability Groups
 Although a niche enhancement - Load-balancing of read-
intent connection requests is now supported across a set
of read-only replicas
 Much more relevant for our infrastructure team
management - Group Managed Service Accounts are now
supported for Always On Failover Clusters - Windows
Server 2012 R2, an update is required to avoid temporary
downtime after a password change!
 Support for distributed transactions and the distributed
transaction co-ordinator on Windows Server 2016
Azure Secondaries
 You can now have readable secondaries when using PaaS
under any tier and therefore can be used to offload read-
only workloads such as reporting jobs.
 With the addition of Azure Active Directory customers
can manage user access to both primary and all secondary
databases and eliminating the need for managing
credentials in databases all together.
T-SQL Extras
 A new query hint NO_PERFORMANCE_SPOOL can prevent
a spool operator from being added to query plans. This
can improve performance when many concurrent queries
are running with spool operation
 You can now TRUNCATE TABLE WITH PARTITIONS to only
truncate specified partitions of a table
Others
 JSON Support – using FOR JSON like FOR XML
 Backup to Azure using block blobs – more space, allows
striping
 tempdb - files automatically provisioned
 Option in installation for setting up Instant File
Initialisation
 Maintenance Plans – Have many more options including
index fragmentation level options
Others
 Check for Updates! in Management Studio
Others
 New report replaces the need to use the Management Data Warehouse
to analyze which tables and stored procedures are candidates for in-
memory optimization
 New Transaction Performance Analysis Overview report
Others
 Azure SQL Database PaaS (Platform as a Service) solution
now has powerful Premium tiers – P11 with 1750 DTU
(Database Throughput Unit)
 DTU is a blended measure of CPU, memory, reads, and
writes
 You can quickly use the images to build an IaaS SQL Server
2016 test VM in Azure to test and learn these new
technologies
Others – Business Intelligence
 R now in Business Intelligence
 Polybase included – previously only in PDW (Parallel Data
Warehouse)
 Integration Services (SSIS) fans will be happy to know that
designer now supports previous versions.
 Many new features in Reporting Services including KPI’s
Others – Business Intelligence
Resources
 Live Query Statistics - https://msdn.microsoft.com/en-
US/library/dn831878.aspx
 Query Store - https://msdn.microsoft.com/en-US/library/dn817826.aspx
 Stretch Database - https://msdn.microsoft.com/en-US/library/dn935011.aspx
 Availability Groups – https://msdn.microsoft.com/en-
US/library/hh710054.aspx#loadbalancing
 Truncate Table - https://msdn.microsoft.com/en-US/library/ms177570.aspx
 Management Studio - https://msdn.microsoft.com/en-
us/library/mt238290.aspx
THANK YOU

Sql server 2016 Discovery Day

  • 1.
    Edinburgh SQL Server 2016 DiscoveryDay @SQLScot @sqltomato
  • 2.
    About Me • DataPlatform Consultant for Quorum in Edinburgh • Using SQL Server since version 7.0 • MCDBA, MCITP and MCSE in SQL Server • MCS in Azure Implementation and Hyper-V • Certified Technical Trainer • @sqltomato • Sqltomato.com
  • 3.
    SQL Server 2016- Overview
  • 4.
    How Microsoft developSQL Cloud-first but not cloud-only Many interesting and compelling on-premises  cloud scenarios Think of APS as the “evolution” of Microsoft's current SQL Server Parallel Data Warehouse product SQL Server and APS Azure SQL Virtual Machines Azure SQL Database Azure SQL Data Warehouse
  • 5.
    SQL Server Physicalthrough to PaaS Shared Lower Cost Dedicated Higher Cost Higher Administration Lower Administration Off Premises Hybrid Cloud Physical SQL Server Physical Machines(raw Iron)SQL Virtual SQL Server Private Cloud Virtualized Machines + Appliances Infrastructure as a service SQL Server in Azure VM Virtualized machinesSQL Platform as a service Software as a services SQL Database Virtualized Databases SQL On Premises
  • 6.
    What’s New?  LiveQuery Statistics  Query Store  Temporal Tables  Stretch Database  Availability Groups  T-SQL Extras  Others  Others – Business Intelligence
  • 7.
    Live Query Statistics View the live execution plan of an active query  Because this data is available in real time without needing to wait for the query to complete, these execution statistics are extremely useful for debugging query performance issues
  • 8.
    Live Query Statistics Not Supported:  Queries using columnstore indexes  Queries with memory optimized tables  Natively compiled stored procedures
  • 9.
    Query Store  Providesdatabase administrators with insight on query plan choice and performance  Stores history of queries, plans, and runtime statistics  Has graphical interface! - Important for adoption
  • 10.
    Query Store Durability latencycontrolled by DB option DATA_FLUSH_INTERNAL_SECONDS Compile Execute Plan store Runtime stats Query Store schema Stores all plan choices and performance metrics Works across restarts / upgrades / recompiles
  • 11.
  • 12.
    Query Store  Easyto enable either T-SQL or right-click per database option  ALTER DATABASE AdventureWorks2012 SET QUERY_STORE = ON;  To look at current options  sys.database_query_store_options
  • 13.
    Temporal Tables  Trackingand analyzing changes in data is often important  Easy to use and setup  System versioned tables – SQL Server keeps track of the versioning  Provides correct information about stored facts at any point in time, or between two points in time using BETWEEN  Standard Edition feature
  • 14.
  • 15.
    Temporal Tables  Temporaltables work by creating a new system versioned table Temporal table (actual data) * Old versions History table
  • 16.
    Stretch Database  Pertable archiving rows into the PaaS service Azure SQL v12 Database  Creates a database such as  Creates a Standard service tier at the S3 performance level 250GB maximum size (~£92/month)  Blurring the line between on premise and cloud - achieving a hybrid solution
  • 17.
    Stretch Database  NotSupported:  Replicated, Memory-optimized or Change Data Capture tables  geometry, geography, XML, UDT types  UPDATE or DELETE operations!  ALTER TABLE operations  Uniqueness is not enforced for UNIQUE constraints and PRIMARY KEY constraints
  • 18.
    Availability Groups  Althougha niche enhancement - Load-balancing of read- intent connection requests is now supported across a set of read-only replicas  Much more relevant for our infrastructure team management - Group Managed Service Accounts are now supported for Always On Failover Clusters - Windows Server 2012 R2, an update is required to avoid temporary downtime after a password change!  Support for distributed transactions and the distributed transaction co-ordinator on Windows Server 2016
  • 19.
    Azure Secondaries  Youcan now have readable secondaries when using PaaS under any tier and therefore can be used to offload read- only workloads such as reporting jobs.  With the addition of Azure Active Directory customers can manage user access to both primary and all secondary databases and eliminating the need for managing credentials in databases all together.
  • 20.
    T-SQL Extras  Anew query hint NO_PERFORMANCE_SPOOL can prevent a spool operator from being added to query plans. This can improve performance when many concurrent queries are running with spool operation  You can now TRUNCATE TABLE WITH PARTITIONS to only truncate specified partitions of a table
  • 21.
    Others  JSON Support– using FOR JSON like FOR XML  Backup to Azure using block blobs – more space, allows striping  tempdb - files automatically provisioned  Option in installation for setting up Instant File Initialisation  Maintenance Plans – Have many more options including index fragmentation level options
  • 22.
    Others  Check forUpdates! in Management Studio
  • 23.
    Others  New reportreplaces the need to use the Management Data Warehouse to analyze which tables and stored procedures are candidates for in- memory optimization  New Transaction Performance Analysis Overview report
  • 24.
    Others  Azure SQLDatabase PaaS (Platform as a Service) solution now has powerful Premium tiers – P11 with 1750 DTU (Database Throughput Unit)  DTU is a blended measure of CPU, memory, reads, and writes  You can quickly use the images to build an IaaS SQL Server 2016 test VM in Azure to test and learn these new technologies
  • 25.
    Others – BusinessIntelligence  R now in Business Intelligence  Polybase included – previously only in PDW (Parallel Data Warehouse)  Integration Services (SSIS) fans will be happy to know that designer now supports previous versions.  Many new features in Reporting Services including KPI’s
  • 26.
    Others – BusinessIntelligence
  • 27.
    Resources  Live QueryStatistics - https://msdn.microsoft.com/en- US/library/dn831878.aspx  Query Store - https://msdn.microsoft.com/en-US/library/dn817826.aspx  Stretch Database - https://msdn.microsoft.com/en-US/library/dn935011.aspx  Availability Groups – https://msdn.microsoft.com/en- US/library/hh710054.aspx#loadbalancing  Truncate Table - https://msdn.microsoft.com/en-US/library/ms177570.aspx  Management Studio - https://msdn.microsoft.com/en- us/library/mt238290.aspx
  • 28.