SlideShare a Scribd company logo
1 of 76
PHISSUG Sessions
Season 1, Episode 6: SQL Server in the Cloud
Argelo Royce P. Bautista
 4 years in the it industry
 Full-stack developer
 Enjoys creating reports (SSRS, excel, & power query)
 Enjoys exploring Microsoft technologies
 Enjoys learning and knowledge sharing with the tech community
Hybrid Will Be the Most Common Use of
the Cloud
 Gartner Says By 2020, a Corporate "No-Cloud" Policy Will Be as Rare as a "No-
Internet" Policy Is Today
 By 2019, more than 30 percent of the 100 largest vendors' new software
investments will have shifted from cloud-first to cloud-only.
 By 2020, more compute power will have been sold by IaaS and PaaS cloud
providers than sold and deployed into enterprise data centers.
 The Infrastructure as a Service (IaaS) market has been growing more than 40 percent in
revenue per year since 2011, and it is projected to continue to grow more than 25
percent per year through 2019.
 By 2019, the majority of virtual machines (VMs) will be delivered by IaaS providers. By
2020, the revenue for compute IaaS and Platform as a Service (PaaS) will exceed $55
billion — and likely pass the revenue for servers.
 Reference: http://www.gartner.com/newsroom/id/3354117
“
”
Stretch feature of SQL Server
2016
A new way to archive your data.
Disclaimer:
Majority of the parts of the presentation were taken from Joe Yong’s presentation of Stretch Db and
Microsoft Introduction of SQL Server 2016’s new features at the Microsoft Ignite 2015
The videos of StretchDb and AlwaysEncrypted were taken from Microsoft’s New SQL. No Equal Series @
https://channel9.msdn.com
Agenda
1. Introduction
2. Use cases
3. Enabling Stretch on Database
4. Stretching the Table
5. Disable stretching
6. migrate data that satisfies condition
7. Use function to migrate data that
satisfy condition
8. Show Trickling and spaces used
9. Migrating child rows from related
tables
10. Querying the stretch table
11. Querying related stretched tables
12. Backup and Restore
13. Enable always encrypted
14. Stretching temporal tables
15. Pricing
Capability
Stretch large operational tables
from on-premises to Azure with
the ability to query
Benefits
BI integration
for on-premises
and cloud
Cold/closed data
Orders
In-memory
OLTP table
Hot/active data
Order history
Stretched table
Trickle data movement and
remote query processing
On-premises Azure
Stretch SQL Server into Azure
Securely stretch cold tables to Azure with remote query processing
Databases today
Business users and decision makers
 Want or need to retain cold data for many
years (indefinitely)
 Cold data must be online
 SAN consumption increasing
faster than IT budgets
 Want to access cold data
from same application
Database administrators
 Uncontrollable growth in size and sprawl
 Operations windows exceeding SLA
(index, backup/restore)
 Frequent storage acquisition and
provisioning
 Users can’t/won’t say what data can be
deleted
TCO
PerfData access
Cost
Performance
■ Current Solutions
Admin
overhead
Keep, keep,
keep! Cut, cut,
cut!
???
!#$^*
Business owners,
end-users, …
Storage admins,
budget owners, …
DBA
StretchDB considerations
No change to access controls, DBA processes,
applications, tools, operationsGoals
 Cold data always online
 Significantly lower storage TCO
 Access cold data with existing
applications
 Easier performance and index
maintenance
 Faster backup/restore
 Automatically managed and
protected cold data
Tradeoffs
 Moderate performance reduction
for cold data access
 Update and delete on cold data is
an administrative function
 Some functional limitations
TCO
PerfData access
■ Stretch Database ■ Current Solutions
Cost
PerformanceAdmin
overhead
StretchDB – enabling
AzureOn-premises
On-
premises
SQL Server
instanceOn-premises
application(s)
DB in SAN/Local
Storage
Ord_Detail
Storage
Ord_detail_
archive
table
Txn_detail
Hot +
cold
rows
Compute
StretchDB – enabling
StretchDB – Enabling
StretchDB – Enabling
StretchDB – Enabling
StretchDB – Enabling
StretchDB – Enabling
StretchDB – Enabling
StretchDB – Enabling
StretchDB – Enabling
StretchDB – Enabling
StretchDB – Enabling (Table)
StretchDB – Enabling (Table)
StretchDB – Enabling (Table)
StretchDB – Enabling (Table)
StretchDB – Enabling (Table)
Enabling tables and specifying criteria for
cold data (Filter via GUI)
Enabling tables and specifying criteria for
cold data (Filter via GUI)
Enabling tables and specifying criteria for cold
data (Filter via TSQL using Function)
StretchDB – data movement
Azure
On-
premises
SQL Server
instanceOn-premises
application(s)
DB in SAN/Local
Storage
Ord_Detail
Storage
Ord_detail
_archive
table
Trickle data migration
Ord_detail_
archive
table
Txn_detail
Txn_detail
(cold rows
only)
Hot +
cold rows
in same
table
Compute
Entire
archive table
moved
Only cold
rows moved
On-premises
StretchDB – Data Movement
StretchDB – Data Movement
StretchDB – Data Movement
StretchDB – Data Movement
StretchDB – Data Movement
StretchDB – Data Movement
StretchDB – Data Movement
Before After
StretchDB – smart query processing
Azure
On-
premises
SQL Server
instanceOn-premises
application(s)
DB in SAN/Local
Storage
Ord_Detail
Storage
Ord_detail
_archive
table
Ord_detail_
archive
table
Txn_detail
Txn_detail
(cold rows
only)
Transparent remote
data access
Hot +
cold rows
in same
table
Compute
Local data
only queries
Local + remote
data queries
Trickle data migration
On-premises
StretchDB – Smart Query Processing
StretchDB – Smart Query Processing
Parent-Child Relationship (Child is a
Stretched Table)
Parent-Child Relationship (Child is a
Stretched Table)
Parent-Child Relationship (Child is a
Stretched Table)
StretchDB – backup & restore
Azure
On-
premises
SQL Server
instanceOn-premises
application(s)
DB in SAN/Local
Storage
Ord_detail
Storage
Ord_detail
_archive
table
Txn_detail
Txn_detail
(cold rows
only)
Compute
Regular backup
& restore
Table 2Table 1
Table 1’
Shallow backup
& restore
Table 2Table 1 Table 2
Table 1’
On-premises
Backup (no Stretch)
Backup (With Stretch)
Backup Space Consumption Difference
Restore (No Stretch)
Restore (With Stretch)
StretchDB – automatic scaling
Azure
On-
premises
SQL Server
instanceOn-premises
application(s)
DB in SAN/Local
Storage
Ord_detail
Storage
Shard 1
Ord_detail
_archive
table
Txn_detail
Txn_detail
(cold rows
only)
Compute
Storage
Shard 2
Ord_detail_a
rchive
table
Txn_detail
(cold rows
only)
Transparent scaleout
On-premises
You can scale your service by adjusting the
DSU
SELECT * FROM Department
FOR SYSTEM_TIME
AS OF '2010.01.01' Facts:
1. History is much bigger than actual data
2. Retained between 3 and 10 years
3. “Warm”: up to a few weeks/months
4. “Cold”: rarely queried
Solution:
History as a stretch table:
PeriodEnd < “Now - 6 months”
Azure SQL Database
Stretching Encrypted Tables
Stretching Encrypted Tables
Stretching Encrypted Tables
Stretching Encrypted Tables
Stretching Encrypted Tables
Stretching Encrypted Tables
Stretching Encrypted Tables
Stretching Encrypted Tables
Stretching Encrypted Tables
Stretching Encrypted Tables
Stretching Encrypted Tables
Pricing (via azure price calculator)
Pausing Stretch Database
Pausing Stretch Database
Disabling Stretch Database
Disabling Stretch Database
Disabling Stretch Database
Disabling Stretch Database
Disabling Stretch Database
Disabling Stretch Database
“
”
Questions?
Ask and you may or may not be answered.
The presentation will be uploaded on Docs.com
Join us @ https://www.facebook.com/groups/phissug
Majority of the parts of the presentation were taken from Joe Yong’s presentation of
Stretch Db and Microsoft Introduction of SQL Server 2016’s new features at the
Microsoft Ignite 2015
The videos of StretchDb and AlwaysEncrypted were taken from Microsoft’s New SQL.
No Equal Series @ https://channel9.msdn.com
References
 Stretch Database: https://msdn.microsoft.com/en-us/library/dn935011.aspx
 Stretching On-Premises Databases to the Cloud:
