SlideShare ist ein Scribd-Unternehmen logo
1 von 88
Downloaden Sie, um offline zu lesen
#SQLSAT895
SQL Server Modernization
Gianluca Hotz
#SQLSAT895
Who am I?
Gianluca Hotz | @glhotz | ghotz@ugiss.org
Independent consultant
20+ years on SQL Server (from 4.21 in 1996)
Database modeling and development, sizing and administration,
upgrade and migration, performance tuning
Community
20+ years Microsoft MVP SQL Server/Data Platform (since 1998)
VMware Experts SQL Server
Founder and president UGISS (PASS Chapter)
Co-organizer DAMAG Meetup community
#SQLSAT895
Organizers
GetLatestVersion.it
#SQLSAT895
Sponsors
#SQLSAT895
Modernization
What, where & why
#SQLSAT895
Modernization?
Low Complexity
Version upgrades (e.g. 2008 R2 -> 2017)
Edition upgrades/downgrades (e.g. Standard -> Enterprise)
Medium Complexity
Virtualization
Consolidation
Adding HA/DR
High Complexity
Re-Platforming e.g. Oracle -> SQL Server or Azure SQL Database
Re-Architecting e.g. SQL Server -> Azure SQL Datawarehouse/Data Lake
#SQLSAT895
SQL Server flavors
On-Premises
SQL Server (Database Engine, SSAS, SSRS, SSIS, DQS, MDS, MLS)
Analytics Platform System (APS was SQL Server PDW)
IaaS
SQL Server (Database Engine, SSAS, SSRS, SSIS, DQS, MDS, MLS)
VMs, Containers/Kubernetes
PaaS
Azure SQL Database
Azure Synapse Analytics (was Azure SQL Data Warehouse)
Amazon RDS for SQL Server
#SQLSAT895
Azure PaaS Operational Data Services
SQL-based
• Azure SQL Database
• Traditional
• Managed Instance
• Azure Database for PostgreSQL
• Azure Database for MySQL
• Azure Database for MariaDB
NoSQL-based
• Azure Cosmos DB
• Redis Cache
My
#SQLSAT895
Azure Modern Datawarehouse
Ingestion
• Azure Event Hubs
• Azure Data Factory
Storage
• Azure Blob Storage
• Azure Data Lake Storage
Preparation
• Azure Databricks
• Azure Data Lake Analytics
• Azure HDInsight
Model/serve
• Azure Synapse Analytics (was Azure SQL Datawarehouse)
• Azure Analysis Services
• Power BI
#SQLSAT895
SQL Server 2019
Big Data Clusters
Compute pool
SQL Compute
Node
SQL Compute
Node
SQL Compute
Node
…
Compute pool
SQL Compute
Node
IoT data
Directly
read from
HDFS
Persistent storage
…
Storage pool
SQL
Serve
r
Spark
HDFS Data Node
SQL
Serve
r
Spark
HDFS Data Node
SQL
Serve
r
Spark
HDFS Data Node
Kubernetes
pod
Analytics
Custom
apps BI
SQL Server
master instance
Node Node Node Node Node Node Node
SQL
Data mart
SQL Data
Node
SQL Data
Node
Compute pool
SQL Compute
Node
Storage Storage
https://docs.microsoft.com/en-us/sql/big-data-cluster/big-data-cluster-overview
#SQLSAT895
Changing platform
Can be easy
Migrating databases to PaaS or containerized versions (but same RDBMS)
or…
Hard: converting databases to other RDBMSs
data must be physically migrated (different types, different representations,…)
database code must be converted (constraints, triggers, functions, procedures,…)
Application code can be
converted completely, to a new platform
just adapted to run against the new RDBMS
adapted to support multiple RDBMSs
#SQLSAT895
Different kind of projects
Migration
one time conversion
solution switch-over at a certain point
Porting
side-by-side conversion & evolution
no switch-over, current solutions remain
#SQLSAT895
Migration Projects
Usually done by final customers (i.e. not ISVs)
Driving factors
cost reduction
move away from vendor(s)
solution obsolescence
unreliability and/or supportability problems
Application
may be converted to a new platform
may be adapted to run with new RDBMS
#SQLSAT895
Porting Projects
Usually done by ISVs
Driving factors
get into new markets
cost reduction for customers (TCO)
more choice for customers
become less dependent from vendor(s)
Application
may be ported to new platform
happens rarely, means re-write or 2 codebases
may be adapted to run with new RDBMS
#SQLSAT895
Different kind of Databases to migrate/port
Simple schema
all the logic is inside the application
simple access methods (mostly by cursors)
very limited use of SQL dialects
database is used mostly for storage
Complex schema
much of the logic is inside the database
heavy usage of SQL dialects
database used as a rule and inference engine
#SQLSAT895
Origin of problems
Sometimes porting issues arise from
misusage of functionalities
bad decoupling of application/database code
too much row oriented code in the database
low technical skills of coders/architects
Never judge
every application has it own story
a lot of decisions may be compromises
a lot of money was probably already invested
#SQLSAT895
Application portability
Code in the RDBMS
has been a best practice for years
still a very good solution for both
integrity
scalability
however… portability is an issue!
different SQL dialects
different type systems
different engine features
#SQLSAT895
Changing Architecture
Can be much more harder!
More complex
Low familiarity with non RBMS technologies
Low familiarity with unstructured dta
New implementation patterns
ML & AI will stop to be buzzwords…
#SQLSAT895
Edition upgrades/downgrades
Upgrades
Motivations similar to version upgrades
Barriers similar to version upgrades
Complexity usually lower because setup covers the scenario
Downgrades
Main motivation to save money
Barriers similar to version upgrades
Needs reinstallation, less impact for non production environment
#SQLSAT895
Version Upgrades: motivations
Compliancy (e.g. end of support and/or security)
Better Performance
New functionalities
Winter is coming has come!
#SQLSAT895
Current support level End mainstream End extended
SQL Server 2014 Currently supporting all versions July 9, 2019 July 9, 2024
SQL Server 2012
SQL Server 2012 SP2+ is in extended support
which includes security updates, paid support,
and requires purchasing non-security hotfix
support
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?
#SQLSAT895
Extended Security Updates
Applies to
SQL Server 2008 and 2008 R2 Enterprise and Standard editions
Windows Server 2008 and 2008 R2 Datacenter and Standard editions
On-Premise
Must have active SA (or equivalent e.g. EAS, SCE, EES)
Price approximately 75% of latest version license cost
Azure
3 years for free
More info at https://www.microsoft.com/2008-eos
#SQLSAT895
Editions: remember SQL Server 2016?
#SQLSAT895
SQL Server 2019 Standard Edition
Transparent Data Encryption!
Intelligent Query Processing
Accelerated Database Recovery
Many others
https://techcommunity.microsoft.com/t5/SQL-Server/SQL-
Server-2019-Standard-Edition/ba-p/986121
https://docs.microsoft.com/sql/sql-server/editions-and-
components-of-sql-server-version-15
#SQLSAT895
IQP: Scalar UDF in-lining example
Query without UDF Query with UDF (no in-lining) Query with UDF (in-lining)
Execution time 1.6 seconds 29 minutes 11 seconds 1.6 seconds
CREATE FUNCTION dbo.discount_price(@price DECIMAL(12,2), @discount DECIMAL(12,2))
RETURNS DECIMAL (12,2) AS BEGIN RETURN @price * (1 - @discount); END
SELECT L_SHIPDATE, O_SHIPPRIORITY
, SUM(dbo.discount_price(L_EXTENDEDPRICE, L_DISCOUNT))
FROM LINEITEM, ORDERS
WHERE O_ORDERKEY = L_ORDERKEY
GROUP BY L_SHIPDATE, O_SHIPPRIORITY
ORDER BY L_SHIPDATE
10GB CCI compressed TPC-H Schema, 2 x CPUs (12 cores), 96GB RAM, SSD storage
#SQLSAT895
SQL Server 2019 Failover Server Benefit
New Software Assurance
Enterprise/Standard Core/Server+CAL
Not enough?
Allowed on passive
Database consistency checks
Log backups
Full backups
Monitoring resource usage data
More
https://cloudblogs.microsoft.com/sqlserver/2
019/10/30/new-high-availability-and-
disaster-recovery-benefits-for-sql-server
#SQLSAT895
Version Upgrades: barriers
Licensing Costs
Regressions risk
Application changes costs
Complexity
Testing changes (application or certification processes)
Planning for low downtime
Lack of time/resources/competencies
#SQLSAT895
Modernization
Barriers
#SQLSAT895
Hardest problems
Factors that require application changes
Breaking changes
Discontinued functionalities
Plan affecting changes may cause performance regressions
New Cardinality Estimator
Hotfixes
New QP strategies/behavior (e.g. Intelligent Query Processing)
Testing changes is hard!
Complete Workload coverage
Concurrent access
#SQLSAT895
Database Compatibility Level
Sets behavior compatible with
specified version of SQL Server
Version Native Level Supported Levels
SQL Server 2019 150 150, 140, 130, 120,
110, 100
SQL Server 2017 140 140, 130, 120, 110,
100
Azure SQL Database 150 150, 140, 130, 120,
110, 100
SQL Server 2016 130 130, 120, 110, 100
SQL Server 2014 120 120, 110, 100
SQL Server 2012 110 110, 100, 90
SQL Server 2008 R2 100 100, 90, 80
SQL Server 2008 100 100, 90, 80
SQL Server 2005 90 90, 80
SQL Server 2000 80 80
#SQLSAT895
DB Compatibility Level based certification
Target for a database compatibility level
Stop certifying for any given platform (On-Premises, Cloud, PaaS/IaaS)
Stop certifying for a named SQL Server version
Microsoft Database Compatibility Level Protection
Full functional protection (once assessment tools runs with no errors)
Query Plan shape protection (on comparable hardware)
Maintaining backward compatibility very important for SQL Server team…
#SQLSAT895
DB Compatibility Level certification benefits
Simplified certification across platforms
E.g. SQL Server On-Premises and Azure SQL Database Managed
Instances
Improved risk management
Decoupling application upgrade from database support upgrade cycles
Allow customers to upgrade/migrate to new/different versions
Benefits from new features Without changing functionalities
Not everything is gated by Database Compatibility levels e.g.
Adaptive Joins: gated
Auto-tuning, new Query memory gateways, leveraging NUMA architecture, Columnstore
indexes: non-gated
#SQLSAT895
Functional Change Protection
Breaking Changes
Behavior changes resulting in different outcomes!
Not all protected under Database Compatibility
Protected changes examples
Improved accuracy in compatibility level 130+
Conversion behavior setting LANGUAGE context info
Conversion behavior parsing dates
Non protected changes examples
Column names changes in system objects
#SQLSAT895
Demo
#SQLSAT895
Functional Change Protection & Trace Flags
Some functional changes gated by Trace Flags
Example: truncation error 8152
Gated by trace flag 460 in SQL 2017 CU12+
Default in SQL 2019 with Compatibility Level 150
https://blogs.msdn.microsoft.com/sql_server_team/string-or-binary-
data-would-be-truncated-replacing-the-infamous-error-8152
#SQLSAT895
Discontinued functionalities
Not protected by Compatibility Level!
Removed from database engine
Need to change queries using it
Examples
FASTFIRSTROW
replaced by OPTION (FAST n) in SQL Server 2012
sp_dboption
system stored procedure removed in SQL Server 2012
#SQLSAT895
Query Plan shape protection
Plan-affecting changes
Query Optimizer fixes (Trace Flag 4199)
Changes to Cardinality Estimator
These will very likely cause regressions!
Especially Cardinality Estimator
Many queries better performance, other worse
Are you sure you understood how fixes works?
What about fixes for incorrect result causing regressions?
#SQLSAT895
Query Optimizer Fixes with TF 4199
SQL Server 2016+ QO fixes from
previous versions enabled by
default under the latest level
previously you had to enable them
but you enabled also current version,
post-RTM, fixes
zero reported errors in support
cases after changing the default
Fully Documented
https://support.microsoft.com/en-
us/help/974006/sql-server-query-
optimizer-hotfix-trace-flag-4199-
servicing-model
Compatibilit
y Level
TF
4199
QO
changes
from
previous
level
QO
changes for
current
version
post-RTM
100-120 Off Disabled Disabled
On Enabled Enabled
130 Off Enabled Disabled
On Enabled Enabled
140 Off Enabled Disabled
On Enabled Enabled
150/Azure Off Enabled Disabled
On Enabled Enabled
#SQLSAT895
Query Optimizer fixes further control
SQL Server 2016+ database-level granularity
ALTER DATABASE SCOPED CONFIGURATION SET
QUERY_OPTIMIZER_HOTFIXES = ON|OFF
SQL Server 2016 SP1+ query-level granularity
OPTION(USE HINT('ENABLE_QUERY_OPTIMIZER_HOTFIXES’))
#SQLSAT895
Cardinality Estimator problems
Essential for query plan generation
Was largely based on SQL Server 7.0
Redesigned in SQL Server 2014+
Ascending data estimation, correlation assumptions, join
containment, fixed estimation values (e.g. MTVF)
Will most probably cause regressions in performance!
#SQLSAT895
Controlling Cardinality Estimation
SQL Server 2014
Bound to Database Compatibility Level 😬
Trace Flags (global, session and query levels)
Trace flag 2312 reverts to CE version 70
Trace flag 9481 use CE version 120
SQL Server 2016+ database-level configuration
ALTER DATABASE SCOPED CONFIGURATION SET
LEGACY_CARDINALITY_ESTIMATION = ON|OFF
SQL Server 2016 SP1+ query-level configuration
OPTION(USE HINT('FORCE_LEGACY_CARDINALITY_ESTIMATION'))
OPTION(USE HINT('FORCE_DEFAULT_CARDINALITY_ESTIMATION'))
#SQLSAT895
Query Optimizer Hints
SQL Server 2016 SP1+
Control QO behavior
Mainly to replace trace flags
https://blogs.msdn.microsoft.co
m/sql_server_team/developers-
choice-use-hint-query-hints
USE HINT Trace
Flag
DB
option
Ver.
DISABLE_OPTIMIZED_NESTED_LOOP 2340 2016 SP1+
FORCE_LEGACY_CARDINALITY_ESTIMATION 9841 Yes 2016 SP1+
ENABLE_QUERY_OPTIMIZER_HOTFIXES 4199 Yes 2016 SP1+
DISABLE_PARAMETER_SNIFFING 4136 Yes 2016 SP1+
ASSUME_MIN_SELECTIVITY_FOR_FILTER_ESTIMATES 4137 old CE
9471 new CE
2016 SP1+
DISABLE_OPTIMIZER_ROWGOAL 4138 2016 SP1+
ENABLE_HIST_AMENDMENT_FOR_ASC_KEYS 4139 2016 SP1+
ASSUME_JOIN_PREDICATE_DEPENDS_ON_FILTERS 9476 new CE 2016 SP1+
FORCE_DEFAULT_CARDINALITY_ESTIMATION 2312 2016 SP1+
DISALLOW_BATCH_MODE 2017+
DISABLE_INTERLEAVED_EXECUTION_TVF 2017+
DISABLE_BATCH_MODE_MEMORY_GRANT_FEEDBACK 2017+
DISABLE_BATCH_MODE_ADAPTIVE_JOINS 2017+
DISABLE_ROW_MODE_MEMORY_GRANT_FEEDBACK 2019+
DISABLE_DEFERRED_COMPILATION_TV 2019+
DISABLE_TSQL_SCALAR_UDF_INLINING 2019+
QUERY_OPTIMIZER_COMPATIBILITY_LEVEL_n 2017 CU10+
QUERY_PLAN_PROFILE 2016 SP2 CU3+
2017 CU11+
#SQLSAT895
Query Optimizer Compatibility Level
SQL Server 2017 CU10 introduces query-level granularity
OPTION(USE
HINT('QUERY_OPTIMIZER_COMPATIBILITY_LEVEL_n’))
Includes QO fixes enabled by default up to that level
TF 4199 enabled globally will still enable all fixes
https://blogs.msdn.microsoft.com/sql_server_team/developers-
choice-hinting-query-execution-model
#SQLSAT895
Microsoft recommended upgrade Plan
Upgrade to
latest SQL
Server
version and
keeping
source
compatibility
level
Enable Query
Store
Create a
baseline of
the workload
Move to
latest
compatibility
level
Quickly fix
regressions
by forcing
last known
good plan!
#SQLSAT895
Modernization
How
Upgrade Strategies
Side-by-side
Allow OS Upgrade
Easier testing
Easier rollback strategy
Less downtime
In-Place
No additional Hardware
No data migration
#SQLSAT895
Side-by-side Upgrade Service Availability
Synchronization Strategy Notes
Log Shipping Cutover typically in minutes
Replication Cutover potentially in seconds
Backup/Restore From minutes to hours (depends on
strategy e.g. usage of differential and/or
log backups)
Filesystem/SAN Copy Dependent on technology
Database Mirroring/Availability Groups Cutover typically in seconds
#SQLSAT895
Upgrade process to minimize risks
Functional &
Performance
tests
Optimize
Migrate
schema,
objects & data
Remediate
applications
Discover Assess Convert
Data
Sync
Cutover
#SQLSAT895
Discover Phase
Which SQL Server versions do I have?
Which Editions am I running?
Which SQL Server components are installed?
How many cores are on each server?
How many databases are in each instance?
What are the sizes of all my databases?
What are the settings for each instance and database?
#SQLSAT895
Assessment Tools
Microsoft Assessment and Planning (MAP) Toolkit
SQL PowerDoc
PowerShell Script gather data from WMI in XML
Windows and SQL Server rich inventory in Excel
Best Practices Reports in Excel
Consolidates multiple server/instances
Official https://github.com/kendalvandyke/sqlpowerdoc
Newer https://github.com/bryan5989/SQLPowerDoc
Quest Enterprise Reporter for SQL Server
Based on previously free Discovery Wizard for SQL Server
Part of a suite for compliancy covering several other products (e.g. AD)
#SQLSAT895
Microsoft Upgrade/Migration Tools
Upgrade Advisor
Data Migration Assistant (DMA)
Data Experimentation Assistant (DEA)
Data Migration Service (DMS)
SQL Server Migration Assistant (SSMA)
SQL Server Data Tools for Visual Studio (SSDT)
SQL Server Management Studio (SSMS)
“Export Data Tier Application”
“Deploy Database to Microsoft Azure SQL Database” Wizard
#SQLSAT895
Upgrade Advisor
Static Analysis
Database Engine
Analysis Services
Reporting Services
Integration Services
Dynamic Analysis
Trace Files
Obsolete!
Use only if source database non supported
You can still find it in SQL Server Feature Packs (2014 latest)
#SQLSAT895
Data Migration Assistant
On-premises instances assessment
Blocking issues
Partially supported or unsupported features
Discover issues that may affect compatibility
Breaking Changes, Behavior Changes, Deprecated Features
Discover new features that may benefit after upgrading
Performance, security, Storage
Azure SQL Database SKU Recommendations
Performance counters analysis to suggest SKU Azure SQL Database
Performs the migration
#SQLSAT895
Data Migration Assistant V5
Added SQL 2019 destinations (Windows & Linux)
Save and load assessment!!!
Assess SQL queries from external applications
e.g. queries in C# code
Access Migration Toolkit to generate JSON report
Assess SSIS in SSISDB and package store
More info
https://docs.microsoft.com/en-us/sql/dma/dma-whatsnew
Versions supported by DMA
Source
SQL Server 2005
SQL Server 2008
SQL Server 2008 R2
SQL Server 2012
SQL Server 2014
SQL Server 2016
SQL Server 2017 on Windows
Destination
SQL Server 2012
SQL Server 2014
SQL Server 2016
SQL Server 2017 on Windows and Linux
SQL Server 2019 on Windows and Linux
Azure SQL Database
Azure SQL Database Managed Instance
#SQLSAT895
Bulk Analysis
Repository instances/databases to assess in SQL/CSV
Automation with PowerShell
Import in reporting database
Reports with PowerBI
#SQLSAT895
DMA Problems
Cannot save sessions!
Only Assessment data in JSON format
Azure SQL Database SKU Recommendations
Command Line Interface only
Currently not working…
Bulk Analysis (still in V5?)
Cumbersome process
Errors
dmaDataCollector crashes with pubs, dmacmd.exe is a closed project
LoadWarehouse.sql needs to be fixed
#SQLSAT895
Data Migration Assistant Resources
Docs
https://docs.microsoft.com/en-us/sql/dma/dma-
overview
https://docs.microsoft.com/en-us/sql/dma/dma-
consolidatereports
Blog
https://techcommunity.microsoft.com/t5/Microsoft-
Data-Migration/bg-p/MicrosoftDataMigration
#SQLSAT895
Database Experimentation Assistant
A/B testing solution for SQL Server
Workload comparison
e.g. upgrades, new indexes, etc.
Capture
SQL Trace
Extended Events (V2.6+)
Replay
DReplay integration
Analysis
Performance improvements and regressions
#SQLSAT895
DEA Analysis Example
#SQLSAT895
Versions supported by DEA
Source
SQL Server 2005+
Target
SQL Server 2005+
Analysis
SQL Server 2008+
#SQLSAT895
Data Migration Service Resources
Docs
https://docs.microsoft.com/en-us/sql/dea/database-
experimentation-assistant-overview
Blog
https://techcommunity.microsoft.com/t5/Microsoft-Data-
Migration/bg-p/MicrosoftDataMigration
#SQLSAT895
Azure Database Migration Service
On-premises
SQL Server 2005 - 2017
Assessment
SSMA & DMA
Azure Database
Migration Service
My
#SQLSAT895
DMS Migration Scenarios
SQL Server -> Azure SQL Database Offline
SQL Server -> Azure SQL Database Online
SQL Server -> Azure SQL Database Managed Instance Offline
SQL Server -> Azure SQL Database Managed Instance Online
MySQL -> Azure DB for MySQL Online
PostgreSQL -> Azure DB for PostgreSQL Online
#SQLSAT895
Data Migration Service Resources
Docs
https://docs.microsoft.com/en-us/azure/dms/dms-overview
https://docs.microsoft.com/en-us/azure/dms/tutorial-sql-server-to-azure-
sql
Blog
https://techcommunity.microsoft.com/t5/Microsoft-Data-Migration/bg-
p/MicrosoftDataMigration
#SQLSAT895
SQL Server Migration Assistant
Migration effort assessment
Code conversion
Data migration
Testing
Deployment
Platforms supported by SSMA
Source
Microsoft Access
DB2
MySQL
Oracle
SAP ASE (Sybase ASE)
Destination
SQL Server 2008
SQL Server 2008 R2
SQL Server 2012
SQL Server 2014
SQL Server 2016
SQL Server 2017 on Windows and Linux
SQL Server 2019 on Windows and Linux
Azure SQL Database
Azure SQL Database Managed Instance
Azure SQL Data Warehouse (Oracle only)
#SQLSAT895
SSMA for Oracle: how it works (101)
Creates two “helper” databases
sysdb
ssmatesterdb
Stores metadata in the file system
data stored in xml compressed format
can rename to .gzip and uncompress it
shred xml into lot of files for caching
reports directory
can be safely deleted and re-generated
metadata reside in the original .mb files
#SQLSAT895
SSMA for Oracle: sysdb helper database
Provides
code infrastructure to emulate features
system functions
schema features (e.g. sequences)
engine features (e.g. autonomous transactions)
session bound data storage
emulated metadata storage (e.g. packages)
Maintenance
protect metadata
performance related depends on workload
#SQLSAT895
SSMA for Oracle: does it really work?
Yes, but don’t expect miracles!
Works well with simple schemas…
Usually won’t do all the work by itself
Very useful for
assessing efforts
assessing problems
doing prototypes
as a learning tool
to translate/emulate some functionalities
#SQLSAT895
Testing
Nothing can replace good testing!
Hard to have tests with good coverage of the whole workload
Sometimes is more cost effective to run fewer tests and fix the
problems later…
SQL Server DReplay infrastructure
Often impossible to capture and replay even a fraction of the
workload
#SQLSAT895
Workload Tools
Very good for side-by-side, real-time workload replay
Captures XE batch completed and replay commands on-the-fly
Captures execution telemetry (cpu, read, writes, duration)
Reports to find regressions
Developed by a well-known MVP ☺
https://github.com/spaghettidba/WorkloadTools
#SQLSAT895
DBA Tools
Lot of PowerShell cmdlets to make the DBA life easier
Many cmdlets target specifically migration/upgrade scenarios
E.g copy logins with synch option
One stop cmdlet migrating an
All instance-level assets (e.g. credentials, linked servers, etc. )
Via backup/restore automation (just specify network share)
https://dbatools.io
#SQLSAT895
Start-DbaMigration
https://youtu.be/hg8tovMRX2k
#SQLSAT895
After the upgrade: remember the plan
Upgrade to
latest SQL
Server
version and
keeping
source
compatibility
level
Enable Query
Store
Create a
baseline of
the workload
Move to
latest
compatibility
level
Quickly fix
regressions
by forcing
last known
good plan!
#SQLSAT895
Automatic Tuning
Automatic plan correction
Automatically force last good plan when regression detected
Minimum 10 CPU seconds improvement
sys.dm_db_tuning_recommendations for manual corrections
SQL Server 2017 and Azure SQL Database
https://docs.microsoft.com/en-us/sql/relational-databases/automatic-tuning/automatic-tuning
#SQLSAT895
Query Tuning Assistant
Well-defined workflow targeting patterns for query regressions
Independence vs. Correlation
Simple Containment vs. Base Containment
Multi-statement table-valued function (MSTVF) fixed cardinality guess
SQL Server Management Studio Wizard-Based Tool
Can be automated via PowerShell
#SQLSAT895
Query Tuning Assistant plan
Upgrade to
latest SQL
Server
version and
keeping
source
compatibilit
y level
Enable
Query Store
Create a
baseline of
the
workload
Move to
latest
compatibilit
y level (or
any target
level to test)
Collect
workload
with new
level and
start
comparing
with
baseline
Instead of
only forcing
last known
good plan,
experiment
with tuning
recommend
ation actions
https://docs.microsoft.com/en-us/sql/relational-databases/performance/upgrade-dbcompat-using-qta
#SQLSAT895
Modernization Stream Phases in a SQL
Project
Partner Collect Inspire
Assess Define Inventory Envision Scope
Modernize Detail Setup Test Execute
Support Tune Mentor
#SQLSAT895
Assessment phase
Define
• Finalize assessment’s scope
• Finalize questionnaires to be sent to project representatives
• Activities kick-off
Inventory
• Detailed inventory of Windows Server & SQL Servers
• Static analysis of databases & SQL code
• Project representatives interviews (questionnaires)
Envision
• Consolidate & analyze inventory data
• Review configuration, performance, reliability and security best practices
• Prepare modernization scenarios and macro action-plan
Scope
• Discuss deliverables and scenarios with customer
• Finalize modernization scenarios
• Prepare next phases offering (Modernize & Support)
#SQLSAT895
Assessment phase: reducing uncertainty
Better planning/flexibility
Size better understood results in reduced expectations and scope
Allows to run several Modernization phases at different times
Leaves the customer with something tangible
Detailed assets inventory
Performance/Security/Reliability automatic assessment
Static analysis of databases code
Possibility to rescope/change scenarios
Enough data to independently run the project
#SQLSAT895
On-Premises to Azure PaaS/IaaS migrations
IaaS
SQL Server on Azure VMs
SQL Server on Azure Containers
SQL Server on Azure Kubernetes
PaaS
Azure SQL Database
Azure SQL Database Managed Instance
#SQLSAT895
On-Premises to SQL Server PaaS migrations
Subnet used for MI
On-Premise to Managed Instance online
workflow
Subnet used for DMS
On-Premise
Cloud network
SQL DB
Managed Instance
Azure Blob Storage
SMB Network Share
#SQLSAT895
Other on-premises to PaaS strategies
Method 1 Method 2 Method 3
Target
DB
Azure SQL Database
SQL Server
SSMS
2. Import
1. DeployOR
.bacpac
1. Export
Source
DB
Target
DB
Azure SQL Database
SQL Server
SQL Azure
Migration
Wizard
2. Execute
1. Generate
T-SQL
Source
DB
Target
DB
Azure SQL Database
SQL Server
SSMS
6.
Export/
Import
or Deploy
Data
Migratio
n
Assistant
4. Copy
Copy
DB
Source
DB
5. Publish
1. Import
Visual
Studio
Database
Project
2. Transform
3. Edit, Build
& Test
*.sql
4. Publish (schema only)
Compatible database: manual
copy or deploy wizard in SSMS
Database almost compatible:
SQL Azure Migration Wizard
DMA and SSMS
Refactor with Visual Studio and Data
Migration Assistant, final deploy with
SSMS
#SQLSAT895
Migration with minimal downtime
Transactional Replication
#SQLSAT895
Data Migration Resources
Blog
https://techcommunity.microsoft.com/t5/Microsoft-Data-Migration/bg-
p/MicrosoftDataMigration
Upgrade SQL Server
https://docs.microsoft.com/sql/database-engine/install-
windows/upgrade-sql-server
Post-migration validation and optimization guide
https://docs.microsoft.com/sql/relational-databases/post-migration-
validation-and-optimization-guide
Azure Database Migration Guide
https://datamigration.microsoft.com
#SQLSAT895
Thanks!

Weitere ähnliche Inhalte

Was ist angesagt?

2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015 2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015 Geir Høydalsvik
 
Brk2051 sql server on linux and docker
Brk2051 sql server on linux and dockerBrk2051 sql server on linux and docker
Brk2051 sql server on linux and dockerBob Ward
 
SQL server 2016 New Features
SQL server 2016 New FeaturesSQL server 2016 New Features
SQL server 2016 New Featuresaminmesbahi
 
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1MariaDB plc
 
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Antonios Chatzipavlis
 
Brk3288 sql server v.next with support on linux, windows and containers was...
Brk3288 sql server v.next with support on linux, windows and containers   was...Brk3288 sql server v.next with support on linux, windows and containers   was...
Brk3288 sql server v.next with support on linux, windows and containers was...Bob Ward
 
Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)
Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)
Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)Bob Ward
 
Big App Workloads on Microsoft Azure - TechEd Europe 2014
Big App Workloads on Microsoft Azure - TechEd Europe 2014Big App Workloads on Microsoft Azure - TechEd Europe 2014
Big App Workloads on Microsoft Azure - TechEd Europe 2014Brian Benz
 
Scaling MySQL in Amazon Web Services
Scaling MySQL in Amazon Web ServicesScaling MySQL in Amazon Web Services
Scaling MySQL in Amazon Web ServicesLaine Campbell
 
MySQL Performance - Best practices
MySQL Performance - Best practices MySQL Performance - Best practices
MySQL Performance - Best practices Ted Wennmark
 
KoprowskiT_SQLRelay2014#9_London_FromPlanToBackupToCloud
KoprowskiT_SQLRelay2014#9_London_FromPlanToBackupToCloudKoprowskiT_SQLRelay2014#9_London_FromPlanToBackupToCloud
KoprowskiT_SQLRelay2014#9_London_FromPlanToBackupToCloudTobias Koprowski
 
Microsoft SQL Server Distributing Data with R2 Bertucci
Microsoft SQL Server Distributing Data with R2 BertucciMicrosoft SQL Server Distributing Data with R2 Bertucci
Microsoft SQL Server Distributing Data with R2 BertucciMark Ginnebaugh
 
"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007
"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007
"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007eLiberatica
 
Building diagnostic queries using DMVs and DMFs
Building diagnostic queries using DMVs and DMFs Building diagnostic queries using DMVs and DMFs
Building diagnostic queries using DMVs and DMFs Antonios Chatzipavlis
 
MySQL Features & Implementation
MySQL Features & ImplementationMySQL Features & Implementation
MySQL Features & ImplementationOSSCube
 
SQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesSQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesJohn Martin
 
SQL Server 2017 on Linux Introduction
SQL Server 2017 on Linux IntroductionSQL Server 2017 on Linux Introduction
SQL Server 2017 on Linux IntroductionTravis Wright
 
Virtual Study Beta Exam 71-663 Exchange 2010 Designing And Deploying Messagin...
Virtual Study Beta Exam 71-663 Exchange 2010 Designing And Deploying Messagin...Virtual Study Beta Exam 71-663 Exchange 2010 Designing And Deploying Messagin...
Virtual Study Beta Exam 71-663 Exchange 2010 Designing And Deploying Messagin...Tobias Koprowski
 
How SQL Server 2016 SP1 Changes the Game
How SQL Server 2016 SP1 Changes the GameHow SQL Server 2016 SP1 Changes the Game
How SQL Server 2016 SP1 Changes the GamePARIKSHIT SAVJANI
 

Was ist angesagt? (20)

2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015 2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
 
Brk2051 sql server on linux and docker
Brk2051 sql server on linux and dockerBrk2051 sql server on linux and docker
Brk2051 sql server on linux and docker
 
SQL server 2016 New Features
SQL server 2016 New FeaturesSQL server 2016 New Features
SQL server 2016 New Features
 
MySQL 开发
MySQL 开发MySQL 开发
MySQL 开发
 
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
 
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019
 
Brk3288 sql server v.next with support on linux, windows and containers was...
Brk3288 sql server v.next with support on linux, windows and containers   was...Brk3288 sql server v.next with support on linux, windows and containers   was...
Brk3288 sql server v.next with support on linux, windows and containers was...
 
Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)
Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)
Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)
 
