SlideShare une entreprise Scribd logo
1  sur  38
SQL 2016 Stretch DB
Shy Engelberg, CTO@Valinor
Email: shy@valinor.co.il
Phone: 054-7717115
Twitter: @ShyEngelberg
 Hybrid computing
 Introduction to Stretch DB
 Setting up
 Technical details
 Performance
 The biggest breakthrough?
 Conclusion
 Customers don’t want to rip and replace their current infrastructure
to benefit from the cloud; they
want the strengths of their on-premises
investments and the flexibility of the cloud
 The cloud should be an enabler for innovation, and an extension of your
organization’s IT fabric
 by 2020, about 80% of the world’s 2,000 largest companies will still have
greater than 50% of their IT onsite.
Stretch Database migrates
your historical data
transparently and securely
to the Microsoft Azure cloud.
SQL 2016, books online:
https://msdn.microsoft.com/en-us/library/dn935011.aspx
Stretch Database migrates
your historical data
transparently and securely
to the Microsoft Azure cloud.
SQL 2016, books online:
https://msdn.microsoft.com/en-us/library/dn935011.aspx
Stretch Database migrates
your historical data
transparently and securely
to the Microsoft Azure cloud.
SQL 2016, books online:
https://msdn.microsoft.com/en-us/library/dn935011.aspx
Stretch Database migrates
your historical data
transparently and securely
to the Microsoft Azure cloud.
SQL 2016, books online:
https://msdn.microsoft.com/en-us/library/dn935011.aspx
Stretch Database migrates
your historical data
transparently and securely
to the Microsoft Azure cloud.
SQL 2016, books online:
https://msdn.microsoft.com/en-us/library/dn935011.aspx
 Stretch warm and cold transactional data dynamically from SQL Server
to Microsoft Azure.
 You set the policy that determines where data is stored, and
SQL Server handles the data movement in the background.
(Me: asynchronous)
 The entire table is always online and queryable.
 Access your data seamlessly regardless of whether it’s on-premises or
stretched to the cloud.
 Stretch Database doesn’t require any changes to existing queries or
applications – the location of the data is completely transparent to the
application.
SQL 2016, books online:
https://msdn.microsoft.com/en-us/library/dn935011.aspx
 After you enable Stretch Database for a SQL Server instance, a
database, and at least one table, it silently begins to migrate your
historical data to an Azure SQL Database.
 You can migrate the entire table or you can specify a filter predicate
to select the rows to migrate.
SQL 2016, books online:
https://msdn.microsoft.com/en-us/library/dn935011.aspx
 When you enable Stretch Database on a database, it creates a secure
linked server definition in the on-premises SQL Server.
This linked server definition has the remote endpoint as the target.
When you enable Stretch Database on a table in the database, it
provisions remote resources and begins to migrate eligible data, if
migration is enabled.
SQL 2016, books online:
https://msdn.microsoft.com/en-us/library/dn935011.aspx
Table properties
•More than 1,023 columns
•More than 998 indexes
•Tables that contain
FILESTREAM data
•FileTables
•Replicated tables
•Tables that are actively using
Change Tracking or Change
Data Capture
•Memory-optimized tables
Data types and column
properties
•Timestamp
•sql_variant
•XML
•Geometry
•Geography
•Hierarchyid
•CLR user-defined types (UDTs)
Column types
•COLUMN_SET
•Computed columns
Constraints
•Check constraints
•Default constraints
•Foreign key constraints that
reference the table
Indexes
•Full text indexes
•XML indexes
•Spatial indexes
•Indexed views that reference
the table
Cloud technology SQL Azure
Local technology External resource
Table structure
restrictions
Yes
Synchronous
migration
No
Migration process
actions allowed
Can be stopped and continue
Un-migrate Possible
Backup Supported using the SQL
AZURE backup
 Stretching DB using UI
 External resource in local DB (UI)
 Stretch Database applies the filter predicate to the table and
determines eligible rows by using the CROSS APPLY operator.
If the function returns a non-empty result for the row, the row is
eligible to be migrated.
 If you provide a filter predicate that performs poorly, data migration
also performs poorly.
 Stretch Database applies the filter predicate to the table and
determines eligible rows by using the CROSS APPLY operator.
If the function returns a non-empty result for the row, the row is
eligible to be migrated.
 If you provide a filter predicate that performs poorly, data migration
also performs poorly.
!!!!!!!!!!
 You can't use subqueries or non-deterministic functions such as
RAND() or GETDATE().
!!!!!!!!!
 Stretching DB using script
 Remote objects
 Schema changes
 SQL Azure database – S3 tier by default.
 A dynamic name for the remote table.
 A new column is added to the remote table.
 Indexes are duplicated besides some exceptions.
 Uniqueness is not enforced for UNIQUE constraints and PRIMARY
KEY constraints on a Stretch-enabled table. (warning in the wizard)
 You can't run UPDATE or DELETE operations on a Stretch-enabled
table.
 You can't create an index for a view that includes Stretch-enabled
tables.
 You can't update or delete from a view that includes Stretch-enabled
tables. You can, however, insert into a view that includes Stretch-
enabled tables.
 Filters on indexes are not propagated to the remote table
 Limitations on a stretched table
 New DMVs
What's in the cloud? Data + compute
Size limitation Up to the size limit of the SQL Azure tier (250-
500 GB) per DB.
**60-100 TB (?)**
price Quite expensive (150 USD for month) for an
archiving solution
Table structure changes Changes in the cloud
Migration level Full table or deterministic function by row.
(row level)
Limitations on actions Yes
New DMV's in local DB Yes
Constraints enforcements No
 Stretch Database ensures that no data is lost if a failure occurs during
migration.
 Has a retry logic to handle connection issues that may occur during
migration.
 You can pause data migration to troubleshoot problems on the local
server or to maximize the available network bandwidth.
 Migration queries
 Locks
 Monitor
Migration overhead Locks and function + data
movement
Migration process
actions allowed
Can be stopped and continue
Un-migrate Possible
 Queries against tables with Stretch Database enabled automatically
run against both the local database and the remote endpoint.
 Stretch Database leverages processing power in Azure to run queries
against remote data by rewriting the query.
You can see this rewriting as a "remote query" operator in the new
query plan.
“Queries that include Stretch-enabled tables are expected to perform
more slowly than they did before the tables were enabled for Stretch.
If query performance degrades significantly, review the following
possible problems”
 Configure your SQL Database server to be in the same geographical
region as your SQL Server to reduce network latency.
 The service tier or the performance level of your Azure SQL Database
server may not be sufficient to process your query load quickly.
 Your network conditions may have degraded. Contact your network