https://channel9.msdn.com/events/Ignite/2015/BRK2574
 SQL Server Stretch DB: https://channel9.msdn.com/Shows/Data-Exposed/SQL-Server-
Stretch-DB
 Stretch Database Securely and transparently leverage infinite storage and compute
capacity in Azure with SQL Server 2016:
https://channel9.msdn.com/events/DataDriven/SQLServer2016/StretchDatabase
 Microsoft SQL Server 2016, Stretch Database:
https://channel9.msdn.com/events/DataDriven/New-SQL-No-Equal/Microsoft-SQL-
Server-2016-Stretch-Database
 Introduction to Stretch Database: http://sqlperformance.com/2015/08/sql-server-
2016/intro-stretch-database
References
 Stretch Database Pricing: http://sqlinthewild.co.za/index.php/2016/04/19/sql-2016-
features-stretch-database/
 Stretch Database Pricing2: http://www.sqlservercentral.com/articles/Editorial/142696/
 Stretch Database Pricing2 Discussion:
http://www.sqlservercentral.com/Forums/Topic1794699-263-1.aspx
 MS Pricing Stretch Database: https://azure.microsoft.com/en-us/pricing/details/sql-
server-stretch-database/
 MS Pricing Storage: https://azure.microsoft.com/en-us/pricing/details/storage/
 Stretch Database Pros and Cons: http://kevin3nf.blogspot.com/2016/06/sql-server-
2016-stretch-database.html

More Related Content

What's hot

Databricks for Dummies
Databricks for DummiesDatabricks for Dummies
Databricks for DummiesRodney Joyce
 
Managing and Deploying High Performance Computing Clusters using Windows HPC ...
Managing and Deploying High Performance Computing Clusters using Windows HPC ...Managing and Deploying High Performance Computing Clusters using Windows HPC ...
Managing and Deploying High Performance Computing Clusters using Windows HPC ...Saptak Sen
 
Agile Data Science 2.0: Using Spark with MongoDB
Agile Data Science 2.0: Using Spark with MongoDBAgile Data Science 2.0: Using Spark with MongoDB
Agile Data Science 2.0: Using Spark with MongoDBRussell Jurney
 
What's Next for Google's BigTable
What's Next for Google's BigTableWhat's Next for Google's BigTable
What's Next for Google's BigTableSqrrl
 
Spark with Azure HDInsight - Tampa Bay Data Science - Adnan Masood, PhD
Spark with Azure HDInsight  - Tampa Bay Data Science - Adnan Masood, PhDSpark with Azure HDInsight  - Tampa Bay Data Science - Adnan Masood, PhD
Spark with Azure HDInsight - Tampa Bay Data Science - Adnan Masood, PhDAdnan Masood
 
Transforming and Scaling Large Scale Data Analytics: Moving to a Cloud-based ...
Transforming and Scaling Large Scale Data Analytics: Moving to a Cloud-based ...Transforming and Scaling Large Scale Data Analytics: Moving to a Cloud-based ...
Transforming and Scaling Large Scale Data Analytics: Moving to a Cloud-based ...DataWorks Summit
 
DataEngConf: Parquet at Datadog: Fast, Efficient, Portable Storage for Big Data
DataEngConf: Parquet at Datadog: Fast, Efficient, Portable Storage for Big DataDataEngConf: Parquet at Datadog: Fast, Efficient, Portable Storage for Big Data
DataEngConf: Parquet at Datadog: Fast, Efficient, Portable Storage for Big DataHakka Labs
 
Managed Cluster Services
Managed Cluster ServicesManaged Cluster Services
Managed Cluster ServicesAdam Doyle
 