Big App Workloads on Microsoft Azure - TechEd Europe 2014
Big App Workloads on Microsoft Azure - TechEd Europe 2014Big App Workloads on Microsoft Azure - TechEd Europe 2014
Big App Workloads on Microsoft Azure - TechEd Europe 2014
 
Scaling MySQL in Amazon Web Services
Scaling MySQL in Amazon Web ServicesScaling MySQL in Amazon Web Services
Scaling MySQL in Amazon Web Services
 
MySQL Performance - Best practices
MySQL Performance - Best practices MySQL Performance - Best practices
MySQL Performance - Best practices
 
KoprowskiT_SQLRelay2014#9_London_FromPlanToBackupToCloud
KoprowskiT_SQLRelay2014#9_London_FromPlanToBackupToCloudKoprowskiT_SQLRelay2014#9_London_FromPlanToBackupToCloud
KoprowskiT_SQLRelay2014#9_London_FromPlanToBackupToCloud
 
Microsoft SQL Server Distributing Data with R2 Bertucci
Microsoft SQL Server Distributing Data with R2 BertucciMicrosoft SQL Server Distributing Data with R2 Bertucci
Microsoft SQL Server Distributing Data with R2 Bertucci
 
"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007
"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007
"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007
 
Building diagnostic queries using DMVs and DMFs
Building diagnostic queries using DMVs and DMFs Building diagnostic queries using DMVs and DMFs
Building diagnostic queries using DMVs and DMFs
 
