Matt Lavery & Joanna Podgoetsky Being a DBA is cool again with SQL 2016 DAT335 A
PerformanceSecurityAvailabilityScalability Operational analytics Insights on operational data; Works with in-memory OLTP and disk-based OLTP In-memory OLTP enhancements Greater T-SQL surface area, terabytes of memory supported, and greater number of parallel CPUs Query data store Monitor and optimize query plans Native JSON Expanded support for JSON data Temporal database support Query data as points in time Always encrypted Sensitive data remains encrypted at all times with ability to query Row-level security Apply fine-grained access control to table rows Dynamic data masking Real-time obfuscation of data to prevent unauthorized access Other enhancements Audit success/failure of database operations TDE support for storage of in- memory OLTP tables Enhanced auditing for OLTP with ability to track history of record changes Enhanced AlwaysOn Three synchronous replicas for auto failover across domains Round robin load balancing of replicas Automatic failover based on database health DTC for transactional integrity across database instances with AlwaysOn Support for SSIS with AlwaysOn Enhanced database caching Cache data with automatic, multiple TempDB files per instance in multi-core environments
PerformanceSecurityAvailabilityScalability Operational analytics Insights on operational data; Works with in-memory OLTP and disk-based OLTP In-memory OLTP enhancements Greater T-SQL surface area, terabytes of memory supported, and greater number of parallel CPUs Query data store Monitor and optimize query plans Native JSON Expanded support for JSON data Temporal database support Query data as points in time Always encrypted Sensitive data remains encrypted at all times with ability to query Row-level security Apply fine-grained access control to table rows Dynamic data masking Real-time obfuscation of data to prevent unauthorized access Other enhancements Audit success/failure of database operations TDE support for storage of in- memory OLTP tables Enhanced auditing for OLTP with ability to track history of record changes Enhanced AlwaysOn Three synchronous replicas for auto failover across domains Round robin load balancing of replicas Automatic failover based on database health DTC for transactional integrity across database instances with AlwaysOn Support for SSIS with AlwaysOn Enhanced database caching Cache data with automatic, multiple TempDB files per instance in multi-core environments
Have you ever…
How do we resolve these problems today?
Query Store: How it can help
Configuring query store ALTER DATABASE AdventureWorks2012 SET QUERY_STORE = ON; Must be on SQL Server 2016 CTP3 of Management Studio Must be enabled through the GUI or the following TSQL:
What we use today SQL Tools Activity Monitor Profiler / Extended Events Management Data Warehouse DMVs sys.dm_exec_query_stats sys.dm_exec_query_plan sys.dm_exec_sql_text Other tools SQLNexus PAL Near real-time ManualChallenging
What we use today (cont.) 3 rd party tools Idera SQL Diagnostics Manager Redgate SQL Monitor Spotlight..etc
Introducing live query stats Features Collect actual metrics while query is running Including CPU, memory, duration, query progress, etc Rapid identification of potential bottlenecks
Live query stats requirements Permissions SHOWPLAN database level permission VIEW SERVER STATE server level permission Permissions necessary to execute the query What’s not supported Queries using columnstore indexes Queries with memory optimized tables Natively compiled stored procedures We’ll revisit this after a demo
Live query stats SQL version support SQL 2016 SQL 2014 SP1+ Azure SQL Latest SQL Management Studio recommended Caveat…. This was valid at the time of writing, in this new world things change quickly
Things to note Requirements Permissions discussed earlier No support for columnstore, memory optimized, or CLR queries Statistics profile infrastructure must be enabled Enable per client session SET STATISTICS XML ON; SET STATISTICS PROFILE ON; Enable per SQL Instance Extended event: query_post_execution_showplan
Things to note Some overhead As query executes data is recorded SSMS reads that data to display graphically DMV to view data sys.dm_exec_query_profiles Query developers Can be used with TSQL Debugger
Key takeaways Evaluate SQL Server Latest Management Studio: Be vocal Talk to others in the community Provide feedback #dat335
The SQL team want your #MSAUIgnite
Contact info Matt blog.matticus.net Joanna Find us at the Data Den in the Expo Hall
Our pick How Available is SQL Server 2016 [DAT336] Thu 19 Nov, 5:00 PM Room 5 & 6 | Warwick Rudd & Henry Rooney Realizing the Benefits of Upgrading Microsoft SQL Server [DAT342] Fri 20 Nov, 10:15 AM Room 8 | Victor Isakov Using Live Query Statistics to see the inner workings of your queries in SQL 2014 and 2016 [DAT442] Fri 20 Nov, 10:15 AM Room 9 | Rob Farley SQL Server 2016 Scale and diagnostics engine enhancements [DAT324] Wed 18 Nov, 1:45 PM Central B | Mike Weiner Securing Data on your terms [DAT331] Thu 19 Nov, 8:15 AM Arena 1A | Kristina Rumpff
Continue your Ignite learning path Visit Microsoft Virtual Academy for free online training visit Visit Channel 9 to access a wide range of Microsoft training and event recordings Head to the TechNet Eval Centre to download trials of the latest Microsoft products