Getting Started with Splunk Enterprises
Getting Started with Splunk EnterprisesGetting Started with Splunk Enterprises
Getting Started with Splunk EnterprisesSplunk
 
Spark with Delta Lake
Spark with Delta LakeSpark with Delta Lake
Spark with Delta LakeKnoldus Inc.
 
Adam Fuchs' Accumulo Talk at NoSQL Now! 2013
Adam Fuchs' Accumulo Talk at NoSQL Now! 2013Adam Fuchs' Accumulo Talk at NoSQL Now! 2013
Adam Fuchs' Accumulo Talk at NoSQL Now! 2013Sqrrl
 
Big data-at-detik
Big data-at-detikBig data-at-detik
Big data-at-detikk4ndar
 
Data Science lifecycle with Apache Zeppelin and Spark by Moonsoo Lee
Data Science lifecycle with Apache Zeppelin and Spark by Moonsoo LeeData Science lifecycle with Apache Zeppelin and Spark by Moonsoo Lee
Data Science lifecycle with Apache Zeppelin and Spark by Moonsoo LeeSpark Summit
 
Jump Start on Apache Spark 2.2 with Databricks
Jump Start on Apache Spark 2.2 with DatabricksJump Start on Apache Spark 2.2 with Databricks
Jump Start on Apache Spark 2.2 with DatabricksAnyscale
 
Enabling Next Gen Analytics with Azure Data Lake and StreamSets
Enabling Next Gen Analytics with Azure Data Lake and StreamSetsEnabling Next Gen Analytics with Azure Data Lake and StreamSets
Enabling Next Gen Analytics with Azure Data Lake and StreamSetsStreamsets Inc.
 
Big Data in the Real World
Big Data in the Real WorldBig Data in the Real World
Big Data in the Real WorldMark Kromer
 
Architecture in action 01
Architecture in action 01Architecture in action 01
Architecture in action 01Krishna Sankar
 
Using Spark and Riak for IoT Apps—Patterns and Anti-Patterns: Spark Summit Ea...
Using Spark and Riak for IoT Apps—Patterns and Anti-Patterns: Spark Summit Ea...Using Spark and Riak for IoT Apps—Patterns and Anti-Patterns: Spark Summit Ea...
Using Spark and Riak for IoT Apps—Patterns and Anti-Patterns: Spark Summit Ea...Spark Summit
 
Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...
Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...
Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...Big Data Spain
 
Redash: Open Source SQL Analytics on Data Lakes
Redash: Open Source SQL Analytics on Data LakesRedash: Open Source SQL Analytics on Data Lakes
Redash: Open Source SQL Analytics on Data LakesDatabricks
 

What's hot (20)

Databricks for Dummies
Databricks for DummiesDatabricks for Dummies
Databricks for Dummies
 
Managing and Deploying High Performance Computing Clusters using Windows HPC ...
Managing and Deploying High Performance Computing Clusters using Windows HPC ...Managing and Deploying High Performance Computing Clusters using Windows HPC ...
Managing and Deploying High Performance Computing Clusters using Windows HPC ...
 
Agile Data Science 2.0: Using Spark with MongoDB
Agile Data Science 2.0: Using Spark with MongoDBAgile Data Science 2.0: Using Spark with MongoDB
Agile Data Science 2.0: Using Spark with MongoDB
 
What's Next for Google's BigTable
What's Next for Google's BigTableWhat's Next for Google's BigTable
What's Next for Google's BigTable
 
Spark with Azure HDInsight - Tampa Bay Data Science - Adnan Masood, PhD
Spark with Azure HDInsight  - Tampa Bay Data Science - Adnan Masood, PhDSpark with Azure HDInsight  - Tampa Bay Data Science - Adnan Masood, PhD
Spark with Azure HDInsight - Tampa Bay Data Science - Adnan Masood, PhD
 
Transforming and Scaling Large Scale Data Analytics: Moving to a Cloud-based ...
Transforming and Scaling Large Scale Data Analytics: Moving to a Cloud-based ...Transforming and Scaling Large Scale Data Analytics: Moving to a Cloud-based ...
Transforming and Scaling Large Scale Data Analytics: Moving to a Cloud-based ...
 
DataEngConf: Parquet at Datadog: Fast, Efficient, Portable Storage for Big Data
DataEngConf: Parquet at Datadog: Fast, Efficient, Portable Storage for Big DataDataEngConf: Parquet at Datadog: Fast, Efficient, Portable Storage for Big Data
DataEngConf: Parquet at Datadog: Fast, Efficient, Portable Storage for Big Data
 
Managed Cluster Services
Managed Cluster ServicesManaged Cluster Services
Managed Cluster Services
 
Getting Started with Splunk Enterprises
Getting Started with Splunk EnterprisesGetting Started with Splunk Enterprises
Getting Started with Splunk Enterprises
 
Spark with Delta Lake
Spark with Delta LakeSpark with Delta Lake
Spark with Delta Lake
 
Adam Fuchs' Accumulo Talk at NoSQL Now! 2013
Adam Fuchs' Accumulo Talk at NoSQL Now! 2013Adam Fuchs' Accumulo Talk at NoSQL Now! 2013
Adam Fuchs' Accumulo Talk at NoSQL Now! 2013
 
Big data-at-detik
Big data-at-detikBig data-at-detik
Big data-at-detik
 
Data Science lifecycle with Apache Zeppelin and Spark by Moonsoo Lee
Data Science lifecycle with Apache Zeppelin and Spark by Moonsoo LeeData Science lifecycle with Apache Zeppelin and Spark by Moonsoo Lee
Data Science lifecycle with Apache Zeppelin and Spark by Moonsoo Lee
 
Jump Start on Apache Spark 2.2 with Databricks
Jump Start on Apache Spark 2.2 with DatabricksJump Start on Apache Spark 2.2 with Databricks
Jump Start on Apache Spark 2.2 with Databricks
 