MySQL Features & Implementation
MySQL Features & ImplementationMySQL Features & Implementation
MySQL Features & Implementation
 
SQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesSQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New Features
 
SQL Server 2017 on Linux Introduction
SQL Server 2017 on Linux IntroductionSQL Server 2017 on Linux Introduction
SQL Server 2017 on Linux Introduction
 
Virtual Study Beta Exam 71-663 Exchange 2010 Designing And Deploying Messagin...
Virtual Study Beta Exam 71-663 Exchange 2010 Designing And Deploying Messagin...Virtual Study Beta Exam 71-663 Exchange 2010 Designing And Deploying Messagin...
Virtual Study Beta Exam 71-663 Exchange 2010 Designing And Deploying Messagin...
 
How SQL Server 2016 SP1 Changes the Game
How SQL Server 2016 SP1 Changes the GameHow SQL Server 2016 SP1 Changes the Game
How SQL Server 2016 SP1 Changes the Game
 

Ähnlich wie SQL Server Modernization

SQL Server Modernization
SQL Server ModernizationSQL Server Modernization
SQL Server ModernizationGianluca Hotz
 
Microsoft SQL Server - SQL Server Migrations Presentation
Microsoft SQL Server - SQL Server Migrations PresentationMicrosoft SQL Server - SQL Server Migrations Presentation
Microsoft SQL Server - SQL Server Migrations PresentationMicrosoft Private Cloud
 
