Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
SQLintersectionWednesday, June 12th 2019
10:15am - 11:30am
SQL Server 2008 End of Support (EOS): Azure Planning and Migration Strategies
David Pless
http://www.microsoft.com/2008-eos
The Evolution of SQL Server
SQL Server 2008
SQL Server 2008 R2
SQL Server 2012
SQL Server 2014
SQL Server 2019
SQL Server 2016
SQL Server 2017
Migrate to Azure
free Extended
Security Updates
OR
Upgrade on-premises
Announcing Extended Security Updates for 2008/2008 R2 versions of Windows Server and SQL Server
End of support means the end of security updates
SQL Server 2008
and 2008 R2
2018 2019 2020
Windows Server
2008 and 2008 R2
Find lifecycle support deadlines at:
support.microsoft.com/lifecycle
Current support level End mainstream End extended
SQL Server 2014 Currently supporting all versions July 9, 2019 July 9, 2024
SQL Server 2012SQL Server 2012 SP2+ is in mainstream support until CY 2017
July 11, 2017 July 12, 2022
SQL Server 2008 and SQL Server 2008 R2
SQL Server 2008 and 2008 R2 are in extended support which includes security updates, paid support, and requires purchasing non-security hotfix support
July 8, 2014 July 9, 2019
SQL Server 2005 SQL Server 2005 support ended on April 12, 2016 April 12, 2011 April 12, 2016
Learn more about the SQL Server support lifecycle: support.microsoft.com/lifecycle/
SQL Server 2008 and 2008 R2 will no longer be supported starting on July 9, 2019
When will End of Support Happen?
Security Compliance and Growing Threats
Ransomware
WannaCry
Spectre
Meltdown
Threats on the Rise
S E C U R I T Y &
C O M P L I A N C E
At the end of support for SQL Server
2008 and SQL Server 2008 R2, there
will be no more security updates and
hotfixes from Microsoft, opening the
door to potential business
interruptions.
Don’t take the risk of losing precious
data or having issues with your
business applications performance
because of potential weaknesses of
your environment by not upgrading!
Without security updates you may fail to comply with
standards and regulations that can seriously hamper
your ability to:
• Protect against hackers, malware with root access to
machines, man in the middle scenarios, and government
subpoenas
• Securely purge for customer data, leaving it vulnerable to
access by outside parties
• Utilize E2E data protection across SQL Server and
frequently used together services
Regulatory compliance standards may no longer be met at
end of support, such as:
• GDPR for companies who do business in the EU
• PCI DSS for storing and processing payment data
• HIPAA for medical patient privacy
• GLBA for financial institutions
DiscoverData identification
Tracking
ManageAccess control
Granular authorization
ProtectData security
Privacy by design
Data Discovery & Classification
Scan, identify, and label columns
containing potentially sensitive data in
your database
Access control
Administrators can manage and govern
access to personal data with Windows
authentication and Azure Active
Directory authentication
Transparent Data Encryption
Help secure personal data through
encryption at the physical storage layer
using encryption-at-rest
Metadata queries, SQL queries and
statements
Helps you search and identify personal
data using queries
Role-based access control
Apply role-based access control to help
manage authorization policies in the
database, and to implement the
separation of duties principle
Always Encrypted
Prevent unauthorized, high-privileged
users from accessing data in transit, at
rest, and while in use
Full text queries
Using full-text queries against character-
based data in SQL Server tables
Row-level security
Prevent access to rows in a table (such as
those that may contain sensitive
information) based on characteristics of
the user trying to access the data
Always On Availability Groups
Maximize the business continuity by
enabling High Availability and Disaster
Recovery built-in
Azure Data Catalog
Unlock tribal knowledge by sharing
information about data usage and intent
throughout the organization
Static and Dynamic Data Masking
Control access to sensitive data by
enabling how much data to reveal with
minimal impacts to app layers
SQL Database Threat Detection
Get help detecting anomalous database
activities indicating potential security
threats to the database
ReportDocumentation
Assessment of security
SQL Server Audit
Verify changes to data that occur in a
SQL Server table
SQL Server Audit
Understand ongoing database activities,
and analyze and investigate historical
activity to identify potential threats or
suspected abuse and security violations
SQL Server Audit
Maintain audit trails and gain useful input
for performing a Data Protection Impact
Assessment (DPIA)
Vulnerability assessment
Reports that can serve as a security
assessment for your database. These
reports can also be used as part of a
Data Protection Impact Assessment
(DPIA)
D A T A S E C U R I T Y &
P R I V A C Y S O L U T I O N S
F R O M S Q L S E R V E R
SQL Server 2016 / 2017+ adds
the largest number of security
features ever released!
Help safeguard your business
with a suite of security features
to help with compliance
Where can we go and whatare we moving?
SQL Server Components
•
Transactional
Merge
Snapshot
•
•
•
•
•
•
•
•
•
•
•
•
•
master
model
msdb
tempdb
•
•
•
•
•
▪ A single database in Azure
▪ Components that exist outside of the database will need an equivalent technology
▪ Generally a poor option for existing applications
▪ No support for controlling the database compatibility level
▪ No patching required; updates are built-in
SQL Server Deployment Options
• Capable of multiple databases
• Most instance level shared components are supported• SQL Agent jobs, cross db joins,
Global temp tables, CLR
• Strong option for existing applications
• Vendor applications will require some support
• No patching required; updates are built-in
• SQL Server on Windows / Linux supported
• Full SQL Server installation experience
• Does not require external technologies to support Business Intelligence Requirements
• Patching and updates are the responsibility of the administrator
▪ Bridges the gap between Azure SQL Database and SQL Server The goal is to provide close to 100% surface area compatibility SQL Server
▪ Supports backward compatibility to SQL Server 2008 databases Direct migration from SQL Server 2005 databases is supported, compatibility levels will be updated to
SQL Server 2008 (100)
▪ Use familiar SQL features in SQL Database Managed Instance Native backup and restore
Cross-database queries and transactions
Global ##temp tables are supported
Broad security features including TDE, SQL Audit, Always Encrypted and Dynamic Data Masking
SQL Agent, DBMail, and Alerts for workload orchestration improved awareness
Enablers including Change Data Capture, Service Broker, Transactional Replication, and CLR
DMVs, XEvents, and Query Store for troubleshooting
Encryption-in-flight - (aka Transport Layer Security TLS)
What is SQL Database Managed Instance?
New Features Post Migration
Enhanced Integration Services
Data Quality Services
Master Data Services
Master Data Services Add-in for Excel
Enhanced productivity and
performance
Power View
Configurable reporting alerts
Reporting as SharePoint Shared
Service
Data-tier application
component project FileTable
build on FILESTREAM
Remote Blob Storage with
SharePoint 2016
Statistical Semantic Search
Contained Database
Authentication
Automatic Plan Correction
Enhanced connectors, new
transformations, object-level
security, ragged hierarchies**
Mobile BI
Enterprise-grade Analysis Services
In-Memory analytics with Analysis
Services Tabular Model
Enhanced multidimensional
models
Modernized Reports and
Dashboard with support for
Mobile BI
Create mobile reports using the
SQL Server Mobile Report
Publisher
Consume with Power BI mobile
apps
HA for StreamInsight, complex
event processing
Import PowerPivot models into
Analysis Services
Advanced tabular mode
Direct Query
Always Encrypted
Dynamic Data Masking
Row-Level Security
Auditing
CC certification at EAL2 level for
SQL Server 2016
Backup encryption support
Enhanced separation of duties
Default schema for groups
Hybrid Transactional and Analytical
Processing with real-time insights
using In-Memory OLTP and
Clustered Columnstore
In-Memory Data Warehouse with
Clustered Columnstore Indexes
Unparalleled scalability with
Windows Server 2016, with 24TB
memory and Windows Server
2016 max cores
Automatic failover between three
synchronous replicas. Up to eight
secondary replicas
Buffer Pool Extension to SSDs
Adaptive Query Processing
Resource Governor with CPU,
Memory and IO Governance
Delayed Durability of Memory-
Optimized Tables
Query optimization
enhancements
Query Store
Local DB runtime (Express)
Machine Learning Services with
built-in support for Python and R
Operationalize Machine Learning
algorithms with In-Database
Machine Learning support
RRE APIs with full parallelism and
no memory limits for
scale/performance
Built-in In-memory Advanced
Analytics
Advanced data mining
Disaster Recovery environment in
Azure VMs using Always On
Availability groups
Stretch database
Hybrid scenarios with SSIS
Enhanced backup to Azure
Easy migration to the cloud
Secure backups to Azure with
managed backups
Operational analytics
Enhanced In-Memory DW with
Clustered Columnstore
Big Data integration with Hadoop
and Azure Blob Storage
Big Data Queries with T-SQL
Enhanced database caching
Support for Linux
(RHEL, Suse, Ubuntu)
Support for Docker containers
and Kubernetes
Enhanced Always On Availability Groups with easy GUI-based Wizard
What’s New in SQL Server 2017 Since SQL Server 2008 & 2008 R2
JSON support
Spatial features, Full Globe
and arcs
Support for Temporal Tables
Graph data support
SQL Server 2016: Everything Built-in
The above graphics were published by Gartner, Inc. as part of a larger research document and should be evaluated in the context of the entire document. The Gartner document is available upon request from Microsoft. Gartner does not endorse any vendor, product or service depicted in its
research publications, and does not advise technology users to select only those vendors with the highest ratings or other designation. Gartner research publications consist of the opinions of Gartner's research organization and should not be construed as statements of fact. Gartner disclaims all
warranties, expressed or implied, with respect to this research, including any warranties of merchantability or fitness for a particular purpose.
Most consistent experience from on-premises to cloud
Microsoft Tableau Oracle
$120
$480
$2,230
Self-service BI per user
In-memory across all workloads
built-
in
built-
in
built-
in
built-
in
built-
in
TPC-H non-clustered results as of 04/06/15, 5/04/15, 4/15/14 and 11/25/13, respectively. http://www.tpc.org/tpch/results/tpch_perf_results.asp?resulttype=noncluster
at massive scale
0 14
0 03
0
3429
2215
5
2216
6
43
20
69
18
49
74
3
0
10
20
30
40
50
60
70
80
1 2 3 4 5 6 7
SQL Server Oracle MySQL2 SAP HANA TPC-H
Oracle is #6#2
SQL Server
#1
SQL Server
#3
SQL Server
National Institute of Standards and Technology Comprehensive Vulnerability Database update 5/4/2015
1MPredictions per second
End-to-end mobile BI
on any device
Choice of platform
and language
Most secure
over the last 7 years
0
20
40
60
80
100
120
140
160
180
200
Vu
lnera
bil
itie
s (2
01
0-2
01
6)
A fraction of the cost
Se
lf-s
erv
ice
BI
pe
r u
se
r
Only commercial DB
with AI built-in
Microsoft Tableau Oracle
$120
$480
$2,230
Industry-leading
performance
1/10
Most consistent data platform
#1 TPC-H performance
1TB, 10TB, 30TB
#1 TPC-E performance
#1 price/performance
T-SQL
Java
C/C++
C#/VB.NET
PHP
Node.js
Python
Ruby
R
R and Python +
in-memory at massive scale
Native T-SQL scoring
SQL Server 2017 I N D U S T R Y - L E A D I N G P E R F O R M A N C E A N D S E C U R I T Y N O W O N L I N U X A N D D O C K E R
Private cloud Public cloud
In-memory across all workloads
1/10th the cost of Oracle
SQL Server 2017 Key New Functionality
1 0 1 0
0 1 0 1
0 1 1 0
Statistics
Degree
earned
Position
Skill
Andy
Smith
B.S.
Science,
Finance
Business
Analyst
RR and Python +
in-memory at massive scale
Native T-SQL scoring
Qu
ery
tim
es
Plan 1 Plan 2 Plan 3 Plan 2
Revert to
previously
effective plan
O P T I M I Z E D Q U E R Y
P R O C E S S I N GImproved efficiency with
Adaptive Query Processing
Optimize memory grants for repeatable queries to
avoid over or under allocating
Adjust data join strategy
for small or large tables to speed joins
Batch mode for memory grant feedback and
adaptive joins
1 0 1 0 1 0
1 0 1 0 1 0
1 0 1 0 0 1
1 0 1 0 1 0
0 1 0 1 0 1
1 0 1 0 1 0
0 1 0 1 0 1
1 0 1 0 1 0
0 1 0 1 0 1
1 0 1 0 1 01 0 1 0 1 0
0 1 0 1 0 1
1 0 1 0 1 0
0 1 0 1 0 1
1 0 1 0 1 0
0 1 0 1 0 1
1 0 1 0 1 0
1 0 1 0 1 0
0 1 0 1 0 1
1 0 1 0 1 0
1 0 1 0 1 0
1 0 1 0 1 0
1 0 1 0 0 1
0 1 0 1 0 1
0 1 0 1 0 1
0 0 1 0 1 0
1 0 1 0 1 0
1 0 1 0 1 0
1 0 1 0 0 1
1 0 1 0 1 0
1 0 1 0 1 0
1 0 1 0 0 1
1 0 1 0 1 0
1 0 1 0 1 0
1 0 1 0 0 1
1 0 1
0 1 0
1 0 1
1 0 1
0 1 0
1 0 1
1 0 1
0 1 0
1 0 1
1 0 1
0 1 0
1 0 1
1 0 1 0 1 0
1 0 1 0 1 0
1 0 1 0 0 1
Industry-leading performance
1 0 1 0
0 1 0 1
0 1 1 0
A U T O M A T I C A L L Y F I X
P R O B L E M S W I T H O U T
T U N I N GBetter performance with
Automatic Plan Correction
Continuous performance plan monitoring and
analysis
Detect problematic plans
Automatically f ix performance problems caused by
SQL plan choice regressions
Industry-leading performance
Qu
ery
tim
es
Plan 1 Plan 2 Plan 3 Plan 2
Revert to previously
effective plan
Industry-leading performance
0100101010110
In-Memory ColumnStore
In-Memory OLTP
ETL !
I N D U S T R Y - L E A D I N G
P E R F O R M A N C E W I T H
S Q L S E R V E R 2 0 1 7Real-time operational analytics
Bring analytics to your operational data
Improve transactional performance with In-
Memory OLTP
Speed analytics and reduce storage needs with In-
Memory ColumnStore
LOB compression in ColumnStore index
SQL Server 2019 - The Intelligent DatabaseThe Intelligent Query Processing Feature Family
• Intelligent Query
Processing
• Gain performance insights
anytime and anywhere with
Lightweight Query Profiling
• Accelerating I/O
performance with
Persistent Memory
The intelligent database
Intelligence Query Processing (140)
IQP Feature
db_compatibility_
level
Supported in
Azure SQL DB
Supported in
SQL Server DescriptionAdaptive Joins (Batch Mode) 140 Yes, under compatibility
level 140Yes, starting in SQL Server 2017 under compatibility level 140
Adaptive joins dynamically select a join type during runtime based on actual input rows.
Interleaved Execution 140 Yes, under compatibility level 140
Yes, starting in SQL Server 2017 under compatibility level 140
Use the actual cardinality of the multi-statement table valued function (MSTVF) encountered on first compilation instead of a fixed guess.
Memory Grant Feedback (Batch Mode) 140 Yes, under compatibility level 140
Yes, starting in SQL Server 2017 under compatibility level 140
If a batch mode query has operations that spill to disk (tempdb), add more memory for consecutive executions. If a query wastes > 50% of the memory allocated to it, reduce the memory grant side for consecutive executions.
Intelligence Query Processing (150)
IQP Feature
db_compatibility_
level
Supported in Azure
SQL Database
Supported in SQL
Server DescriptionApproximate Count Distinct
150 Yes, public preview Yes, starting in SQL Server 2019 CTP 2.0, public preview
Provide approximate COUNT DISTINCT for big data scenarios with the benefit of high performance and a low memory footprint.
Batch Mode on Rowstore 150 Yes, under compatibility level 150, public preview
Yes, starting in SQL Server 2019 CTP 2.0 under compatibility level 150, public preview
Provide batch mode for CPU-bound relational DW workloads without requiring ColumnStore indexes.
Memory Grant Feedback (Row Mode)
150 Yes, under compatibility level 150, public preview
Yes, starting in SQL Server 2019 CTP 2.0 under compatibility level 150, public preview
If a row mode query has operations that spill to disk, add more memory for consecutive executions. If a query wastes > 50% of the memory allocated to it, reduce the memory grant side for consecutive executions.
Scalar UDF Inlining 150 (SQL Server only) No Yes, starting in SQL Server 2019 CTP 2.1 under compatibility level 150, public preview
Scalar UDFs are transformed into equivalent relational expressions that are “inlined” into the calling query, often resulting in significant performance gains.
Table Variable Deferred Compilation
150 Yes, under compatibility level 150, public preview
Yes, starting in SQL Server 2019 CTP 2.0 under compatibility level 150, public preview
Use the actual cardinality of the table variable encountered on first compilation instead of a fixed guess.
• Always Encrypted with secure enclaves
• Data Classification and auditing built-in
• Manage certificates easier with SQL Configuration Manager
plaintext ciphertext
Enhanced
client driver
Enclave
plaintext
Always Encrypted with secure enclaves
Mission Critical Security Confidential Computing
SQL Server 2019 - Mission-critical AvailabilityEnhanced performance, security, and availability
https://aka.ms/sqlserver2019whatsnew
SQL Server 2017 andPaths to Azure VMs and PaaS
Azure Data Modernization Choices
SQL
SQL
TRANSFORM WITH A ZURE
Upgrade
Upgrade to Windows Server 2016 or SQL Server
2017 and get cloud and DevOps ready
ON-PREMISES
Rehost
Migrate 2008 and 2008 R2 workloads to
Azure VM or Azure SQL Database MI
Refactor, Rearchitect, or Rebuild
Innovate with Windows Server containers
and Azure SQL Database MI
Free extended
security updates
Save more with Azure Hybrid Benefit
Buy extended security updates
Modernize on your terms with Microsoft
Paths to upgrade and stay protected
free Extended Security Updates
Migration simplified with free tools
On-premises
SQL Server
2005 - 2017
Assessment tools
SSMA & DMA
Azure
SQL My
My
Azure DMS
VPN or
Express Route
Internet
SQL
SQL
Cloud
SQL Server to
Azure SQL DB MI
Lift-and-shift with no application
code change needed
• Database Migration Assistant
(DMA) on schema migration
• Database Migration Services
(DMS) for massive cloud
migration at near zero
downtime, online and offline
• Free DMS offline; free online up
to 6 months with 4 vCores
Database migration guide: https://datamigration.microsoft.com/
© SQLintersection. All rights reserved.http://www.SQLintersection.com
Assessment and Finished Product
Data Migration Assistant (DMA)
Migrating from SQL Server 2008 & 2008 R2to SQL Server 2017
MigrateUse Data Migration Assistant (DMA)
migrate schema and database
2 3 OptimizeRemediate applications and perform
validation tests with Database
Experimentation Assistant (DEA)
1Discover & AssessDownload and install the MAP Toolkit for
discovery and use Data Migration Assistant
(DMA) to assess schema and database
Backup and restore: Back up taken on SQL Server 2008 or SQL Server 2008 R2 can be restored to SQL Server 2017
Tools: MAP Toolkit, Database Migration Assistant (DMA), Database Experimentation Assistant (DEA)
Database mirroring: Database mirroring is supported if principal is running SQL Server 2008 SP3 or
later, or SQL Server 2008 R2 SP2 or later, and mirror is running SQL Server 2017. If a failover, either
automatic or manual, happens such that SQL Server 2017 instance becomes principal, SQL Server
2008 or SQL Server 2008 R2 instance becomes mirror and will NOT receive changes from principal.
Tools and considerations
Log shipping: Log shipping is supported if primary is running SQL Server 2008 SP3 or
later, or SQL Server 2008 R2 SP2 or later, and secondary is running SQL Server 2017. If
a failover, either automatic or manual, happens such that SQL Server 2017 instance
becomes primary, SQL Server 2008 or SQL Server 2008 R2 instance becomes
secondary and will NOT receive changes from primary
Bulk load: Tables can be bulk copied from SQL Server 2008 or SQL Server 2008 R2 to
SQL Server 2017
Migrating from SQL Server 2008 & 2008 R2 to Azure VMs
MigrateUse Azure Database Migration
Service (DMS) to migrate
schema and database
2 3 OptimizeRemediate applications and perform
validation tests with Database
Experimentation Assistant (DEA), using
Database Migration Guide as key resource
1Discover & AssessDownload and install the MAP Toolkit to
identify and discover data sources and use
Data Migration Assistant (DMA) to assess your
source database before migrating your SQL
Server instance
Tools: MAP Toolkit, Database Migration Assistant (DMA), Database Experimentation Assistant (DEA)
Learn how to create an instance of SQL Server on Azure VMs here.
Tools and considerations
Migrating from SQL Server 2008 & 2008 R2to Azure SQL Database
MigrateUse Azure Database Migration
Service (DMS) to migrate schema
and database
2 3 OptimizeRemediate applications and perform
validation tests with Database
Experimentation Assistant (DEA), using
Database Migration Guide as key resource
1Discover & AssessDownload and install the MAP Toolkit to
identify and discover data sources and use
Data Migration Assistant (DMA) to assess your
source database before migrating your SQL
Server instance
Tools: MAP Toolkit, Database Migration Assistant (DMA), Azure Database Migration Service (DMS)
Bulk load: Tables can be bulk copied out from SQL Server 2008 or SQL Server 2008 R2 and then bulk
copied into Azure SQL Database
Tools and considerations
Migrating from SQL Server 2008 & 2008 R2to Azure SQL Database Managed Instance
MigrateUse Azure Database Migration
Service (DMS) to migrate schema
and database
2 3 OptimizeRemediate applications and perform
validation tests with Database
Experimentation Assistant (DEA), using
Database Migration Guide as key resource
1Discover & AssessDownload and install the MAP Toolkit to
identify and discover data sources and use
Data Migration Assistant (DMA) to assess your
source database before migrating your SQL
Server instance
Tools: Migration supported by Azure Database Migration Service (DMS)
Bulk load: Tables can be bulk copied out from SQL Server 2008 or SQL Server 2008 R2 and then bulk
copied into Azure SQL Database Managed Instance
Tools and considerations
Database Compatibility andConsiderations
▪ OLTP Application Location Migrate applications versus Remote Connectivity
▪ Enterprise Reporting and Business Intelligence Recommendation: Express Route or Migrate Reporting to Azure
▪ Network Scenarios for Azure Point to Site
Site to Site
Express Route
▪ Licensing / Feature Considerations
▪ Leverage Trace Flag 4199 to test pre-migration
▪ Database Compatibility Level
SQL Server Migration Consideration Checklist
Public Endpoint for Managed Instance
Database Compatibility Levels in SQL Server
SQL Server 2000 Support (80 compatibility mode)
Database Compatibility Levels in SQL Server
SQL Server 2005 Support (90 compatibility mode)
Database Compatibility Levels in SQL Server
SQL Server 2008/R2 Support (100 compatibility mode)
Database Compatibility Levels in SQL Server
• Upgrade (including restore) retains compat level of database• Use this to maintain functional compatibility
• T-SQL reserved words• Query execution functionality• Protect against breaking changes that are database scoped• Does not protect from discontinued features
• Query Performance• Not a guarantee of performance• Microsoft will work with you if you encounter query plan changes
SQL Server Version Default Compat Level
SQL Server 2017 140
SQL Server 2016 130
SQL Server 2014 120
SQL Server 2012 110
SQL Server 2008 R2SQL Server 2008
100
We keep default level for Azure DB updated
• 120 introduces new cardinality estimator for Queries• 130 and 140 introduce new query plan and execution features• 130 and 140 include by default QP fixes under trace flag 4199
• Trace flag 4199 applies for new fixes• Query Store to observe and address performance differences• Does not affect server wide functionality• Model can be changed to affect new databases
© SQLintersection. All rights reserved.http://www.SQLintersection.com
Database Migration Guide
https://datamigration.microsoft.com/
Content Walk Through
Validation and Optimization
▪ Query regressions due to change in CE version Solution: Leverage Query Store to baseline and find regressions and force healthy
plans
Common Performance Scenarios
▪ Sensitivity to parameter sniffing Solution: Leverage the RECOMPILE hint or add the option OPTIMIZE FOR option to
the stored procedure
Common Performance Scenarios
▪ Missing indexes Solution: Look for duplicate, redundant, rarely used and completely unused indexes
with the Database Engine Tuning Advisor and Missing Index DMVs
Common Performance Scenarios
Pre-existing maintenance scripts:• Index Information - Output
index info on all databases, including duplicate, redundant, rarely used and unused indexes
• Index Creation - Looks for relevant missing indexes in SQL Server
▪ Inability for predicates to filter data Solution: For better-quality plan, predicates must be SARGable, or Search
Argumentable. These scenarios are addressed via T-SQL development
▪ Examples of non-SARGable predicates: Implicit data conversions, like VARCHAR to NVARCHAR, or INT to VARCHAR Look for
runtime CONVERT_IMPLICIT warnings in the Actual Execution Plans Converting from one type to another can also cause a loss of precision.
Complex undetermined expressions such as WHERE UnitPrice + 1 < 3.975, but not WHERE UnitPrice < 320 * 200 * 32
Expressions using functions, such as WHERE ABS(ProductID) = 771 or WHERE UPPER(LastName) = 'Smith'
Strings with a leading wildcard character, such as WHERE LastName LIKE '%Smith', but not WHERE LastName LIKE 'Smith%'
Common Performance Scenarios
▪ Use of Table Valued Functions (Multi-Statement vs Inline) performance issues due to fixed estimates Solution(s):
T-SQL If the Multi-Statement TVF is single statement only, convert to Inline TVF
SQL Server 2017+ Features SQL Server 2017 database compatibility level 140 provides the Adaptative
Query Processing (AQP) capability which may provide performance improvements to avoid rewriting
More complex scenarios may require using intermediate results stored in Memory-Optimized tables or leveraging temporary tables
Common Performance Scenarios
▪ Create passive nodes / replicas for Always On / Clustering
▪ Leverage SQL Server 2016 / 2017 Security Features Row Level Security and Dynamic Data Masking
Always Encrypted
Advanced Threat Detection and Auditing Policies
▪ Evaluate Performance Features Columnstore Indexing, In Memory OLTP, Upgrade SSMS 17.8.x
▪ Ensure Maintenance Scripts are running correctly DBCC CHECKDB, Index and Statistics Maintenance
▪ Ensure that all backup scripts are functioning correctly For Azure Migrations consider leveraging:
SQL Server Managed Backup
Microsoft Azure and Backup and Restore for SQL Server in Azure Virtual Machines
Other Post Migration Steps
© SQLintersection. All rights reserved.http://www.SQLintersection.com
References
▪ Azure and SQL Server Performance Center
http://aka.ms/SQLPerfCenter
▪ Enable plan-affecting SQL Server query optimizer behavior that can be controlled by different trace flags on a specific-query level
https://support.microsoft.com/en-us/help/2801413/enable-plan-affecting-sql-server-query-optimizer-behavior-that-can-be
▪ Recommended updates and configuration options for SQL Server 2012 and SQL Server 2014 with high-performance workloads
https://support.microsoft.com/en-us/help/2964518/recommended-updates-and-configuration-options-for-sql-server-2012-and
Don’t forget to complete an online evaluation!
SQL Server 2008 End of Support (EOS): Azure Planning and Migration Strategies
Your evaluation helps organizers build better conferences and helps speakers improve their sessions.
Questions?
Thank you!
Save the DateWeek of November 18, 2019
We’re back in Vegas baby!
www.SQLintersection.com