administrator for info about recent issues or outages.
https://msdn.microsoft.com/en-us/library/mt484151.aspx
 Querying stretched table – performance and troubleshooting
Performance Monitoring and
troubleshooting (Statistics,
Profiler, dmv's)
Complex
Actual performance Can be bad, due to structure
change and SQL Azure tier.
 New in SQL Server 2014- you can put any data file in the cloud.
 Create Credentials to allow access of the windows service to the
storage accountcontainer.
 Create you data files directly on a URL, no changes or additions to the
T-SQL syntax.
 Querying “remote data files” table – performance and troubleshooting
Stretch Data files
Cloud technology SQL Azure Azure storage
Local technology External resource File group
Table structure
restrictions
Yes No
Synchronous migration No Yes
Migration process actions
allowed
Can be stopped and continue We can’t do anything
Un-migrate Possible Can be done manually
Backup Supported using the SQL
AZURE backup
Supported inside
regular SQL backup
Stretch Data files
What's in the cloud? Data + compute Data
Size limitation Up to the size limit of the SQL
Azure tier (250-500 GB) per DB.
**60-100 TB (?)**
None
price Quite expensive (150 USD for
month) for an archiving solution
Cheap (6.00$/mo for
250GB + pay for IOPS)
Table structure changes Changes in the cloud No
Migration level Full table or deterministic function
by row. (row level)
Partition
Limitations on actions Yes no
New DMV's in local DB Yes no
Stretch Data files
Migration overhead Locks and function + data
movement
None
Performance Monitoring
and troubleshooting
(Statistics,
Profiler, dmv's)
Complex As usuall
Actual performance Can be bad, due to structure
change and SQL Azure tier.
Only overhead is latency
 Stretch DB is a very nice feature, with a great vision (expand your
compute and storage resources seamlessly)
 The implementation so far is quite problematic in terms of
performance of querying and overhead of the migration process itself.
 The solution is expensive for an archiving solution.
 Microsoft are trying to make us use more and more Azure resources.
 Remote data files is a wonderful solution for archiving and for
achieving performance boost on Azure VM’s.
Thank you!

Contenu connexe

Tendances

Azure data bricks by Eugene Polonichko
Azure data bricks by Eugene PolonichkoAzure data bricks by Eugene Polonichko
Azure data bricks by Eugene PolonichkoAlex Tumanoff
 
Scalable relational database with SQL Azure
Scalable relational database with SQL AzureScalable relational database with SQL Azure
Scalable relational database with SQL AzureShy Engelberg
 
Azure SQL Data Warehouse for beginners
Azure SQL Data Warehouse for beginnersAzure SQL Data Warehouse for beginners
Azure SQL Data Warehouse for beginnersMichaela Murray
 
Introducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseIntroducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseJames Serra
 
Azure data platform overview
Azure data platform overviewAzure data platform overview
Azure data platform overviewJames Serra
 
Azure Data Lake Analytics Deep Dive
Azure Data Lake Analytics Deep DiveAzure Data Lake Analytics Deep Dive
Azure Data Lake Analytics Deep DiveIlyas F ☁☁☁
 
Afternoons with Azure - Azure Data Services
Afternoons with Azure - Azure Data ServicesAfternoons with Azure - Azure Data Services
Afternoons with Azure - Azure Data ServicesCCG
 
What’s new in SQL Server 2017
What’s new in SQL Server 2017What’s new in SQL Server 2017
What’s new in SQL Server 2017James Serra
 
Dipping Your Toes: Azure Data Lake for DBAs
Dipping Your Toes: Azure Data Lake for DBAsDipping Your Toes: Azure Data Lake for DBAs
Dipping Your Toes: Azure Data Lake for DBAsBob Pusateri
 
Azure Data Factory V2; The Data Flows
Azure Data Factory V2; The Data FlowsAzure Data Factory V2; The Data Flows
Azure Data Factory V2; The Data FlowsThomas Sykes
 
Introduction to snowflake
Introduction to snowflakeIntroduction to snowflake
Introduction to snowflakeSunil Gurav
 
KSnow: Getting started with Snowflake
KSnow: Getting started with SnowflakeKSnow: Getting started with Snowflake
KSnow: Getting started with SnowflakeKnoldus Inc.
 
An overview of snowflake
An overview of snowflakeAn overview of snowflake
An overview of snowflakeSivakumar Ramar
 
Azure Databricks is Easier Than You Think
Azure Databricks is Easier Than You ThinkAzure Databricks is Easier Than You Think
Azure Databricks is Easier Than You ThinkIke Ellis
 
Store Data in Azure SQL Database
Store Data in Azure SQL DatabaseStore Data in Azure SQL Database
Store Data in Azure SQL DatabaseSuhail Jamaldeen
 

Tendances (20)

Azure data bricks by Eugene Polonichko
Azure data bricks by Eugene PolonichkoAzure data bricks by Eugene Polonichko
Azure data bricks by Eugene Polonichko
 
Exploring sql server 2016
Exploring sql server 2016Exploring sql server 2016
Exploring sql server 2016
 
Statistics and Indexes Internals
Statistics and Indexes InternalsStatistics and Indexes Internals
Statistics and Indexes Internals
 
Scalable relational database with SQL Azure
Scalable relational database with SQL AzureScalable relational database with SQL Azure
Scalable relational database with SQL Azure
 
Azure SQL Data Warehouse for beginners
Azure SQL Data Warehouse for beginnersAzure SQL Data Warehouse for beginners
Azure SQL Data Warehouse for beginners
 
Introduction to azure document db
Introduction to azure document dbIntroduction to azure document db
Introduction to azure document db
 
Introducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseIntroducing Azure SQL Data Warehouse
Introducing Azure SQL Data Warehouse
 
Azure data platform overview
Azure data platform overviewAzure data platform overview
Azure data platform overview
 
Azure Data Lake Analytics Deep Dive
Azure Data Lake Analytics Deep DiveAzure Data Lake Analytics Deep Dive
Azure Data Lake Analytics Deep Dive
 
Afternoons with Azure - Azure Data Services
Afternoons with Azure - Azure Data ServicesAfternoons with Azure - Azure Data Services
Afternoons with Azure - Azure Data Services
 
What’s new in SQL Server 2017
What’s new in SQL Server 2017What’s new in SQL Server 2017
What’s new in SQL Server 2017
 
Dipping Your Toes: Azure Data Lake for DBAs
Dipping Your Toes: Azure Data Lake for DBAsDipping Your Toes: Azure Data Lake for DBAs
Dipping Your Toes: Azure Data Lake for DBAs
 
Azure Data Factory V2; The Data Flows
Azure Data Factory V2; The Data FlowsAzure Data Factory V2; The Data Flows
Azure Data Factory V2; The Data Flows
 
Introduction to snowflake
Introduction to snowflakeIntroduction to snowflake
Introduction to snowflake
 
An intro to Azure Data Lake
An intro to Azure Data LakeAn intro to Azure Data Lake
An intro to Azure Data Lake
 
Data virtualization using polybase
Data virtualization using polybaseData virtualization using polybase
Data virtualization using polybase
 
KSnow: Getting started with Snowflake
KSnow: Getting started with SnowflakeKSnow: Getting started with Snowflake
KSnow: Getting started with Snowflake
 
An overview of snowflake
An overview of snowflakeAn overview of snowflake
An overview of snowflake
 
Azure Databricks is Easier Than You Think
Azure Databricks is Easier Than You ThinkAzure Databricks is Easier Than You Think
Azure Databricks is Easier Than You Think
 
Store Data in Azure SQL Database
Store Data in Azure SQL DatabaseStore Data in Azure SQL Database
Store Data in Azure SQL Database
 

En vedette

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
 
Sql server 2016 Discovery Day
Sql server 2016 Discovery DaySql server 2016 Discovery Day
Sql server 2016 Discovery DayThomas Sykes
 
SQL Server 2016 RC3 Always Encryption
SQL Server 2016 RC3 Always Encryption SQL Server 2016 RC3 Always Encryption
SQL Server 2016 RC3 Always Encryption sultankhan
 
What is in it for a dba sql server 2012
What is in it for a dba   sql server 2012What is in it for a dba   sql server 2012
What is in it for a dba sql server 2012Deepthi Anantharam
 
Gamma Soft. L'entreprise Temps-Réel
Gamma Soft. L'entreprise Temps-RéelGamma Soft. L'entreprise Temps-Réel
Gamma Soft. L'entreprise Temps-RéelGamma Soft
 
Sql Server 2016 Always Encrypted
Sql Server 2016 Always EncryptedSql Server 2016 Always Encrypted
Sql Server 2016 Always EncryptedDuncan Greaves PhD
 
Top 5 Challenges to Upgrading to SQL Server 2016
Top 5 Challenges to Upgrading to SQL Server 2016Top 5 Challenges to Upgrading to SQL Server 2016
Top 5 Challenges to Upgrading to SQL Server 2016ScaleArc
 
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
 
SQL Server 2016 Query store
SQL Server 2016 Query storeSQL Server 2016 Query store
SQL Server 2016 Query storeVitaliy Popovych
 
Dynamic data masking sql server 2016
Dynamic data masking sql server 2016Dynamic data masking sql server 2016
Dynamic data masking sql server 2016Antonios Chatzipavlis
 
Always encrypted overview
Always encrypted overviewAlways encrypted overview
Always encrypted overviewSolidQ
 
Stretch Database
Stretch DatabaseStretch Database
Stretch DatabaseSolidQ
 
Microsoft SQL Server 2016 - Everything Built In
Microsoft SQL Server 2016 - Everything Built InMicrosoft SQL Server 2016 - Everything Built In
Microsoft SQL Server 2016 - Everything Built InDavid J Rosenthal
 
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
 
Microsoft SQL Server internals & architecture
Microsoft SQL Server internals & architectureMicrosoft SQL Server internals & architecture
Microsoft SQL Server internals & architectureKevin Kline
 
SQL Saturday 510 Paris 2016 - Query Store session - final
SQL Saturday 510 Paris 2016 - Query Store session - finalSQL Saturday 510 Paris 2016 - Query Store session - final
SQL Saturday 510 Paris 2016 - Query Store session - finalPhilippe Geiger
 
Ms sql server architecture
Ms sql server architectureMs sql server architecture
Ms sql server architectureAjeet Singh
 

En vedette (18)

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
 
Sql server 2016 Discovery Day
Sql server 2016 Discovery DaySql server 2016 Discovery Day
Sql server 2016 Discovery Day
 
SQL Server 2016 RC3 Always Encryption
SQL Server 2016 RC3 Always Encryption SQL Server 2016 RC3 Always Encryption
SQL Server 2016 RC3 Always Encryption
 
What is in it for a dba sql server 2012
What is in it for a dba   sql server 2012What is in it for a dba   sql server 2012
What is in it for a dba sql server 2012
 
Gamma Soft. L'entreprise Temps-Réel
Gamma Soft. L'entreprise Temps-RéelGamma Soft. L'entreprise Temps-Réel
Gamma Soft. L'entreprise Temps-Réel
 
Sql Server 2016 Always Encrypted
Sql Server 2016 Always EncryptedSql Server 2016 Always Encrypted
Sql Server 2016 Always Encrypted
 
Top 5 Challenges to Upgrading to SQL Server 2016
Top 5 Challenges to Upgrading to SQL Server 2016Top 5 Challenges to Upgrading to SQL Server 2016
Top 5 Challenges to Upgrading to SQL Server 2016
 
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
 
SQL Server 2016 Query store
SQL Server 2016 Query storeSQL Server 2016 Query store
SQL Server 2016 Query store
 
Dynamic data masking sql server 2016
Dynamic data masking sql server 2016Dynamic data masking sql server 2016
Dynamic data masking sql server 2016
 
Data juice
Data juiceData juice
Data juice
 
Always encrypted overview
Always encrypted overviewAlways encrypted overview
Always encrypted overview
 
Stretch Database
Stretch DatabaseStretch Database
Stretch Database
 
Microsoft SQL Server 2016 - Everything Built In
Microsoft SQL Server 2016 - Everything Built InMicrosoft SQL Server 2016 - Everything Built In
Microsoft SQL Server 2016 - Everything Built In
 
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
 
Microsoft SQL Server internals & architecture
Microsoft SQL Server internals & architectureMicrosoft SQL Server internals & architecture
Microsoft SQL Server internals & architecture
 
SQL Saturday 510 Paris 2016 - Query Store session - final
SQL Saturday 510 Paris 2016 - Query Store session - finalSQL Saturday 510 Paris 2016 - Query Store session - final
SQL Saturday 510 Paris 2016 - Query Store session - final
 
Ms sql server architecture
Ms sql server architectureMs sql server architecture
Ms sql server architecture
 

Similaire à SQL Server 2016 - Stretch DB

Azure Data Fundamentals DP 900 Full Course
Azure Data Fundamentals DP 900 Full CourseAzure Data Fundamentals DP 900 Full Course
Azure Data Fundamentals DP 900 Full CoursePiyush sachdeva
 
SQL Saturday Redmond 2019 ETL Patterns in the Cloud
SQL Saturday Redmond 2019 ETL Patterns in the CloudSQL Saturday Redmond 2019 ETL Patterns in the Cloud
SQL Saturday Redmond 2019 ETL Patterns in the CloudMark Kromer
 
KoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloud
KoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloudKoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloud
KoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloudTobias Koprowski
 
Migrating on premises workload to azure sql database
Migrating on premises workload to azure sql databaseMigrating on premises workload to azure sql database
Migrating on premises workload to azure sql databasePARIKSHIT SAVJANI
 
Microsoft Data Integration Pipelines: Azure Data Factory and SSIS
Microsoft Data Integration Pipelines: Azure Data Factory and SSISMicrosoft Data Integration Pipelines: Azure Data Factory and SSIS
Microsoft Data Integration Pipelines: Azure Data Factory and SSISMark Kromer
 
Exploring Microsoft Azure Infrastructures
Exploring Microsoft Azure InfrastructuresExploring Microsoft Azure Infrastructures
Exploring Microsoft Azure InfrastructuresCCG
 
Sql azure dec_2010 Lynn & Ike
Sql azure dec_2010 Lynn & IkeSql azure dec_2010 Lynn & Ike
Sql azure dec_2010 Lynn & IkeIke Ellis
 
Azure Synapse Analytics Overview (r2)
Azure Synapse Analytics Overview (r2)Azure Synapse Analytics Overview (r2)
Azure Synapse Analytics Overview (r2)James Serra
 
Azure Data Factory ETL Patterns in the Cloud
Azure Data Factory ETL Patterns in the CloudAzure Data Factory ETL Patterns in the Cloud
Azure Data Factory ETL Patterns in the CloudMark Kromer
 
JoTechies - Azure SQL DB
JoTechies - Azure SQL DBJoTechies - Azure SQL DB
JoTechies - Azure SQL DBJoTechies
 
Sergiy Lunyakin "Azure SQL DWH: Tips and Tricks for developers"
Sergiy Lunyakin "Azure SQL DWH: Tips and Tricks for developers"Sergiy Lunyakin "Azure SQL DWH: Tips and Tricks for developers"
Sergiy Lunyakin "Azure SQL DWH: Tips and Tricks for developers"DataConf
 
Deploying data tier applications sql saturday dc
Deploying data tier applications sql saturday dcDeploying data tier applications sql saturday dc
Deploying data tier applications sql saturday dcJoseph D'Antoni
 
WEB PROGRAMMING USING ASP.NET
WEB PROGRAMMING USING ASP.NETWEB PROGRAMMING USING ASP.NET
WEB PROGRAMMING USING ASP.NETDhruvVekariya3
 
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginnersSQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginnersTobias Koprowski
 

Similaire à SQL Server 2016 - Stretch DB (20)

Stretch db sql server 2016 (sn0028)
Stretch db   sql server 2016 (sn0028)Stretch db   sql server 2016 (sn0028)
Stretch db sql server 2016 (sn0028)
 
Azure Data Fundamentals DP 900 Full Course
Azure Data Fundamentals DP 900 Full CourseAzure Data Fundamentals DP 900 Full Course
Azure Data Fundamentals DP 900 Full Course
 
AZURE Data Related Services
AZURE Data Related ServicesAZURE Data Related Services
AZURE Data Related Services
 
Azure SQL Data Warehouse
Azure SQL Data Warehouse Azure SQL Data Warehouse
Azure SQL Data Warehouse
 
SQL Saturday Redmond 2019 ETL Patterns in the Cloud
SQL Saturday Redmond 2019 ETL Patterns in the CloudSQL Saturday Redmond 2019 ETL Patterns in the Cloud
SQL Saturday Redmond 2019 ETL Patterns in the Cloud
 
KoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloud
KoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloudKoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloud
KoprowskiT_SQLSat230_Rheinland_SQLAzure-fromPlantoBackuptoCloud
 
Migrating on premises workload to azure sql database
Migrating on premises workload to azure sql databaseMigrating on premises workload to azure sql database
Migrating on premises workload to azure sql database
 
Why you should(n't) run your databases in the cloud
Why you should(n't) run your databases in the cloudWhy you should(n't) run your databases in the cloud
Why you should(n't) run your databases in the cloud
 
Microsoft Data Integration Pipelines: Azure Data Factory and SSIS
Microsoft Data Integration Pipelines: Azure Data Factory and SSISMicrosoft Data Integration Pipelines: Azure Data Factory and SSIS
Microsoft Data Integration Pipelines: Azure Data Factory and SSIS
 
Exploring Microsoft Azure Infrastructures
Exploring Microsoft Azure InfrastructuresExploring Microsoft Azure Infrastructures
Exploring Microsoft Azure Infrastructures
 
Sql azure dec_2010 Lynn & Ike
Sql azure dec_2010 Lynn & IkeSql azure dec_2010 Lynn & Ike
Sql azure dec_2010 Lynn & Ike
 
Azure Synapse Analytics Overview (r2)
Azure Synapse Analytics Overview (r2)Azure Synapse Analytics Overview (r2)
Azure Synapse Analytics Overview (r2)
 
Azure Data Factory ETL Patterns in the Cloud
Azure Data Factory ETL Patterns in the CloudAzure Data Factory ETL Patterns in the Cloud
Azure Data Factory ETL Patterns in the Cloud
 
JoTechies - Azure SQL DB
JoTechies - Azure SQL DBJoTechies - Azure SQL DB
JoTechies - Azure SQL DB
 
Sergiy Lunyakin "Azure SQL DWH: Tips and Tricks for developers"
Sergiy Lunyakin "Azure SQL DWH: Tips and Tricks for developers"Sergiy Lunyakin "Azure SQL DWH: Tips and Tricks for developers"
Sergiy Lunyakin "Azure SQL DWH: Tips and Tricks for developers"
 
Phissug s01 ep6, stretch database
Phissug s01 ep6, stretch databasePhissug s01 ep6, stretch database
Phissug s01 ep6, stretch database
 
Sql Sever Presentation.pptx
Sql Sever Presentation.pptxSql Sever Presentation.pptx
Sql Sever Presentation.pptx
 
Deploying data tier applications sql saturday dc
Deploying data tier applications sql saturday dcDeploying data tier applications sql saturday dc
Deploying data tier applications sql saturday dc
 
WEB PROGRAMMING USING ASP.NET
WEB PROGRAMMING USING ASP.NETWEB PROGRAMMING USING ASP.NET
WEB PROGRAMMING USING ASP.NET
 
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginnersSQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 

Dernier (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

SQL Server 2016 - Stretch DB

  • 2. Shy Engelberg, CTO@Valinor Email: shy@valinor.co.il Phone: 054-7717115 Twitter: @ShyEngelberg
  • 3.  Hybrid computing  Introduction to Stretch DB  Setting up  Technical details  Performance  The biggest breakthrough?  Conclusion
  • 4.
  • 5.  Customers don’t want to rip and replace their current infrastructure to benefit from the cloud; they want the strengths of their on-premises investments and the flexibility of the cloud  The cloud should be an enabler for innovation, and an extension of your organization’s IT fabric  by 2020, about 80% of the world’s 2,000 largest companies will still have greater than 50% of their IT onsite.
  • 6. Stretch Database migrates your historical data transparently and securely to the Microsoft Azure cloud. SQL 2016, books online: https://msdn.microsoft.com/en-us/library/dn935011.aspx
  • 7. Stretch Database migrates your historical data transparently and securely to the Microsoft Azure cloud. SQL 2016, books online: https://msdn.microsoft.com/en-us/library/dn935011.aspx
  • 8. Stretch Database migrates your historical data transparently and securely to the Microsoft Azure cloud. SQL 2016, books online: https://msdn.microsoft.com/en-us/library/dn935011.aspx
  • 9. Stretch Database migrates your historical data transparently and securely to the Microsoft Azure cloud. SQL 2016, books online: https://msdn.microsoft.com/en-us/library/dn935011.aspx
  • 10. Stretch Database migrates your historical data transparently and securely to the Microsoft Azure cloud. SQL 2016, books online: https://msdn.microsoft.com/en-us/library/dn935011.aspx
  • 11.  Stretch warm and cold transactional data dynamically from SQL Server to Microsoft Azure.  You set the policy that determines where data is stored, and SQL Server handles the data movement in the background. (Me: asynchronous)  The entire table is always online and queryable.  Access your data seamlessly regardless of whether it’s on-premises or stretched to the cloud.  Stretch Database doesn’t require any changes to existing queries or applications – the location of the data is completely transparent to the application. SQL 2016, books online: https://msdn.microsoft.com/en-us/library/dn935011.aspx
  • 12.  After you enable Stretch Database for a SQL Server instance, a database, and at least one table, it silently begins to migrate your historical data to an Azure SQL Database.  You can migrate the entire table or you can specify a filter predicate to select the rows to migrate. SQL 2016, books online: https://msdn.microsoft.com/en-us/library/dn935011.aspx
  • 13.  When you enable Stretch Database on a database, it creates a secure linked server definition in the on-premises SQL Server. This linked server definition has the remote endpoint as the target. When you enable Stretch Database on a table in the database, it provisions remote resources and begins to migrate eligible data, if migration is enabled. SQL 2016, books online: https://msdn.microsoft.com/en-us/library/dn935011.aspx
  • 14. Table properties •More than 1,023 columns •More than 998 indexes •Tables that contain FILESTREAM data •FileTables •Replicated tables •Tables that are actively using Change Tracking or Change Data Capture •Memory-optimized tables Data types and column properties •Timestamp •sql_variant •XML •Geometry •Geography •Hierarchyid •CLR user-defined types (UDTs) Column types •COLUMN_SET •Computed columns Constraints •Check constraints •Default constraints •Foreign key constraints that reference the table Indexes •Full text indexes •XML indexes •Spatial indexes •Indexed views that reference the table
  • 15. Cloud technology SQL Azure Local technology External resource Table structure restrictions Yes Synchronous migration No Migration process actions allowed Can be stopped and continue Un-migrate Possible Backup Supported using the SQL AZURE backup
  • 16.  Stretching DB using UI  External resource in local DB (UI)
  • 17.  Stretch Database applies the filter predicate to the table and determines eligible rows by using the CROSS APPLY operator. If the function returns a non-empty result for the row, the row is eligible to be migrated.  If you provide a filter predicate that performs poorly, data migration also performs poorly.
  • 18.  Stretch Database applies the filter predicate to the table and determines eligible rows by using the CROSS APPLY operator. If the function returns a non-empty result for the row, the row is eligible to be migrated.  If you provide a filter predicate that performs poorly, data migration also performs poorly. !!!!!!!!!!  You can't use subqueries or non-deterministic functions such as RAND() or GETDATE(). !!!!!!!!!
  • 19.  Stretching DB using script
  • 20.  Remote objects  Schema changes
  • 21.  SQL Azure database – S3 tier by default.  A dynamic name for the remote table.  A new column is added to the remote table.  Indexes are duplicated besides some exceptions.
  • 22.  Uniqueness is not enforced for UNIQUE constraints and PRIMARY KEY constraints on a Stretch-enabled table. (warning in the wizard)  You can't run UPDATE or DELETE operations on a Stretch-enabled table.  You can't create an index for a view that includes Stretch-enabled tables.  You can't update or delete from a view that includes Stretch-enabled tables. You can, however, insert into a view that includes Stretch- enabled tables.  Filters on indexes are not propagated to the remote table
  • 23.  Limitations on a stretched table  New DMVs
  • 24. What's in the cloud? Data + compute Size limitation Up to the size limit of the SQL Azure tier (250- 500 GB) per DB. **60-100 TB (?)** price Quite expensive (150 USD for month) for an archiving solution Table structure changes Changes in the cloud Migration level Full table or deterministic function by row. (row level) Limitations on actions Yes New DMV's in local DB Yes Constraints enforcements No
  • 25.  Stretch Database ensures that no data is lost if a failure occurs during migration.  Has a retry logic to handle connection issues that may occur during migration.  You can pause data migration to troubleshoot problems on the local server or to maximize the available network bandwidth.
  • 26.  Migration queries  Locks  Monitor
  • 27. Migration overhead Locks and function + data movement Migration process actions allowed Can be stopped and continue Un-migrate Possible
  • 28.  Queries against tables with Stretch Database enabled automatically run against both the local database and the remote endpoint.  Stretch Database leverages processing power in Azure to run queries against remote data by rewriting the query. You can see this rewriting as a "remote query" operator in the new query plan.
  • 29. “Queries that include Stretch-enabled tables are expected to perform more slowly than they did before the tables were enabled for Stretch. If query performance degrades significantly, review the following possible problems”  Configure your SQL Database server to be in the same geographical region as your SQL Server to reduce network latency.  The service tier or the performance level of your Azure SQL Database server may not be sufficient to process your query load quickly.  Your network conditions may have degraded. Contact your network administrator for info about recent issues or outages. https://msdn.microsoft.com/en-us/library/mt484151.aspx
  • 30.  Querying stretched table – performance and troubleshooting
  • 31. Performance Monitoring and troubleshooting (Statistics, Profiler, dmv's) Complex Actual performance Can be bad, due to structure change and SQL Azure tier.
  • 32.  New in SQL Server 2014- you can put any data file in the cloud.  Create Credentials to allow access of the windows service to the storage accountcontainer.  Create you data files directly on a URL, no changes or additions to the T-SQL syntax.
  • 33.  Querying “remote data files” table – performance and troubleshooting
  • 34. Stretch Data files Cloud technology SQL Azure Azure storage Local technology External resource File group Table structure restrictions Yes No Synchronous migration No Yes Migration process actions allowed Can be stopped and continue We can’t do anything Un-migrate Possible Can be done manually Backup Supported using the SQL AZURE backup Supported inside regular SQL backup
  • 35. Stretch Data files What's in the cloud? Data + compute Data Size limitation Up to the size limit of the SQL Azure tier (250-500 GB) per DB. **60-100 TB (?)** None price Quite expensive (150 USD for month) for an archiving solution Cheap (6.00$/mo for 250GB + pay for IOPS) Table structure changes Changes in the cloud No Migration level Full table or deterministic function by row. (row level) Partition Limitations on actions Yes no New DMV's in local DB Yes no
  • 36. Stretch Data files Migration overhead Locks and function + data movement None Performance Monitoring and troubleshooting (Statistics, Profiler, dmv's) Complex As usuall Actual performance Can be bad, due to structure change and SQL Azure tier. Only overhead is latency
  • 37.  Stretch DB is a very nice feature, with a great vision (expand your compute and storage resources seamlessly)  The implementation so far is quite problematic in terms of performance of querying and overhead of the migration process itself.  The solution is expensive for an archiving solution.  Microsoft are trying to make us use more and more Azure resources.  Remote data files is a wonderful solution for archiving and for achieving performance boost on Azure VM’s.

Notes de l'éditeur

  1. נעים מאוד, שמח מאוד להיום כאן שוב.
  2. אני רוצה דבר על פיצ'ר חדש שנכנס ב 2016, לפני שניכנס לעובי הקורה בנוגע לפיצ'ר הזה, אדבר קצת בכלליות על הקונספט של מחשוב היברידי. אחר כך נראה איך מגדירים ומפעילים את הפיצ'ר הזה. אחריו ניכנס קצת למימוש הטכני, איך זה עובד, מה זה עושה, מה אפשר ומה אי אפשר וכו'. ואז נדבר קצת על ביצועים וההשפעה של היכולת הזו על ביצועים. ולסיום ננסה להבין האם באמת מדובר בפריצת דרך משמעותית ומטורפת או שכבר יש דברים כאלה. יאללה, נתחיל.
  3. נתחיל בסרטון של סאטיה נדלה מכנס IGNITE ב 2015 שבו הציגו לראשונה את SQL 16. סאטיה מגדיר פה את SQL 16 כפריצת הדרך הגדולה ביותר בהיטוריה של ה DB. בוא נשמע אותו. אז כמו ששמענו, זוהי פריצת הדרך הגדולה ביותר בהיסטוריה של ה DB בגלל שאפשר למתחו טבלה לתוך הענן. נשמע מגניב, אבל בתור בן אדם שמאוהב ב SQL ובמיקרוסופט, מה שאני הולך להגיד עכשיו בא מאהבה, תרשו לי להטיל ספק קטן ולציין שלדעתי הענייה, זו לא כזו פריצת דרך גדולה. בוא נבין על מה מדובר ובסוף נחזור לנושא פריצת הדרך.
  4. מה הקטע ההיברידי הזה? אז הענן זה דבר מגניב ואדיר וקול. אבל אף חברה שמחזיקה תשתיות במיליונים לא ממש רוצה לזרוק את כולן לפח האשפה ולשים את כל הביצים שלה בסל הענן. ולכן אנחנו צריכים שילוב של תשתיות הענן בתשתיות הקיימות שלנו. ולזה הכוונה בהיברידי – תשתיות משולבות – ענן ומקומי. אנחנו רוצים גם את הגמישות של הענן וגם את היכולות של תשתית מקומית.
  5. אז מה זה בעצם STRETCH DB, ננסה להבין מהמשפט הפותח ב BOOKS ONLINE בנושא. מדובר על יכולת לבצע מיגרציה של המידע ההיסטורי שלנו, בצורה שקופה ומאובטחת ל AZURE. ואני אומר שהמשפט הזה מעלה יותר סימני שאלה מאשר נותן תשובות
  6. שאלה ראשונה, זה איך מבוצעת המיגרציה? למי מכם פה יש תהליכים שמבצעים מיגרציה של מידע ממקום אחד לאחר? (אני מניח שלכולם) אני מוכן להתערב שהמימוש אצל כל אחד מכם הוא שונה. אז איך מבוצעת המיגרציה במקרה הזה?
  7. השאלה השניה היא מהו מידע היסטורי? איך מגדירים מידע היסטורי? אצל כל אחד יש הגדרה אחרת למידע ההיסטורי שלו. ואם שורה מסויימת בהתחלה לא היסטורית ואחר כך, כן? איך אני יכול להתאים את עצמי ל DB שכבר מוגדר בצורה מסויימת ולהבטיח שאני עושה מיגרציה רק למידע היסטורי? שאלה מעניינת...
  8. בצורה שקופה – זאת אומרת שאין לי שום שינוי במערכת? שום עומס שנוסף? שום מגבלות חדשות? הרי אנחנו מכירים את המושג הזה בלי שינויים מיכולות אחרת של SQL, ואז פתאום זה READ ONLY ואי אפשר להשתמש ב BLOB ועוד ועוד. אז האם זה באמת שקוף?
  9. וכאן טמונה שאלת הכסף. בענן של מיקרוסופט הידוע בכינויו AZURE יש הרבה מאוד שירותים, איזה שירות בדיוק מאחסן את הנתונים שהעברנו לשם? DWH? SQL? BLOB? TABLE STORAGE? מה? המון שאלות, בוא ננסה לענות עליהן אחת אחת עם משפטים טיפה יותר מורכבים ויותר ברורים מהמשפט השיווקי שלפנינו. אבל מה שכן אפשר ללמוד מהמשפט הזה – זה למי מיועד הסיפור הזה- ארכיונים\ חברות שיש להם מידע ארכיוני רב, שלא רוצים לבזבז את כוח המחשוב המקומי שלהם ואת הסטוראג' המקומי והיקר שלהם על מידע ישן, אבל עם זאת, עדיין רוצים להמשיך לתשאל את המידע ולא לשנות את האפליקציה לצורך כך. הרבה ארגונים משתמשים בענן כפתרון ארכוב, בגלל המחיר והמקום האינסופי.
  10. אז כאן אנחנו מקבלים קצת הסברים, עדיין לא מספיק, אבל מתקרבים: אפשר להעביר מידע חם וקר – זאת אומרת מידע שאנחנו עדיין קוראים ממנו – אבל לא בצורה מרוכזת, זאת אומרת, לא חם, פושר. ומידע קר – כזה שאנחנו כבר לא קוראים. מה שניתן לקחת מהמשפט הזה הוא בעיקר את מה שלא כתוב בו – אנחנו לא עושים מיגרציה למידע חם, כזה שנמצא בשימוש שוטף. החלק השני, מדבר על איפה נשמר המידע- אז כמו שכתוב, אנחנו מחליטים איפה נשמר המידע, שזה די שטות, כי מרחב ההחלטה שלנו הוא מאוד קטן כמו שנלמד תכף, אבל החלק השני של המשפט כבר יותר מדויק – SQL SERVER דואג להעברת המידע "למקום הנבחר", שידוע לנו שהוא איפשהו ב AZURE, מאחורי הקלעים. וכאן חשוב מאוד לציין, שהמידע מועבר בצורה אסינכרונית. זאת אומרת שתהליך שרץ ברקע דואג להעביר את המידע, כמובן שהתהליך תומך במקרה של נפילות לא צפויות באמצע, התאוששות מאסון וכו'. אז עד עכשיו לא נכנסנו לגרנולריות של מיגרציית המידע, אז בשלב זה כבר אפשר להבין שהמיגרציה מופעלת ברמה של טבלה, זאת אומרת, כמו שסטיה אמר בסרטון, אני צריך להגדיר את הפיצ'ר הזה על טבלה. אחרי שהטבלה מוגדרת לעבור מיגרציה, היא תמיד תישאר זמינה וניתנת לתשאול. זאת אומרת, המידע עובר בצורה אסינכרונית ברקע, אבל הוא לא מונע ממני לעשות כל שאילתא כלשהי על הטבלה. השאילתות שאריץ על הטבלה לא יודעות וגם המשתמש לא יודע איפה המידע יושב, בין אם בענן או בטבלה המקומית, זה גם לא משנה, כל שאילתא שאריץ תביא את המידע בין אם הוא יושב בענן או במקומי באופן שקוף ובלי שום חיווי האם הגיע מהענן או מהמקומי. המשפט האחרון פחות או יותר מסכם את זה שלפניו, אחרי שהפעלתי את היכולת הזו על טבלה, אין לי צורך בשום שינוי אפליקטיבי או לשאילתות – המיקום של המידע לא משנה. שאגב, גם זה לא ממש מדוייק ובהמשך נראה למה.
  11. עכשיו אנחנו מתחילים לקבל תשובות לכמה מהשאלות שהיו לנו: קודם כל, התהליך מתחיל לפעול ברגע שהגדרנו לפחות טבלה אחת להעביר. והדבר השני החשוב הוא השירות שאליו מועבר המידע – סופסוף מגלים לנו – SQL AZURE. האם זה טוב או רע? נלמד תכף. הדבר השני החשוב שכתוב פה, והוא משמעותי מאוד, זה התשובה לשאלה מהו מידע היסטורי – כאן כתוב לנו שאנחנו יכולים להעביר טבלה שלמה או שאנחנו יכולים להגדיר איזשהו פילטר שיגדיר לנו איזה מידע להעביר ואיזה לא. זאת אומרת, אמורה להיות לנו שליטה כמעט מלאה על איזה שורות יעברו ואיזה לא.
  12. אז מה בעצם קורה ב DB המקומי כשאני מגדיר אותו להימתח לענן? לפי המאמר המדוייק שציטטתי עד כה, נוצר לנו לינקד סרבר שמגדיר את היעד של תהליך המיגרציה. כאשר מוגדרת טבלה, אנחנו מייצרים אובייקט חדש ב SQL 16 שנקרא External resource. לגבי ה LINKED SERVER – לפחות לפי מה שאני יודע\ הצלחתי למצוא\ להבין – זה שקר מוחלט. לגבי ה EXTRENAL RESOURCE – דווקא צודקים 
  13. אז אחרי שדיברנו על מה זה מידע היסטורי, לאן מועתק המידע ומה קורה ב DB המקומי, נעבור על רשימת המגבלות של טבלאות שלא ניתן לעשות להן מיגרציה. זוכרים את המשפט – שקוף לגמרי לאפליקציה? אז כן, אולי זה שקוף, אחרי שהטבלה שמחליטים לארכב עומדת בתנאים. וגם אז לא ממש, אבל בוא נתמקד במגבלות: כמות עמודות, כמות אינדקסים, סוגי עמודות, רפליקציה, CDC ועוד. מה שמעניין יותר הנמצא בטור הימני – CHECK CONSTRAINTS... DEFAULT CONSTRAINTS... FKs…. כן, לא קלה דרכנו לענן. אכן טבלאות היסטוריה בעלות מאפיינים ספציפיים מאוד.
  14. לסיכום מה שדיברנו עליו עד עכשיו ועוד תוספות קטנות: הטכנולוגיה או השירות בענן שבו משתמשים זה SQL AZURE הטכנולוגיה המקומית היא EXTERNAL RESOURCE יש מגבלות על מבנה הטבלה, המיגרציה מבוצעת באופן אסינכרוני. ניתן לעצור ולהפסיק את התהליך באמצע, ניתן להעתיק את המידע בחזרה וגיבויים נתמכים כחלק מהפתרון באמצעות הגיבויים של SQL AZURE. אבל אחרי שביקרנו את היכולת הזו וצחקנו עליה קצת, היא באמת מעולה, אז בוא נלמד ונראה איך עושים את זה הלכה למעשה.
  15. כמו ששמים לב, כאשר אנו עושים מיגרציה דרך ה UI, ניתן לבחור רק סוג אחד של מיגרציה – של כל הטבלה. מה שהופך את הטבלה מטבלה מתוחה, לטבלה בענן.... אבל החל מ CTP 3.3 אפשר לבצע גם מיגרציה ברמה של שורה. זה היה אפשרי גם ב 3.2 אבל רק עם TRACE FLAG. הפילטור מבוצע באמצעות פונקציה טבלאית שמופעלת על הטבלה. כל שורה שהפונקציה הטבלאית מחזירה עבורה ערך, מועברת ל AZURE. בגלל שמדובר בפונקציה טבלאית שרצה כל פעם שתהליך המיגרציה רץ, זאת אומרת כל הזמן, אם נכתוב פונקציה שביצועיה גרועים, תהליך המיגרציה יספוג פגיעה משמעותית בביצועים. עד כה, נשמע מגניב ועושה רושם שזה ממש מעולה. אני יכול להחליט ברמת השורה מי יועבר לענן ומי לא!
  16. אבל, יש המון מגבלות על הפונקציה הזו. אחת המגבלות העיקריות שלא ניתן להשתמש ברכיבים לא דטרמיניסטיים – זאת אומרת, אי אפשר להשתמש ב GETDATE או פונקציות בסגנון, זאת אומרת, לא ניתן לייצר מדיניות דינמית לגבי איזה שורה עוברת או לא, זה מוגדר מראש. יש עוד כמה מגבלות על הפונקציה הזו ועל איזה שינויים מותר לעשות בה. מה שלי חשוב שתיקחו מכאן שהיכולת היא טובה, אבל, יש לה השפעה על ביצועים, והיא לא דינמית, זאת אומרת מדבר בהגדרה סטטית של קבוצת שורות שעוברת לענן.
  17. את ההדגמה על מיגרציה ברמה שורה, אני אראה בקוד, כי אין דרך אחרת, ועל הדרך אראה גם את הקוד שמבצע את מה שעשינו בשלב הקודם.
  18. Show the database created with the dynamic name, Show tier, Show tier size limitation, Show tier price, Show the table in the database, Show columns, Show indexes, Show the change to the PK
  19. נסכם את מה שראינו עכשיו...
  20. אז זוכרים שאמרתי מקודם, שזה לא בדיוק כזה שקוף לאפליקציה ולא בדיוק נקי מצורך בשינויים? אז הנה זה מגיע... ההגבלות על טבלה מתוחה. אחרי שראינו שיש הגבלות לא מעטות על איזה טבלה אפשר למתוח לענן, אז אחרי שעברנו את זה, יש מגבלות למה שמותר ואפשר לעשות על טבלה מתוחה. הדבר הראשון, הוא שלא ניתן לאכוף PK או UNIQUE, יש למישהו רעיון למה? כמו כן, גם אי אפשר לעדכן שורות ולמחוק, למישהו יש רעיון למה? בוא נראה את זה רגע וננסה להבין את המגבלות האלה...
  21. אז בוא נראה מה הדברים החדשים שלמדנו בינתיים. קודם כל, אנחנו מעבירים לענן גם אחזון וגם מחשוב – הרי SQL AZURE גם נותן לנו כוח עיבוד. איך נעשית העברת העיבוד של שאילתות לשם, תכף נראה. הגבלת גודל – נגזרת מהשירות של SQL AZURE. מחיר – יקר יחסית לפתרון ארכיון שאמור להיות זול. שינויים בטבלה – ישנם בחלק המעונן. רמת המיגרציה – טבלה או שורה על פי פונקצייה יש מגבלה על פעולות שניתן לעשות על הטבלה. יש DMV חדשים אין אכיפה של CONSTRAINTS
  22. אז לפני שנצלול לקוד ונבין מה בדיוק קורה כשרץ תהליך המיגרציה, כמה הגדרות כלליות עליו: התהליך מוודא ששום שורות לא הולכות לאיבוד במקרה של כשלון. זאת אומרת, לא יכול להיות ששורה מסויימת תיעלם לנו פתאום. היא חייבת להופיע או בחלק המקומי או בטבלה בענן. יש למנגנון יכולות של ניסיון מחדש במקרה של בעיות. גם, כמו ששמנו לב, כל הגורמים שעשויים לגרום לתקלות בהכנסה לטבלה המרוחקת נוטרלו – אין UNIQUE, אין CONSTRAINTS. ניתן לעצור את התהליך בכל שלב, גם בסקריפט, ולהמשיך אותו בכל שלב כמובן. אפשר באמצעות ה DMV לראות באיזה מצב התהליך נמצא. כמו כן, ניתן לעשות מיגרציה הפוכה להחזרת הנתונים לטבלה המקומית.
  23. אז בוא נדבר על הביצועים של שאילתות שרצות על הטבלה המתוחה. אז קודם כל, דבר ראשון שאנחנו למדים, זה שכל שאילתא תמיד רצה גם על השרת המקומי וגם על השרת המרוחק, ללא קשר לשאילתא עצמה, לפונקציית המיגרציה או לכמות הנתונים בכל אחד מהצדדים. זה לכשעצמו מעלה שאלות חשובות לגבי הביצועים של הפיצ'ר הזה. איך נראה החלק של השאילתא על הטבלה המרוחקת ב EXEC PLAN? אופרטור שנקרא REMOTE QUERY, שאתם אולי מכירים ממקומות אחרים ב SQL כמו LINKED SERVER, FULL TEXT בחלק מהגרסאות ועוד.
  24. מה שאותי הכי מצחיק או מעציב, זה המשפט שאתם רואים מולכם. העתקתי אותו מה BOL ושם הם כותבים במפורש – שאילתות על טבלה נמתחת ירוצו בביצועיפ נמוכים יותר מאשר אם הטבלה לא הייתה מתוחה. אז למה לכל הרוחות בכל המקומות האחרים כתבתם שאין ולא צריך שום שינויים באפליקציה? למה כתבתם שהכל יקרה מאחורי הקלעים כאילו כלום?? אבל חכו, החלק השני של המשפט אפילו יותר טוב: הם כותבים שאם יש בעיית ביצועים יכולות להיות כמה סיבות: 1 – מיקום גיאוגרפי, עד כה, סביר והגיוני בהחלט וזו הסיבה היחידה שאני מוכן לקבל. 2- אם אתם חווים בעיות, אולי הבעיה היא ב TIER שלכם, זאת אומרת, אם הגדרתםטבלה להימתח וזו טבלה שמריצים עליה הרבה שאילתות, פתחו את הארנק, תשלמו יותר כדי לקבל ביצועים סבירים אך עדיין פחות טובים מבעבר. הזוי. אני הולך להראות לכם עכשיו את הסיבות האמיתיות לזה שהביצועים של השאילתות על טבלה מתוחה פחות טובים, וזה ממש לא אף אחד מהדברים שרשומים פה
  25. A simple query on an existing index A query on a column without index
  26. בססי נתונים היברידי זה בעצם בסיס נתונים שיושב גם על תשתיות ענן וגם על תשתיות מקומיות. איך זה יכול להיות? יכול! מה הכוונה- לכל בסיס נתונים יש שני קבצים או יותר, אנחנו יכולי החל מ 2014 לשים כל קובץ שהוא על הענן. כדי לעשות את זה אנחנו צריכים ליצור CREDENTIALS מתאימים על השרת שלנו שיהיו להם הרשאות לגשת ל AZURE STORAGE ACCOUNT ואז, בסינטקס פשוט ומוכר פשוט ממקמים את הקבצים שלנו על כתובת URL
  27. Same queries, same data placement, different results…