Modernizing SQL Server the Right Way
Modernizing SQL Server the Right WayModernizing SQL Server the Right Way
Modernizing SQL Server the Right WayJuan Fabian
 
SQL Server End Of Support
SQL Server End Of SupportSQL Server End Of Support
SQL Server End Of SupportMariano Kovo
 
SQLUpgrade_What_do_I_need_to_know_-_SQLSaturday_Manchester.pptx
SQLUpgrade_What_do_I_need_to_know_-_SQLSaturday_Manchester.pptxSQLUpgrade_What_do_I_need_to_know_-_SQLSaturday_Manchester.pptx
SQLUpgrade_What_do_I_need_to_know_-_SQLSaturday_Manchester.pptxEddie Gonzalez
 
Attunity Efficient ODR For Sql Server Using Attunity CDC Suite For SSIS Slide...
Attunity Efficient ODR For Sql Server Using Attunity CDC Suite For SSIS Slide...Attunity Efficient ODR For Sql Server Using Attunity CDC Suite For SSIS Slide...
Attunity Efficient ODR For Sql Server Using Attunity CDC Suite For SSIS Slide...Melissa Kolodziej
 
Migra tus bases de datos a Azure
Migra tus bases de datos a AzureMigra tus bases de datos a Azure
Migra tus bases de datos a AzuredbLearner
 
Introduction to microsoft sql server 2008 r2
Introduction to microsoft sql server 2008 r2Introduction to microsoft sql server 2008 r2
Introduction to microsoft sql server 2008 r2Eduardo Castro
 
ukoug-soa-sig-june-2016 v0.5
ukoug-soa-sig-june-2016 v0.5ukoug-soa-sig-june-2016 v0.5
ukoug-soa-sig-june-2016 v0.5Bruno Alves
 
Upgrading to Oracle SOA 12.1 & 12.2 - Practical Steps and Project Experiences
Upgrading to Oracle SOA 12.1 & 12.2 - Practical Steps and Project ExperiencesUpgrading to Oracle SOA 12.1 & 12.2 - Practical Steps and Project Experiences
Upgrading to Oracle SOA 12.1 & 12.2 - Practical Steps and Project ExperiencesBruno Alves
 
Everything you need to know about SQL Server 2016
Everything you need to know about SQL Server 2016Everything you need to know about SQL Server 2016
Everything you need to know about SQL Server 2016Softchoice Corporation
 
Andrewfraserdba.com training sql_training
Andrewfraserdba.com training sql_trainingAndrewfraserdba.com training sql_training
Andrewfraserdba.com training sql_trainingmark jerald Canal
 
Sql training
Sql trainingSql training
Sql trainingpremrings
 
sql server dba with 9+ years of exp and hands on Postgresql
sql server dba with 9+ years of exp and hands on Postgresqlsql server dba with 9+ years of exp and hands on Postgresql
sql server dba with 9+ years of exp and hands on Postgresqlsunil thumma
 
Hp Polyserve Database Utility For Sql Server Consolidation
Hp Polyserve Database Utility For Sql Server ConsolidationHp Polyserve Database Utility For Sql Server Consolidation
Hp Polyserve Database Utility For Sql Server ConsolidationCB UTBlog
 