Enabling Next Gen Analytics with Azure Data Lake and StreamSets
Enabling Next Gen Analytics with Azure Data Lake and StreamSetsEnabling Next Gen Analytics with Azure Data Lake and StreamSets
Enabling Next Gen Analytics with Azure Data Lake and StreamSets
 
Big Data in the Real World
Big Data in the Real WorldBig Data in the Real World
Big Data in the Real World
 
Architecture in action 01
Architecture in action 01Architecture in action 01
Architecture in action 01
 
Using Spark and Riak for IoT Apps—Patterns and Anti-Patterns: Spark Summit Ea...
Using Spark and Riak for IoT Apps—Patterns and Anti-Patterns: Spark Summit Ea...Using Spark and Riak for IoT Apps—Patterns and Anti-Patterns: Spark Summit Ea...
Using Spark and Riak for IoT Apps—Patterns and Anti-Patterns: Spark Summit Ea...
 
Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...
Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...
Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...
 
Redash: Open Source SQL Analytics on Data Lakes
Redash: Open Source SQL Analytics on Data LakesRedash: Open Source SQL Analytics on Data Lakes
Redash: Open Source SQL Analytics on Data Lakes
 

Similar to Phissug s01 ep6, stretch database

Alluxio Data Orchestration Platform for the Cloud
Alluxio Data Orchestration Platform for the CloudAlluxio Data Orchestration Platform for the Cloud
Alluxio Data Orchestration Platform for the CloudShubham Tagra
 
20150704 benchmark and user experience in sahara weiting
20150704 benchmark and user experience in sahara weiting20150704 benchmark and user experience in sahara weiting
20150704 benchmark and user experience in sahara weitingWei Ting Chen
 
Streaming Real-time Data to Azure Data Lake Storage Gen 2
Streaming Real-time Data to Azure Data Lake Storage Gen 2Streaming Real-time Data to Azure Data Lake Storage Gen 2
Streaming Real-time Data to Azure Data Lake Storage Gen 2Carole Gunst
 
Windows Azure: Lessons From The Field
Windows Azure: Lessons From The FieldWindows Azure: Lessons From The Field
Windows Azure: Lessons From The FieldRob Gillen
 
How the Development Bank of Singapore solves on-prem compute capacity challen...
How the Development Bank of Singapore solves on-prem compute capacity challen...How the Development Bank of Singapore solves on-prem compute capacity challen...
How the Development Bank of Singapore solves on-prem compute capacity challen...Alluxio, Inc.
 
20150314 sahara intro and the future plan for open stack meetup
20150314 sahara intro and the future plan for open stack meetup20150314 sahara intro and the future plan for open stack meetup
20150314 sahara intro and the future plan for open stack meetupWei Ting Chen
 
Exploring Microsoft Azure Infrastructures
Exploring Microsoft Azure InfrastructuresExploring Microsoft Azure Infrastructures
Exploring Microsoft Azure InfrastructuresCCG
 
Customer migration to Azure SQL database, December 2019
Customer migration to Azure SQL database, December 2019Customer migration to Azure SQL database, December 2019
Customer migration to Azure SQL database, December 2019George Walters
 
Data relay introduction to big data clusters
Data relay introduction to big data clustersData relay introduction to big data clusters
Data relay introduction to big data clustersChris Adkin
 
Accelerating analytics in the cloud with the Starburst Presto + Alluxio stack
Accelerating analytics in the cloud with the Starburst Presto + Alluxio stackAccelerating analytics in the cloud with the Starburst Presto + Alluxio stack
Accelerating analytics in the cloud with the Starburst Presto + Alluxio stackAlluxio, Inc.
 
What it takes to run Hadoop at Scale: Yahoo! Perspectives
What it takes to run Hadoop at Scale: Yahoo! PerspectivesWhat it takes to run Hadoop at Scale: Yahoo! Perspectives
What it takes to run Hadoop at Scale: Yahoo! PerspectivesDataWorks Summit
 
Azure Days 2019: Grösser und Komplexer ist nicht immer besser (Meinrad Weiss)
Azure Days 2019: Grösser und Komplexer ist nicht immer besser (Meinrad Weiss)Azure Days 2019: Grösser und Komplexer ist nicht immer besser (Meinrad Weiss)
Azure Days 2019: Grösser und Komplexer ist nicht immer besser (Meinrad Weiss)Trivadis
 
Enabling big data & AI workloads on the object store at DBS
Enabling big data & AI workloads on the object store at DBS Enabling big data & AI workloads on the object store at DBS
Enabling big data & AI workloads on the object store at DBS Alluxio, Inc.
 
Hadoop Summit San Jose 2015: What it Takes to Run Hadoop at Scale Yahoo Persp...
Hadoop Summit San Jose 2015: What it Takes to Run Hadoop at Scale Yahoo Persp...Hadoop Summit San Jose 2015: What it Takes to Run Hadoop at Scale Yahoo Persp...
Hadoop Summit San Jose 2015: What it Takes to Run Hadoop at Scale Yahoo Persp...Sumeet Singh
 
Accelerate Spark Workloads on S3
Accelerate Spark Workloads on S3Accelerate Spark Workloads on S3
Accelerate Spark Workloads on S3Alluxio, Inc.
 
Delivering Data Democratization in the Cloud with Snowflake
Delivering Data Democratization in the Cloud with SnowflakeDelivering Data Democratization in the Cloud with Snowflake
Delivering Data Democratization in the Cloud with SnowflakeKent Graziano
 
Prague data management meetup 2018-03-27
Prague data management meetup 2018-03-27Prague data management meetup 2018-03-27
Prague data management meetup 2018-03-27Martin Bém
 
Modernizing Global Shared Data Analytics Platform and our Alluxio Journey
Modernizing Global Shared Data Analytics Platform and our Alluxio JourneyModernizing Global Shared Data Analytics Platform and our Alluxio Journey
Modernizing Global Shared Data Analytics Platform and our Alluxio JourneyAlluxio, Inc.
 
10 Reasons Snowflake Is Great for Analytics
10 Reasons Snowflake Is Great for Analytics10 Reasons Snowflake Is Great for Analytics
10 Reasons Snowflake Is Great for AnalyticsSenturus
 

Similar to Phissug s01 ep6, stretch database (20)

Alluxio Data Orchestration Platform for the Cloud
Alluxio Data Orchestration Platform for the CloudAlluxio Data Orchestration Platform for the Cloud
Alluxio Data Orchestration Platform for the Cloud
 
20150704 benchmark and user experience in sahara weiting
20150704 benchmark and user experience in sahara weiting20150704 benchmark and user experience in sahara weiting
20150704 benchmark and user experience in sahara weiting
 
Streaming Real-time Data to Azure Data Lake Storage Gen 2
Streaming Real-time Data to Azure Data Lake Storage Gen 2Streaming Real-time Data to Azure Data Lake Storage Gen 2
Streaming Real-time Data to Azure Data Lake Storage Gen 2
 
Windows Azure: Lessons From The Field
Windows Azure: Lessons From The FieldWindows Azure: Lessons From The Field
Windows Azure: Lessons From The Field
 
How the Development Bank of Singapore solves on-prem compute capacity challen...
How the Development Bank of Singapore solves on-prem compute capacity challen...How the Development Bank of Singapore solves on-prem compute capacity challen...
How the Development Bank of Singapore solves on-prem compute capacity challen...
 
20150314 sahara intro and the future plan for open stack meetup
20150314 sahara intro and the future plan for open stack meetup20150314 sahara intro and the future plan for open stack meetup
20150314 sahara intro and the future plan for open stack meetup
 
Exploring Microsoft Azure Infrastructures
Exploring Microsoft Azure InfrastructuresExploring Microsoft Azure Infrastructures
Exploring Microsoft Azure Infrastructures
 
Optimiser votre infrastructure SQL Server avec Azure
Optimiser votre infrastructure SQL Server avec AzureOptimiser votre infrastructure SQL Server avec Azure
Optimiser votre infrastructure SQL Server avec Azure
 
Customer migration to Azure SQL database, December 2019
Customer migration to Azure SQL database, December 2019Customer migration to Azure SQL database, December 2019
Customer migration to Azure SQL database, December 2019
 
Data relay introduction to big data clusters
Data relay introduction to big data clustersData relay introduction to big data clusters
Data relay introduction to big data clusters
 
Accelerating analytics in the cloud with the Starburst Presto + Alluxio stack
Accelerating analytics in the cloud with the Starburst Presto + Alluxio stackAccelerating analytics in the cloud with the Starburst Presto + Alluxio stack
Accelerating analytics in the cloud with the Starburst Presto + Alluxio stack
 
What it takes to run Hadoop at Scale: Yahoo! Perspectives
What it takes to run Hadoop at Scale: Yahoo! PerspectivesWhat it takes to run Hadoop at Scale: Yahoo! Perspectives
What it takes to run Hadoop at Scale: Yahoo! Perspectives
 
Azure Days 2019: Grösser und Komplexer ist nicht immer besser (Meinrad Weiss)
Azure Days 2019: Grösser und Komplexer ist nicht immer besser (Meinrad Weiss)Azure Days 2019: Grösser und Komplexer ist nicht immer besser (Meinrad Weiss)
Azure Days 2019: Grösser und Komplexer ist nicht immer besser (Meinrad Weiss)
 
Enabling big data & AI workloads on the object store at DBS
Enabling big data & AI workloads on the object store at DBS Enabling big data & AI workloads on the object store at DBS
Enabling big data & AI workloads on the object store at DBS
 
Hadoop Summit San Jose 2015: What it Takes to Run Hadoop at Scale Yahoo Persp...
Hadoop Summit San Jose 2015: What it Takes to Run Hadoop at Scale Yahoo Persp...Hadoop Summit San Jose 2015: What it Takes to Run Hadoop at Scale Yahoo Persp...
Hadoop Summit San Jose 2015: What it Takes to Run Hadoop at Scale Yahoo Persp...
 
Accelerate Spark Workloads on S3
Accelerate Spark Workloads on S3Accelerate Spark Workloads on S3
Accelerate Spark Workloads on S3
 
Delivering Data Democratization in the Cloud with Snowflake
Delivering Data Democratization in the Cloud with SnowflakeDelivering Data Democratization in the Cloud with Snowflake
Delivering Data Democratization in the Cloud with Snowflake
 
Prague data management meetup 2018-03-27
Prague data management meetup 2018-03-27Prague data management meetup 2018-03-27
Prague data management meetup 2018-03-27
 
Modernizing Global Shared Data Analytics Platform and our Alluxio Journey
Modernizing Global Shared Data Analytics Platform and our Alluxio JourneyModernizing Global Shared Data Analytics Platform and our Alluxio Journey
Modernizing Global Shared Data Analytics Platform and our Alluxio Journey
 
10 Reasons Snowflake Is Great for Analytics
10 Reasons Snowflake Is Great for Analytics10 Reasons Snowflake Is Great for Analytics
10 Reasons Snowflake Is Great for Analytics
 

Recently uploaded

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
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
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 