Modernizing sql server the right way
Modernizing sql server the right wayModernizing sql server the right way
Modernizing sql server the right wayMariano Kovo
 
The Evolution of SQL Server as a Service - SQL Azure Managed Instance
The Evolution of SQL Server as a Service - SQL Azure Managed InstanceThe Evolution of SQL Server as a Service - SQL Azure Managed Instance
The Evolution of SQL Server as a Service - SQL Azure Managed InstanceJavier Villegas
 
SANKAR_PRASAD_SAHU_SQL_DBA
SANKAR_PRASAD_SAHU_SQL_DBASANKAR_PRASAD_SAHU_SQL_DBA
SANKAR_PRASAD_SAHU_SQL_DBASankar Sahu
 

Ähnlich wie SQL Server Modernization (20)

SQL Server Modernization
SQL Server ModernizationSQL Server Modernization
SQL Server Modernization
 
Microsoft SQL Server - SQL Server Migrations Presentation
Microsoft SQL Server - SQL Server Migrations PresentationMicrosoft SQL Server - SQL Server Migrations Presentation
Microsoft SQL Server - SQL Server Migrations Presentation
 
Modernizing SQL Server the Right Way
Modernizing SQL Server the Right WayModernizing SQL Server the Right Way
Modernizing SQL Server the Right Way
 
SQL Server End Of Support
SQL Server End Of SupportSQL Server End Of Support
SQL Server End Of Support
 
SQLUpgrade_What_do_I_need_to_know_-_SQLSaturday_Manchester.pptx
SQLUpgrade_What_do_I_need_to_know_-_SQLSaturday_Manchester.pptxSQLUpgrade_What_do_I_need_to_know_-_SQLSaturday_Manchester.pptx
SQLUpgrade_What_do_I_need_to_know_-_SQLSaturday_Manchester.pptx
 
Attunity Efficient ODR For Sql Server Using Attunity CDC Suite For SSIS Slide...
Attunity Efficient ODR For Sql Server Using Attunity CDC Suite For SSIS Slide...Attunity Efficient ODR For Sql Server Using Attunity CDC Suite For SSIS Slide...
Attunity Efficient ODR For Sql Server Using Attunity CDC Suite For SSIS Slide...
 
Vijaya_Lakshmi_Resume1
Vijaya_Lakshmi_Resume1Vijaya_Lakshmi_Resume1
Vijaya_Lakshmi_Resume1
 
Migra tus bases de datos a Azure
Migra tus bases de datos a AzureMigra tus bases de datos a Azure
Migra tus bases de datos a Azure
 
Introduction to microsoft sql server 2008 r2
Introduction to microsoft sql server 2008 r2Introduction to microsoft sql server 2008 r2
Introduction to microsoft sql server 2008 r2
 
ukoug-soa-sig-june-2016 v0.5
ukoug-soa-sig-june-2016 v0.5ukoug-soa-sig-june-2016 v0.5
ukoug-soa-sig-june-2016 v0.5
 
Upgrading to Oracle SOA 12.1 & 12.2 - Practical Steps and Project Experiences
Upgrading to Oracle SOA 12.1 & 12.2 - Practical Steps and Project ExperiencesUpgrading to Oracle SOA 12.1 & 12.2 - Practical Steps and Project Experiences
Upgrading to Oracle SOA 12.1 & 12.2 - Practical Steps and Project Experiences
 
Everything you need to know about SQL Server 2016
Everything you need to know about SQL Server 2016Everything you need to know about SQL Server 2016
Everything you need to know about SQL Server 2016
 
Satya Cv
Satya CvSatya Cv
Satya Cv
 
Andrewfraserdba.com training sql_training
Andrewfraserdba.com training sql_trainingAndrewfraserdba.com training sql_training
Andrewfraserdba.com training sql_training
 
Sql training
Sql trainingSql training
Sql training
 
sql server dba with 9+ years of exp and hands on Postgresql
sql server dba with 9+ years of exp and hands on Postgresqlsql server dba with 9+ years of exp and hands on Postgresql
sql server dba with 9+ years of exp and hands on Postgresql
 
Hp Polyserve Database Utility For Sql Server Consolidation
Hp Polyserve Database Utility For Sql Server ConsolidationHp Polyserve Database Utility For Sql Server Consolidation
Hp Polyserve Database Utility For Sql Server Consolidation
 
Modernizing sql server the right way
Modernizing sql server the right wayModernizing sql server the right way
Modernizing sql server the right way
 
The Evolution of SQL Server as a Service - SQL Azure Managed Instance
The Evolution of SQL Server as a Service - SQL Azure Managed InstanceThe Evolution of SQL Server as a Service - SQL Azure Managed Instance
The Evolution of SQL Server as a Service - SQL Azure Managed Instance
 
SANKAR_PRASAD_SAHU_SQL_DBA
SANKAR_PRASAD_SAHU_SQL_DBASANKAR_PRASAD_SAHU_SQL_DBA
SANKAR_PRASAD_SAHU_SQL_DBA
 

Mehr von Gianluca Hotz

Multitenancy con SQL Server e Azure SQL Database
Multitenancy con SQL Server e Azure SQL DatabaseMultitenancy con SQL Server e Azure SQL Database
Multitenancy con SQL Server e Azure SQL DatabaseGianluca Hotz
 
Microsoft SQL Server PaaS (Platform as a Service)
Microsoft SQL Server PaaS (Platform as a Service)Microsoft SQL Server PaaS (Platform as a Service)
Microsoft SQL Server PaaS (Platform as a Service)Gianluca Hotz
 
SQL Server 2022 Programmability & Performance
SQL Server 2022 Programmability & PerformanceSQL Server 2022 Programmability & Performance
SQL Server 2022 Programmability & PerformanceGianluca Hotz
 
SQL Server 2022 Intelligent Query Processing
SQL Server 2022 Intelligent Query ProcessingSQL Server 2022 Intelligent Query Processing
SQL Server 2022 Intelligent Query ProcessingGianluca Hotz
 
Le novità di SQL Server 2022
Le novità di SQL Server 2022Le novità di SQL Server 2022
Le novità di SQL Server 2022Gianluca Hotz
 
IaaS and PaaS relational databases in the cloud
IaaS and PaaS relational databases in the cloudIaaS and PaaS relational databases in the cloud
IaaS and PaaS relational databases in the cloudGianluca Hotz
 
Data Integrity with SQL Database Ledger
Data Integrity with SQL Database LedgerData Integrity with SQL Database Ledger
Data Integrity with SQL Database LedgerGianluca Hotz
 
Azure SQL Database Ledger
Azure SQL Database LedgerAzure SQL Database Ledger
Azure SQL Database LedgerGianluca Hotz
 
Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
Come utilizzare AWS DMS per migrare SQL Server ad Amazon AuroraCome utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
Come utilizzare AWS DMS per migrare SQL Server ad Amazon AuroraGianluca Hotz
 
Best Practices for Running Microsoft SQL Server on AWS
Best Practices for Running Microsoft SQL Server on AWSBest Practices for Running Microsoft SQL Server on AWS
Best Practices for Running Microsoft SQL Server on AWSGianluca Hotz
 
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...Gianluca Hotz
 
Azure SQL Database Ledger
Azure SQL Database LedgerAzure SQL Database Ledger
Azure SQL Database LedgerGianluca Hotz
 
SQL Server Modern Query Processing
SQL Server Modern Query ProcessingSQL Server Modern Query Processing
SQL Server Modern Query ProcessingGianluca Hotz
 
SQL Server Failover Cluster Instances con Azure Managed Disks
SQL Server Failover Cluster Instances con Azure Managed DisksSQL Server Failover Cluster Instances con Azure Managed Disks
SQL Server Failover Cluster Instances con Azure Managed DisksGianluca Hotz
 
SQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: SicurezzaSQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: SicurezzaGianluca Hotz
 
SQL Server Failover Cluster Instances con Amazon FSx in AWS
SQL Server Failover Cluster Instances con Amazon FSx in AWSSQL Server Failover Cluster Instances con Amazon FSx in AWS
SQL Server Failover Cluster Instances con Amazon FSx in AWSGianluca Hotz
 
SQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybaseSQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybaseGianluca Hotz
 
SQL Server Data Virtualization with Polybase
SQL Server Data Virtualization with PolybaseSQL Server Data Virtualization with Polybase
SQL Server Data Virtualization with PolybaseGianluca Hotz
 

Mehr von Gianluca Hotz (20)

Multitenancy con SQL Server e Azure SQL Database
Multitenancy con SQL Server e Azure SQL DatabaseMultitenancy con SQL Server e Azure SQL Database
Multitenancy con SQL Server e Azure SQL Database
 
Microsoft SQL Server PaaS (Platform as a Service)
Microsoft SQL Server PaaS (Platform as a Service)Microsoft SQL Server PaaS (Platform as a Service)
Microsoft SQL Server PaaS (Platform as a Service)
 
SQL Server 2022 Programmability & Performance
SQL Server 2022 Programmability & PerformanceSQL Server 2022 Programmability & Performance
SQL Server 2022 Programmability & Performance
 
SQL Server 2022 Intelligent Query Processing
SQL Server 2022 Intelligent Query ProcessingSQL Server 2022 Intelligent Query Processing
SQL Server 2022 Intelligent Query Processing
 
Le novità di SQL Server 2022
Le novità di SQL Server 2022Le novità di SQL Server 2022
Le novità di SQL Server 2022
 
IaaS and PaaS relational databases in the cloud
IaaS and PaaS relational databases in the cloudIaaS and PaaS relational databases in the cloud
IaaS and PaaS relational databases in the cloud
 
Data Integrity with SQL Database Ledger
Data Integrity with SQL Database LedgerData Integrity with SQL Database Ledger
Data Integrity with SQL Database Ledger
 
Azure SQL Database Ledger
Azure SQL Database LedgerAzure SQL Database Ledger
Azure SQL Database Ledger
 
Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
Come utilizzare AWS DMS per migrare SQL Server ad Amazon AuroraCome utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
 
Best Practices for Running Microsoft SQL Server on AWS
Best Practices for Running Microsoft SQL Server on AWSBest Practices for Running Microsoft SQL Server on AWS
Best Practices for Running Microsoft SQL Server on AWS
 
SQL Server in AWS
SQL Server in AWSSQL Server in AWS
SQL Server in AWS
 
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
 
Azure SQL Database Ledger
Azure SQL Database LedgerAzure SQL Database Ledger
Azure SQL Database Ledger
 
SQL Server Modern Query Processing
SQL Server Modern Query ProcessingSQL Server Modern Query Processing
SQL Server Modern Query Processing
 
SQL Server in AWS
SQL Server in AWSSQL Server in AWS
SQL Server in AWS
 
SQL Server Failover Cluster Instances con Azure Managed Disks
SQL Server Failover Cluster Instances con Azure Managed DisksSQL Server Failover Cluster Instances con Azure Managed Disks
SQL Server Failover Cluster Instances con Azure Managed Disks
 
SQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: SicurezzaSQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: Sicurezza
 
SQL Server Failover Cluster Instances con Amazon FSx in AWS
SQL Server Failover Cluster Instances con Amazon FSx in AWSSQL Server Failover Cluster Instances con Amazon FSx in AWS
SQL Server Failover Cluster Instances con Amazon FSx in AWS
 
SQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybaseSQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybase
 
SQL Server Data Virtualization with Polybase
SQL Server Data Virtualization with PolybaseSQL Server Data Virtualization with Polybase
SQL Server Data Virtualization with Polybase
 

Kürzlich hochgeladen

RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts ServiceSapana Sha
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxolyaivanovalion
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxolyaivanovalion
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxolyaivanovalion
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 

Kürzlich hochgeladen (20)

RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts Service
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 