Recently uploaded (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
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
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 

Phissug s01 ep6, stretch database

  • 1. PHISSUG Sessions Season 1, Episode 6: SQL Server in the Cloud
  • 2. Argelo Royce P. Bautista  4 years in the it industry  Full-stack developer  Enjoys creating reports (SSRS, excel, & power query)  Enjoys exploring Microsoft technologies  Enjoys learning and knowledge sharing with the tech community
  • 3. Hybrid Will Be the Most Common Use of the Cloud  Gartner Says By 2020, a Corporate "No-Cloud" Policy Will Be as Rare as a "No- Internet" Policy Is Today  By 2019, more than 30 percent of the 100 largest vendors' new software investments will have shifted from cloud-first to cloud-only.  By 2020, more compute power will have been sold by IaaS and PaaS cloud providers than sold and deployed into enterprise data centers.  The Infrastructure as a Service (IaaS) market has been growing more than 40 percent in revenue per year since 2011, and it is projected to continue to grow more than 25 percent per year through 2019.  By 2019, the majority of virtual machines (VMs) will be delivered by IaaS providers. By 2020, the revenue for compute IaaS and Platform as a Service (PaaS) will exceed $55 billion — and likely pass the revenue for servers.  Reference: http://www.gartner.com/newsroom/id/3354117
  • 4. “ ” Stretch feature of SQL Server 2016 A new way to archive your data. Disclaimer: Majority of the parts of the presentation were taken from Joe Yong’s presentation of Stretch Db and Microsoft Introduction of SQL Server 2016’s new features at the Microsoft Ignite 2015 The videos of StretchDb and AlwaysEncrypted were taken from Microsoft’s New SQL. No Equal Series @ https://channel9.msdn.com
  • 5. Agenda 1. Introduction 2. Use cases 3. Enabling Stretch on Database 4. Stretching the Table 5. Disable stretching 6. migrate data that satisfies condition 7. Use function to migrate data that satisfy condition 8. Show Trickling and spaces used 9. Migrating child rows from related tables 10. Querying the stretch table 11. Querying related stretched tables 12. Backup and Restore 13. Enable always encrypted 14. Stretching temporal tables 15. Pricing
  • 6.
  • 7. Capability Stretch large operational tables from on-premises to Azure with the ability to query Benefits BI integration for on-premises and cloud Cold/closed data Orders In-memory OLTP table Hot/active data Order history Stretched table Trickle data movement and remote query processing On-premises Azure Stretch SQL Server into Azure Securely stretch cold tables to Azure with remote query processing
  • 8. Databases today Business users and decision makers  Want or need to retain cold data for many years (indefinitely)  Cold data must be online  SAN consumption increasing faster than IT budgets  Want to access cold data from same application Database administrators  Uncontrollable growth in size and sprawl  Operations windows exceeding SLA (index, backup/restore)  Frequent storage acquisition and provisioning  Users can’t/won’t say what data can be deleted TCO PerfData access Cost Performance ■ Current Solutions Admin overhead
  • 9. Keep, keep, keep! Cut, cut, cut! ??? !#$^* Business owners, end-users, … Storage admins, budget owners, … DBA
  • 10. StretchDB considerations No change to access controls, DBA processes, applications, tools, operationsGoals  Cold data always online  Significantly lower storage TCO  Access cold data with existing applications  Easier performance and index maintenance  Faster backup/restore  Automatically managed and protected cold data Tradeoffs  Moderate performance reduction for cold data access  Update and delete on cold data is an administrative function  Some functional limitations TCO PerfData access ■ Stretch Database ■ Current Solutions Cost PerformanceAdmin overhead
  • 11. StretchDB – enabling AzureOn-premises On- premises SQL Server instanceOn-premises application(s) DB in SAN/Local Storage Ord_Detail Storage Ord_detail_ archive table Txn_detail Hot + cold rows Compute
  • 27. Enabling tables and specifying criteria for cold data (Filter via GUI)
  • 28. Enabling tables and specifying criteria for cold data (Filter via GUI)
  • 29. Enabling tables and specifying criteria for cold data (Filter via TSQL using Function)
  • 30. StretchDB – data movement Azure On- premises SQL Server instanceOn-premises application(s) DB in SAN/Local Storage Ord_Detail Storage Ord_detail _archive table Trickle data migration Ord_detail_ archive table Txn_detail Txn_detail (cold rows only) Hot + cold rows in same table Compute Entire archive table moved Only cold rows moved On-premises
  • 31. StretchDB – Data Movement
  • 32. StretchDB – Data Movement
  • 33. StretchDB – Data Movement
  • 34. StretchDB – Data Movement
  • 35. StretchDB – Data Movement
  • 36. StretchDB – Data Movement
  • 37. StretchDB – Data Movement Before After
  • 38. StretchDB – smart query processing Azure On- premises SQL Server instanceOn-premises application(s) DB in SAN/Local Storage Ord_Detail Storage Ord_detail _archive table Ord_detail_ archive table Txn_detail Txn_detail (cold rows only) Transparent remote data access Hot + cold rows in same table Compute Local data only queries Local + remote data queries Trickle data migration On-premises
  • 39. StretchDB – Smart Query Processing
  • 40. StretchDB – Smart Query Processing
  • 41. Parent-Child Relationship (Child is a Stretched Table)
  • 42. Parent-Child Relationship (Child is a Stretched Table)
  • 43. Parent-Child Relationship (Child is a Stretched Table)
  • 44. StretchDB – backup & restore Azure On- premises SQL Server instanceOn-premises application(s) DB in SAN/Local Storage Ord_detail Storage Ord_detail _archive table Txn_detail Txn_detail (cold rows only) Compute Regular backup & restore Table 2Table 1 Table 1’ Shallow backup & restore Table 2Table 1 Table 2 Table 1’ On-premises
  • 50. StretchDB – automatic scaling Azure On- premises SQL Server instanceOn-premises application(s) DB in SAN/Local Storage Ord_detail Storage Shard 1 Ord_detail _archive table Txn_detail Txn_detail (cold rows only) Compute Storage Shard 2 Ord_detail_a rchive table Txn_detail (cold rows only) Transparent scaleout On-premises
  • 51. You can scale your service by adjusting the DSU
  • 52. SELECT * FROM Department FOR SYSTEM_TIME AS OF '2010.01.01' Facts: 1. History is much bigger than actual data 2. Retained between 3 and 10 years 3. “Warm”: up to a few weeks/months 4. “Cold”: rarely queried Solution: History as a stretch table: PeriodEnd < “Now - 6 months” Azure SQL Database
  • 53.
  • 65. Pricing (via azure price calculator)
  • 74. “ ” Questions? Ask and you may or may not be answered. The presentation will be uploaded on Docs.com Join us @ https://www.facebook.com/groups/phissug Majority of the parts of the presentation were taken from Joe Yong’s presentation of Stretch Db and Microsoft Introduction of SQL Server 2016’s new features at the Microsoft Ignite 2015 The videos of StretchDb and AlwaysEncrypted were taken from Microsoft’s New SQL. No Equal Series @ https://channel9.msdn.com
  • 75. References  Stretch Database: https://msdn.microsoft.com/en-us/library/dn935011.aspx  Stretching On-Premises Databases to the Cloud: https://channel9.msdn.com/events/Ignite/2015/BRK2574  SQL Server Stretch DB: https://channel9.msdn.com/Shows/Data-Exposed/SQL-Server- Stretch-DB  Stretch Database Securely and transparently leverage infinite storage and compute capacity in Azure with SQL Server 2016: https://channel9.msdn.com/events/DataDriven/SQLServer2016/StretchDatabase  Microsoft SQL Server 2016, Stretch Database: https://channel9.msdn.com/events/DataDriven/New-SQL-No-Equal/Microsoft-SQL- Server-2016-Stretch-Database  Introduction to Stretch Database: http://sqlperformance.com/2015/08/sql-server- 2016/intro-stretch-database
  • 76. References  Stretch Database Pricing: http://sqlinthewild.co.za/index.php/2016/04/19/sql-2016- features-stretch-database/  Stretch Database Pricing2: http://www.sqlservercentral.com/articles/Editorial/142696/  Stretch Database Pricing2 Discussion: http://www.sqlservercentral.com/Forums/Topic1794699-263-1.aspx  MS Pricing Stretch Database: https://azure.microsoft.com/en-us/pricing/details/sql- server-stretch-database/  MS Pricing Storage: https://azure.microsoft.com/en-us/pricing/details/storage/  Stretch Database Pros and Cons: http://kevin3nf.blogspot.com/2016/06/sql-server- 2016-stretch-database.html

Editor's Notes

  1. Kung may students man sa inyo, pwede nyokong kuning resource speaker. I usally discuss things about C#, ASP.NET MVC, LINQ, MS SQL Server, MS Excel, Power BI, Power Query. Certificate at food lang sapat na.
  2. The curious case of hybrid and cloud.
  3. Source: https://msdn.microsoft.com/en-us/library/dn935011(v=sql.130).aspx Stretch Database lets you archive your historical data transparently and securely. In SQL Server 2016 Community Technology Preview 2 (CTP2), Stretch Database stores your historical data in the Microsoft Azure cloud. After you enable Stretch Database, it silently migrates your historical data to an Azure SQL Database. You don't have to change existing queries and client apps. You continue to have seamless access to both local and remote data. Your local queries and database operations against current data typically run faster. You typically enjoy reduced cost and complexity.
  4. We have two conflicting requirements, and we need to find a middle ground between them.
  5. The proposed solution is SQL Server 2016’s StretchDB
  6. By enabling stretchDB we are creating a way for the DB Engine to connect to an Azure SQL Database, and do StretchDB Operations there such as migrating rows and querying the Azure SQL Database.
  7. To enable Stretch on a database. Right click on the desired database. Point to tasks. Point to stretch. Click enable. This will take you to the StretchDB Wizard.
  8. The wizard takes you to a brief introductory window. Read it if it interests you, after reading click next.
  9. Select the tables where the data to be migrated to azure is located and then click next. By default SQL Server Migrates the whole table to Azure.
  10. After selecting the tables, you will be prompted for your Azure Credentials. Sign in to your azure account and then proceed to the next steps.
  11. After signing in you need to specify the Following: The azure subscription that you’ll gonna use. The region where the server is located, or where the new server will be located if you’ll opt for new server. The name of the server. This is auto generated if you’re gonna create a new server. The server admin credentials. This will create a new server login and a new Azure SQL Database regardless if you created a new SQL Server or not. After specifying, click next.
  12. Enter password for the database master key. The database master key secures the credentials that Stretch Database uses to connect to the remote database.
  13. This dialog allows you to create exceptions for Azure’s firewall. At least add an exception to the Source SQL Server Public IP.
  14. This dialog shows the summary of the setup. It also includes an estimate of the cost of stretching your database.
  15. When you proceed to stretching you’ll have to wait until SQL Server is done with its checks, and until Azure is done with the provisioning.
  16. After everything’s done, the Icon of your database will be changed into something like that one above.
  17. In case that you need to enable stretching to another table on the same database. Just right click the table, point to stretch and then click enable. You will be shown a dialog similar to what you have seen before.
  18. This dialog shows the same introduction to stretchDB
  19. This is similar to the previous dialog where you selected the tables that you want to stretch. However this time, only one table is shown because you specifically chosen the table from the object explorer.
  20. This shows a summary of the operations that will be carried out.
  21. After confirming the stretch, the wizard will show you thee status of stretching, you have to wait until SQL Server finishes its operations. After SQL Server is finished, the table is as good as stretched. Please note that Migration does not begin immediately, specially if a lot of this is happening on the server.
  22. In case that the cold data are mixed with the hot data on a single table, you can specify a criteria for migration by clicking on the cell under Migrate column of the corresponding row of the table.
  23. In this dialog you can specify the condition for migration. This dialog only allows simple conditions (one column only).
  24. In case that you need more complex condition, you can create a function as formatted above and create a where clause. This where clause tells if the row is eligible for migration or not. This msdn documentation discusses more about the limitations regarding the complexity of the where clause: https://msdn.microsoft.com/en-us/library/mt613432.aspx
  25. The way StretchDB migrates data to Azure is more of clump by clump. And it usually depends on fast is your upload speed. During the demonstration on Microsoft Ph, StretchDb was migrating in 100k rows per transaction, when I made this presentation at our house, the migration is 10k rows per transaction. The frequency of these transactions depends if the server is busy or not. SQL Server handles this functions.
  26. To monitor the status of StretchDb and its migration: Right click on the database. Point to tasks. Point to stretch. Click Monitor A dashboard will show up on SSMS.
  27. This dashboards shows an overview of the stretching, which include the current size of the database (Data + Log), the Azure Details, and the tables that are configured for stretch.
  28. You will find out that the tables that are configured for stretch shows the Rows on the table, the rows that are currently on the local server, and the rows that has been migrated to azure. You can also click on the “View Stretch Database Health Events”, this will show a table of events related to Stretch DB.
  29. The table of events shows the name of the event and the time when it happened. And as you can guess it the “stretch_table_row_migration” is the event where the DB Engine is migrating rows from the local database to Azure. It does not happen exactly after we configured stretch DB. In this case it took my SQL Server a minute or two after I’ve successfully configured the table for stretching. And as you can the row migration happens on an average of twice every minute for an idle server.
  30. This network graph shows the burst of uploads and downloads whenever the SQL Server is migrating rows.
  31. Other than the monitor, you can also see the migration status by using the dmv sys.dm_db_rda_migration_status. This DMV features a more detailed view of the migration events.
  32. You can also monitor the space being used by your database using the sp_spaceused stored procedure. The screenshot above shots three different uses of the stored procedure. The first shows the space used by the whole database, the second shows the space used by the local data, and the third shows the space used by the data on Azure. As you can see, as we let StretchDb migrate data from local to Azure, we are freeing up-space on our local servers.
  33. Comparing StretchDB to a manually archived table: In manually archived table, depending on your implementation, it might require additional SQL Logic to include archived data. On the other hand, on StretchDB querying a stretched table is the same as querying a normal table. The smart query processing automatically include the data that resides on Azure in your query results. It also detects if the query requires data from Azure or not.
  34. In this screenshot StretchDemoSimpleFilter table migrates data that has ID values greater than 10000. So when we need those data that has ID Column below 10000, the query execution plan shows that we are querying normally.
  35. On the other hand, if we issued a query that requires data from Azure, we can see a different execution plan. A plan which includes a remote query action.
  36. When you stretched a Child table, the smart query processing is smart enough to know that some of the Child table’s data is in azure during a join.
  37. However the smart query processor is not quite smart when processing joins, it doesn’t really know if we only need the data that is on the local server or not.
  38. But when you use the where clause as a guide, the smart query processing gets smarter.
  39. When you are doing backup and restore, the the DB Engine knows that it will only backup the data that is on the local server. So It doesn’t download all data from Azure just for the backup. Same with Restore.
  40. Here we can see a Backup operation being performed on a database that doesn’t have any rows migrated to azure.
  41. Notice the difference between the time of backup after we have migrated a lot of rows to azure
  42. We can also notice the difference between the size of the database backup file.
  43. Here we can see a restore operation being performed on a database that doesn’t have any rows migrated to Azure.
  44. I was expecting that it would yield to a faster restore but weird things happened when I attempted to do a restore. My restore database speed won’t get back to 29MB/Sec
  45. One of the neat feature of Cloud is agility on scaling. Instead of waiting for your order of hardware, you’ll just a few clicks here and the additional load will be address without further effort needed.
  46. This scaling feature of Azure is also available in the StretchDB Service. Just adjust the amount of DSU that you want. DSU is database stretch unit. It is a unit of measure created by Microsoft so that Azure subscribers would have a relative measure to compare StretchD Service.
  47. Source: http://channel9.msdn.com/Shows/Data-Exposed/Temporal-in-SQL-Server-2016 Example of using temporal tables with Azure SQL Database stretch tables.
  48. I wasn’t able to complete my screenshots because I ran out of azure credits. If you don’t mind experimenting, you can create a System-Versioned table, and stretch the history table. Do changes, and see if smart query processing will be applied on the For Clause. During out demonstration, the For clause doesn’t seem to exhibit that behavior.
  49. You cannot stretch the System-Versioned Table, but you can stretch the History Table.
  50. A normal query on the table will not hit the Azure Database because the temporal table itself is not stretched.
  51. This shows that the smart query processor is taking into account the queries for temporal tables. However, it is not behaving as I expect it to be. The values of the rows are not shown as of the specified date. And when you try to disable the stretch database on the history table SSMS is showing null exception errors.
  52. SQL Server Always Encrypted. Whend ata is being migrated from Local Database to Azure Database, the data is encrypted before it is being sent to azure. But if that security is not enough, you can enable Always Encrypted on a selected column and proceed with the migration.
  53. To encrypt columns, right click the database and click encrypt columns.
  54. You will be taken into a wizard that shows an overview of the always encrypted feature.
  55. Choose which columns are to be encrypted and select the encryption type that we want to.
  56. Configure master key and then press next.
  57. This part of the wizard warns you about the resources that the Always Encrypted will eat up.
  58. This shows the summary of the tasks that will be done.
  59. After Sql server database engine is finished with the encryption, you can proceed to stretching of the table as normal.
  60. Configure stretch database on the encrypted table.
  61. After configuring and verifying if it has been stretch, we take a loot at our encrypted table.
  62. As you can see even if the columns are encrypted, they are still stored on the Microsoft azure and they are still encrypted and still included in the query.
  63. This shows that the query execution plan for a stretched table is the same as that of a an encrypted table.
  64. The pricing calculator is located here: https://azure.microsoft.com/en-us/pricing/calculator/ it gives you a good estimate on how much will it cost for implementing the stretchDB feature.
  65. To pause the Stretch feature means temporarily stopping the Migration of rows from local to azure. To pause it, right click on the table, point to stretch, and Click Pause.
  66. Clicking on pause will show you a dialog that looks the same as above, wait until the operations has succeeded and then click close.
  67. If you want to stop stretching, you can disable it by right clicking on the stretched table, point to stretch, point to disable and click on any of the two choices. You have two choices: Bring back the data from azure or Leave the data in azure.
  68. If you’ve chosen to bring back the data, SQL Server will begin trickling the Azure SQL Database. It will move clump by clump all of the data that were stored on azure.
  69. Once that the database’s stretch has been disabled. Data left in azure will no longer be queried smartly.
  70. It only shows weird execution plan when we try to hit the remote database using our queries.
  71. In the event that you ran out of Azure credits while a table is being stretched. You will not be able to run any queries pertaining to the stretched table. Regarding the question: “Can I bring back my data if I ran out of azure credits?”, I cannot answer this in plain manner. All I can say is that I cannot get my data back (using the disable + bring back data from azure option) after I ran out of credits. The StretchDB Monitor says: login account is not a valid azure account.
  72. Although a few days after running out of credits, I happen to see this green graph on my chart. I’m pretty sure it won’t show up as a charge on my credit card :P