SQL Server Modernization

  • 2. #SQLSAT895 Who am I? Gianluca Hotz | @glhotz | ghotz@ugiss.org Independent consultant 20+ years on SQL Server (from 4.21 in 1996) Database modeling and development, sizing and administration, upgrade and migration, performance tuning Community 20+ years Microsoft MVP SQL Server/Data Platform (since 1998) VMware Experts SQL Server Founder and president UGISS (PASS Chapter) Co-organizer DAMAG Meetup community
  • 6. #SQLSAT895 Modernization? Low Complexity Version upgrades (e.g. 2008 R2 -> 2017) Edition upgrades/downgrades (e.g. Standard -> Enterprise) Medium Complexity Virtualization Consolidation Adding HA/DR High Complexity Re-Platforming e.g. Oracle -> SQL Server or Azure SQL Database Re-Architecting e.g. SQL Server -> Azure SQL Datawarehouse/Data Lake
  • 7. #SQLSAT895 SQL Server flavors On-Premises SQL Server (Database Engine, SSAS, SSRS, SSIS, DQS, MDS, MLS) Analytics Platform System (APS was SQL Server PDW) IaaS SQL Server (Database Engine, SSAS, SSRS, SSIS, DQS, MDS, MLS) VMs, Containers/Kubernetes PaaS Azure SQL Database Azure Synapse Analytics (was Azure SQL Data Warehouse) Amazon RDS for SQL Server
  • 8. #SQLSAT895 Azure PaaS Operational Data Services SQL-based • Azure SQL Database • Traditional • Managed Instance • Azure Database for PostgreSQL • Azure Database for MySQL • Azure Database for MariaDB NoSQL-based • Azure Cosmos DB • Redis Cache My
  • 9. #SQLSAT895 Azure Modern Datawarehouse Ingestion • Azure Event Hubs • Azure Data Factory Storage • Azure Blob Storage • Azure Data Lake Storage Preparation • Azure Databricks • Azure Data Lake Analytics • Azure HDInsight Model/serve • Azure Synapse Analytics (was Azure SQL Datawarehouse) • Azure Analysis Services • Power BI
  • 10. #SQLSAT895 SQL Server 2019 Big Data Clusters Compute pool SQL Compute Node SQL Compute Node SQL Compute Node … Compute pool SQL Compute Node IoT data Directly read from HDFS Persistent storage … Storage pool SQL Serve r Spark HDFS Data Node SQL Serve r Spark HDFS Data Node SQL Serve r Spark HDFS Data Node Kubernetes pod Analytics Custom apps BI SQL Server master instance Node Node Node Node Node Node Node SQL Data mart SQL Data Node SQL Data Node Compute pool SQL Compute Node Storage Storage https://docs.microsoft.com/en-us/sql/big-data-cluster/big-data-cluster-overview
  • 11. #SQLSAT895 Changing platform Can be easy Migrating databases to PaaS or containerized versions (but same RDBMS) or… Hard: converting databases to other RDBMSs data must be physically migrated (different types, different representations,…) database code must be converted (constraints, triggers, functions, procedures,…) Application code can be converted completely, to a new platform just adapted to run against the new RDBMS adapted to support multiple RDBMSs
  • 12. #SQLSAT895 Different kind of projects Migration one time conversion solution switch-over at a certain point Porting side-by-side conversion & evolution no switch-over, current solutions remain
  • 13. #SQLSAT895 Migration Projects Usually done by final customers (i.e. not ISVs) Driving factors cost reduction move away from vendor(s) solution obsolescence unreliability and/or supportability problems Application may be converted to a new platform may be adapted to run with new RDBMS
  • 14. #SQLSAT895 Porting Projects Usually done by ISVs Driving factors get into new markets cost reduction for customers (TCO) more choice for customers become less dependent from vendor(s) Application may be ported to new platform happens rarely, means re-write or 2 codebases may be adapted to run with new RDBMS
  • 15. #SQLSAT895 Different kind of Databases to migrate/port Simple schema all the logic is inside the application simple access methods (mostly by cursors) very limited use of SQL dialects database is used mostly for storage Complex schema much of the logic is inside the database heavy usage of SQL dialects database used as a rule and inference engine
  • 16. #SQLSAT895 Origin of problems Sometimes porting issues arise from misusage of functionalities bad decoupling of application/database code too much row oriented code in the database low technical skills of coders/architects Never judge every application has it own story a lot of decisions may be compromises a lot of money was probably already invested
  • 17. #SQLSAT895 Application portability Code in the RDBMS has been a best practice for years still a very good solution for both integrity scalability however… portability is an issue! different SQL dialects different type systems different engine features
  • 18. #SQLSAT895 Changing Architecture Can be much more harder! More complex Low familiarity with non RBMS technologies Low familiarity with unstructured dta New implementation patterns ML & AI will stop to be buzzwords…
  • 19. #SQLSAT895 Edition upgrades/downgrades Upgrades Motivations similar to version upgrades Barriers similar to version upgrades Complexity usually lower because setup covers the scenario Downgrades Main motivation to save money Barriers similar to version upgrades Needs reinstallation, less impact for non production environment
  • 20. #SQLSAT895 Version Upgrades: motivations Compliancy (e.g. end of support and/or security) Better Performance New functionalities Winter is coming has come!
  • 21. #SQLSAT895 Current support level End mainstream End extended SQL Server 2014 Currently supporting all versions July 9, 2019 July 9, 2024 SQL Server 2012 SQL Server 2012 SP2+ is in extended support which includes security updates, paid support, and requires purchasing non-security hotfix support 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?
  • 22. #SQLSAT895 Extended Security Updates Applies to SQL Server 2008 and 2008 R2 Enterprise and Standard editions Windows Server 2008 and 2008 R2 Datacenter and Standard editions On-Premise Must have active SA (or equivalent e.g. EAS, SCE, EES) Price approximately 75% of latest version license cost Azure 3 years for free More info at https://www.microsoft.com/2008-eos
  • 24. #SQLSAT895 SQL Server 2019 Standard Edition Transparent Data Encryption! Intelligent Query Processing Accelerated Database Recovery Many others https://techcommunity.microsoft.com/t5/SQL-Server/SQL- Server-2019-Standard-Edition/ba-p/986121 https://docs.microsoft.com/sql/sql-server/editions-and- components-of-sql-server-version-15
  • 25. #SQLSAT895 IQP: Scalar UDF in-lining example Query without UDF Query with UDF (no in-lining) Query with UDF (in-lining) Execution time 1.6 seconds 29 minutes 11 seconds 1.6 seconds CREATE FUNCTION dbo.discount_price(@price DECIMAL(12,2), @discount DECIMAL(12,2)) RETURNS DECIMAL (12,2) AS BEGIN RETURN @price * (1 - @discount); END SELECT L_SHIPDATE, O_SHIPPRIORITY , SUM(dbo.discount_price(L_EXTENDEDPRICE, L_DISCOUNT)) FROM LINEITEM, ORDERS WHERE O_ORDERKEY = L_ORDERKEY GROUP BY L_SHIPDATE, O_SHIPPRIORITY ORDER BY L_SHIPDATE 10GB CCI compressed TPC-H Schema, 2 x CPUs (12 cores), 96GB RAM, SSD storage
  • 26. #SQLSAT895 SQL Server 2019 Failover Server Benefit New Software Assurance Enterprise/Standard Core/Server+CAL Not enough? Allowed on passive Database consistency checks Log backups Full backups Monitoring resource usage data More https://cloudblogs.microsoft.com/sqlserver/2 019/10/30/new-high-availability-and- disaster-recovery-benefits-for-sql-server
  • 27. #SQLSAT895 Version Upgrades: barriers Licensing Costs Regressions risk Application changes costs Complexity Testing changes (application or certification processes) Planning for low downtime Lack of time/resources/competencies
  • 29. #SQLSAT895 Hardest problems Factors that require application changes Breaking changes Discontinued functionalities Plan affecting changes may cause performance regressions New Cardinality Estimator Hotfixes New QP strategies/behavior (e.g. Intelligent Query Processing) Testing changes is hard! Complete Workload coverage Concurrent access
  • 30. #SQLSAT895 Database Compatibility Level Sets behavior compatible with specified version of SQL Server Version Native Level Supported Levels SQL Server 2019 150 150, 140, 130, 120, 110, 100 SQL Server 2017 140 140, 130, 120, 110, 100 Azure SQL Database 150 150, 140, 130, 120, 110, 100 SQL Server 2016 130 130, 120, 110, 100 SQL Server 2014 120 120, 110, 100 SQL Server 2012 110 110, 100, 90 SQL Server 2008 R2 100 100, 90, 80 SQL Server 2008 100 100, 90, 80 SQL Server 2005 90 90, 80 SQL Server 2000 80 80
  • 31. #SQLSAT895 DB Compatibility Level based certification Target for a database compatibility level Stop certifying for any given platform (On-Premises, Cloud, PaaS/IaaS) Stop certifying for a named SQL Server version Microsoft Database Compatibility Level Protection Full functional protection (once assessment tools runs with no errors) Query Plan shape protection (on comparable hardware) Maintaining backward compatibility very important for SQL Server team…
  • 32. #SQLSAT895 DB Compatibility Level certification benefits Simplified certification across platforms E.g. SQL Server On-Premises and Azure SQL Database Managed Instances Improved risk management Decoupling application upgrade from database support upgrade cycles Allow customers to upgrade/migrate to new/different versions Benefits from new features Without changing functionalities Not everything is gated by Database Compatibility levels e.g. Adaptive Joins: gated Auto-tuning, new Query memory gateways, leveraging NUMA architecture, Columnstore indexes: non-gated
  • 33. #SQLSAT895 Functional Change Protection Breaking Changes Behavior changes resulting in different outcomes! Not all protected under Database Compatibility Protected changes examples Improved accuracy in compatibility level 130+ Conversion behavior setting LANGUAGE context info Conversion behavior parsing dates Non protected changes examples Column names changes in system objects
  • 35. #SQLSAT895 Functional Change Protection & Trace Flags Some functional changes gated by Trace Flags Example: truncation error 8152 Gated by trace flag 460 in SQL 2017 CU12+ Default in SQL 2019 with Compatibility Level 150 https://blogs.msdn.microsoft.com/sql_server_team/string-or-binary- data-would-be-truncated-replacing-the-infamous-error-8152
  • 36. #SQLSAT895 Discontinued functionalities Not protected by Compatibility Level! Removed from database engine Need to change queries using it Examples FASTFIRSTROW replaced by OPTION (FAST n) in SQL Server 2012 sp_dboption system stored procedure removed in SQL Server 2012
  • 37. #SQLSAT895 Query Plan shape protection Plan-affecting changes Query Optimizer fixes (Trace Flag 4199) Changes to Cardinality Estimator These will very likely cause regressions! Especially Cardinality Estimator Many queries better performance, other worse Are you sure you understood how fixes works? What about fixes for incorrect result causing regressions?
  • 38. #SQLSAT895 Query Optimizer Fixes with TF 4199 SQL Server 2016+ QO fixes from previous versions enabled by default under the latest level previously you had to enable them but you enabled also current version, post-RTM, fixes zero reported errors in support cases after changing the default Fully Documented https://support.microsoft.com/en- us/help/974006/sql-server-query- optimizer-hotfix-trace-flag-4199- servicing-model Compatibilit y Level TF 4199 QO changes from previous level QO changes for current version post-RTM 100-120 Off Disabled Disabled On Enabled Enabled 130 Off Enabled Disabled On Enabled Enabled 140 Off Enabled Disabled On Enabled Enabled 150/Azure Off Enabled Disabled On Enabled Enabled
  • 39. #SQLSAT895 Query Optimizer fixes further control SQL Server 2016+ database-level granularity ALTER DATABASE SCOPED CONFIGURATION SET QUERY_OPTIMIZER_HOTFIXES = ON|OFF SQL Server 2016 SP1+ query-level granularity OPTION(USE HINT('ENABLE_QUERY_OPTIMIZER_HOTFIXES’))
  • 40. #SQLSAT895 Cardinality Estimator problems Essential for query plan generation Was largely based on SQL Server 7.0 Redesigned in SQL Server 2014+ Ascending data estimation, correlation assumptions, join containment, fixed estimation values (e.g. MTVF) Will most probably cause regressions in performance!
  • 41. #SQLSAT895 Controlling Cardinality Estimation SQL Server 2014 Bound to Database Compatibility Level 😬 Trace Flags (global, session and query levels) Trace flag 2312 reverts to CE version 70 Trace flag 9481 use CE version 120 SQL Server 2016+ database-level configuration ALTER DATABASE SCOPED CONFIGURATION SET LEGACY_CARDINALITY_ESTIMATION = ON|OFF SQL Server 2016 SP1+ query-level configuration OPTION(USE HINT('FORCE_LEGACY_CARDINALITY_ESTIMATION')) OPTION(USE HINT('FORCE_DEFAULT_CARDINALITY_ESTIMATION'))
  • 42. #SQLSAT895 Query Optimizer Hints SQL Server 2016 SP1+ Control QO behavior Mainly to replace trace flags https://blogs.msdn.microsoft.co m/sql_server_team/developers- choice-use-hint-query-hints USE HINT Trace Flag DB option Ver. DISABLE_OPTIMIZED_NESTED_LOOP 2340 2016 SP1+ FORCE_LEGACY_CARDINALITY_ESTIMATION 9841 Yes 2016 SP1+ ENABLE_QUERY_OPTIMIZER_HOTFIXES 4199 Yes 2016 SP1+ DISABLE_PARAMETER_SNIFFING 4136 Yes 2016 SP1+ ASSUME_MIN_SELECTIVITY_FOR_FILTER_ESTIMATES 4137 old CE 9471 new CE 2016 SP1+ DISABLE_OPTIMIZER_ROWGOAL 4138 2016 SP1+ ENABLE_HIST_AMENDMENT_FOR_ASC_KEYS 4139 2016 SP1+ ASSUME_JOIN_PREDICATE_DEPENDS_ON_FILTERS 9476 new CE 2016 SP1+ FORCE_DEFAULT_CARDINALITY_ESTIMATION 2312 2016 SP1+ DISALLOW_BATCH_MODE 2017+ DISABLE_INTERLEAVED_EXECUTION_TVF 2017+ DISABLE_BATCH_MODE_MEMORY_GRANT_FEEDBACK 2017+ DISABLE_BATCH_MODE_ADAPTIVE_JOINS 2017+ DISABLE_ROW_MODE_MEMORY_GRANT_FEEDBACK 2019+ DISABLE_DEFERRED_COMPILATION_TV 2019+ DISABLE_TSQL_SCALAR_UDF_INLINING 2019+ QUERY_OPTIMIZER_COMPATIBILITY_LEVEL_n 2017 CU10+ QUERY_PLAN_PROFILE 2016 SP2 CU3+ 2017 CU11+
  • 43. #SQLSAT895 Query Optimizer Compatibility Level SQL Server 2017 CU10 introduces query-level granularity OPTION(USE HINT('QUERY_OPTIMIZER_COMPATIBILITY_LEVEL_n’)) Includes QO fixes enabled by default up to that level TF 4199 enabled globally will still enable all fixes https://blogs.msdn.microsoft.com/sql_server_team/developers- choice-hinting-query-execution-model
  • 44. #SQLSAT895 Microsoft recommended upgrade Plan Upgrade to latest SQL Server version and keeping source compatibility level Enable Query Store Create a baseline of the workload Move to latest compatibility level Quickly fix regressions by forcing last known good plan!
  • 46. Upgrade Strategies Side-by-side Allow OS Upgrade Easier testing Easier rollback strategy Less downtime In-Place No additional Hardware No data migration
  • 47. #SQLSAT895 Side-by-side Upgrade Service Availability Synchronization Strategy Notes Log Shipping Cutover typically in minutes Replication Cutover potentially in seconds Backup/Restore From minutes to hours (depends on strategy e.g. usage of differential and/or log backups) Filesystem/SAN Copy Dependent on technology Database Mirroring/Availability Groups Cutover typically in seconds
  • 48. #SQLSAT895 Upgrade process to minimize risks Functional & Performance tests Optimize Migrate schema, objects & data Remediate applications Discover Assess Convert Data Sync Cutover
  • 49. #SQLSAT895 Discover Phase Which SQL Server versions do I have? Which Editions am I running? Which SQL Server components are installed? How many cores are on each server? How many databases are in each instance? What are the sizes of all my databases? What are the settings for each instance and database?
  • 50. #SQLSAT895 Assessment Tools Microsoft Assessment and Planning (MAP) Toolkit SQL PowerDoc PowerShell Script gather data from WMI in XML Windows and SQL Server rich inventory in Excel Best Practices Reports in Excel Consolidates multiple server/instances Official https://github.com/kendalvandyke/sqlpowerdoc Newer https://github.com/bryan5989/SQLPowerDoc Quest Enterprise Reporter for SQL Server Based on previously free Discovery Wizard for SQL Server Part of a suite for compliancy covering several other products (e.g. AD)
  • 51. #SQLSAT895 Microsoft Upgrade/Migration Tools Upgrade Advisor Data Migration Assistant (DMA) Data Experimentation Assistant (DEA) Data Migration Service (DMS) SQL Server Migration Assistant (SSMA) SQL Server Data Tools for Visual Studio (SSDT) SQL Server Management Studio (SSMS) “Export Data Tier Application” “Deploy Database to Microsoft Azure SQL Database” Wizard
  • 52. #SQLSAT895 Upgrade Advisor Static Analysis Database Engine Analysis Services Reporting Services Integration Services Dynamic Analysis Trace Files Obsolete! Use only if source database non supported You can still find it in SQL Server Feature Packs (2014 latest)
  • 53. #SQLSAT895 Data Migration Assistant On-premises instances assessment Blocking issues Partially supported or unsupported features Discover issues that may affect compatibility Breaking Changes, Behavior Changes, Deprecated Features Discover new features that may benefit after upgrading Performance, security, Storage Azure SQL Database SKU Recommendations Performance counters analysis to suggest SKU Azure SQL Database Performs the migration
  • 54. #SQLSAT895 Data Migration Assistant V5 Added SQL 2019 destinations (Windows & Linux) Save and load assessment!!! Assess SQL queries from external applications e.g. queries in C# code Access Migration Toolkit to generate JSON report Assess SSIS in SSISDB and package store More info https://docs.microsoft.com/en-us/sql/dma/dma-whatsnew
  • 55. Versions supported by DMA Source SQL Server 2005 SQL Server 2008 SQL Server 2008 R2 SQL Server 2012 SQL Server 2014 SQL Server 2016 SQL Server 2017 on Windows Destination SQL Server 2012 SQL Server 2014 SQL Server 2016 SQL Server 2017 on Windows and Linux SQL Server 2019 on Windows and Linux Azure SQL Database Azure SQL Database Managed Instance
  • 56. #SQLSAT895 Bulk Analysis Repository instances/databases to assess in SQL/CSV Automation with PowerShell Import in reporting database Reports with PowerBI
  • 57. #SQLSAT895 DMA Problems Cannot save sessions! Only Assessment data in JSON format Azure SQL Database SKU Recommendations Command Line Interface only Currently not working… Bulk Analysis (still in V5?) Cumbersome process Errors dmaDataCollector crashes with pubs, dmacmd.exe is a closed project LoadWarehouse.sql needs to be fixed
  • 58. #SQLSAT895 Data Migration Assistant Resources Docs https://docs.microsoft.com/en-us/sql/dma/dma- overview https://docs.microsoft.com/en-us/sql/dma/dma- consolidatereports Blog https://techcommunity.microsoft.com/t5/Microsoft- Data-Migration/bg-p/MicrosoftDataMigration
  • 59. #SQLSAT895 Database Experimentation Assistant A/B testing solution for SQL Server Workload comparison e.g. upgrades, new indexes, etc. Capture SQL Trace Extended Events (V2.6+) Replay DReplay integration Analysis Performance improvements and regressions
  • 61. #SQLSAT895 Versions supported by DEA Source SQL Server 2005+ Target SQL Server 2005+ Analysis SQL Server 2008+
  • 62. #SQLSAT895 Data Migration Service Resources Docs https://docs.microsoft.com/en-us/sql/dea/database- experimentation-assistant-overview Blog https://techcommunity.microsoft.com/t5/Microsoft-Data- Migration/bg-p/MicrosoftDataMigration
  • 63. #SQLSAT895 Azure Database Migration Service On-premises SQL Server 2005 - 2017 Assessment SSMA & DMA Azure Database Migration Service My
  • 64. #SQLSAT895 DMS Migration Scenarios SQL Server -> Azure SQL Database Offline SQL Server -> Azure SQL Database Online SQL Server -> Azure SQL Database Managed Instance Offline SQL Server -> Azure SQL Database Managed Instance Online MySQL -> Azure DB for MySQL Online PostgreSQL -> Azure DB for PostgreSQL Online
  • 65. #SQLSAT895 Data Migration Service Resources Docs https://docs.microsoft.com/en-us/azure/dms/dms-overview https://docs.microsoft.com/en-us/azure/dms/tutorial-sql-server-to-azure- sql Blog https://techcommunity.microsoft.com/t5/Microsoft-Data-Migration/bg- p/MicrosoftDataMigration
  • 66. #SQLSAT895 SQL Server Migration Assistant Migration effort assessment Code conversion Data migration Testing Deployment
  • 67. Platforms supported by SSMA Source Microsoft Access DB2 MySQL Oracle SAP ASE (Sybase ASE) Destination SQL Server 2008 SQL Server 2008 R2 SQL Server 2012 SQL Server 2014 SQL Server 2016 SQL Server 2017 on Windows and Linux SQL Server 2019 on Windows and Linux Azure SQL Database Azure SQL Database Managed Instance Azure SQL Data Warehouse (Oracle only)
  • 68. #SQLSAT895 SSMA for Oracle: how it works (101) Creates two “helper” databases sysdb ssmatesterdb Stores metadata in the file system data stored in xml compressed format can rename to .gzip and uncompress it shred xml into lot of files for caching reports directory can be safely deleted and re-generated metadata reside in the original .mb files
  • 69. #SQLSAT895 SSMA for Oracle: sysdb helper database Provides code infrastructure to emulate features system functions schema features (e.g. sequences) engine features (e.g. autonomous transactions) session bound data storage emulated metadata storage (e.g. packages) Maintenance protect metadata performance related depends on workload
  • 70. #SQLSAT895 SSMA for Oracle: does it really work? Yes, but don’t expect miracles! Works well with simple schemas… Usually won’t do all the work by itself Very useful for assessing efforts assessing problems doing prototypes as a learning tool to translate/emulate some functionalities
  • 71. #SQLSAT895 Testing Nothing can replace good testing! Hard to have tests with good coverage of the whole workload Sometimes is more cost effective to run fewer tests and fix the problems later… SQL Server DReplay infrastructure Often impossible to capture and replay even a fraction of the workload
  • 72. #SQLSAT895 Workload Tools Very good for side-by-side, real-time workload replay Captures XE batch completed and replay commands on-the-fly Captures execution telemetry (cpu, read, writes, duration) Reports to find regressions Developed by a well-known MVP ☺ https://github.com/spaghettidba/WorkloadTools
  • 73. #SQLSAT895 DBA Tools Lot of PowerShell cmdlets to make the DBA life easier Many cmdlets target specifically migration/upgrade scenarios E.g copy logins with synch option One stop cmdlet migrating an All instance-level assets (e.g. credentials, linked servers, etc. ) Via backup/restore automation (just specify network share) https://dbatools.io
  • 75. #SQLSAT895 After the upgrade: remember the plan Upgrade to latest SQL Server version and keeping source compatibility level Enable Query Store Create a baseline of the workload Move to latest compatibility level Quickly fix regressions by forcing last known good plan!
  • 76. #SQLSAT895 Automatic Tuning Automatic plan correction Automatically force last good plan when regression detected Minimum 10 CPU seconds improvement sys.dm_db_tuning_recommendations for manual corrections SQL Server 2017 and Azure SQL Database https://docs.microsoft.com/en-us/sql/relational-databases/automatic-tuning/automatic-tuning
  • 77. #SQLSAT895 Query Tuning Assistant Well-defined workflow targeting patterns for query regressions Independence vs. Correlation Simple Containment vs. Base Containment Multi-statement table-valued function (MSTVF) fixed cardinality guess SQL Server Management Studio Wizard-Based Tool Can be automated via PowerShell
  • 78. #SQLSAT895 Query Tuning Assistant plan Upgrade to latest SQL Server version and keeping source compatibilit y level Enable Query Store Create a baseline of the workload Move to latest compatibilit y level (or any target level to test) Collect workload with new level and start comparing with baseline Instead of only forcing last known good plan, experiment with tuning recommend ation actions https://docs.microsoft.com/en-us/sql/relational-databases/performance/upgrade-dbcompat-using-qta
  • 79. #SQLSAT895 Modernization Stream Phases in a SQL Project Partner Collect Inspire Assess Define Inventory Envision Scope Modernize Detail Setup Test Execute Support Tune Mentor
  • 80. #SQLSAT895 Assessment phase Define • Finalize assessment’s scope • Finalize questionnaires to be sent to project representatives • Activities kick-off Inventory • Detailed inventory of Windows Server & SQL Servers • Static analysis of databases & SQL code • Project representatives interviews (questionnaires) Envision • Consolidate & analyze inventory data • Review configuration, performance, reliability and security best practices • Prepare modernization scenarios and macro action-plan Scope • Discuss deliverables and scenarios with customer • Finalize modernization scenarios • Prepare next phases offering (Modernize & Support)
  • 81. #SQLSAT895 Assessment phase: reducing uncertainty Better planning/flexibility Size better understood results in reduced expectations and scope Allows to run several Modernization phases at different times Leaves the customer with something tangible Detailed assets inventory Performance/Security/Reliability automatic assessment Static analysis of databases code Possibility to rescope/change scenarios Enough data to independently run the project
  • 82. #SQLSAT895 On-Premises to Azure PaaS/IaaS migrations IaaS SQL Server on Azure VMs SQL Server on Azure Containers SQL Server on Azure Kubernetes PaaS Azure SQL Database Azure SQL Database Managed Instance
  • 83. #SQLSAT895 On-Premises to SQL Server PaaS migrations
  • 84. Subnet used for MI On-Premise to Managed Instance online workflow Subnet used for DMS On-Premise Cloud network SQL DB Managed Instance Azure Blob Storage SMB Network Share
  • 85. #SQLSAT895 Other on-premises to PaaS strategies Method 1 Method 2 Method 3 Target DB Azure SQL Database SQL Server SSMS 2. Import 1. DeployOR .bacpac 1. Export Source DB Target DB Azure SQL Database SQL Server SQL Azure Migration Wizard 2. Execute 1. Generate T-SQL Source DB Target DB Azure SQL Database SQL Server SSMS 6. Export/ Import or Deploy Data Migratio n Assistant 4. Copy Copy DB Source DB 5. Publish 1. Import Visual Studio Database Project 2. Transform 3. Edit, Build & Test *.sql 4. Publish (schema only) Compatible database: manual copy or deploy wizard in SSMS Database almost compatible: SQL Azure Migration Wizard DMA and SSMS Refactor with Visual Studio and Data Migration Assistant, final deploy with SSMS
  • 86. #SQLSAT895 Migration with minimal downtime Transactional Replication
  • 87. #SQLSAT895 Data Migration Resources Blog https://techcommunity.microsoft.com/t5/Microsoft-Data-Migration/bg- p/MicrosoftDataMigration Upgrade SQL Server https://docs.microsoft.com/sql/database-engine/install- windows/upgrade-sql-server Post-migration validation and optimization guide https://docs.microsoft.com/sql/relational-databases/post-migration- validation-and-optimization-guide Azure Database Migration Guide https://datamigration.microsoft.com