Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering SQL Server 2017

You're reading from  Mastering SQL Server 2017

Product type Book
Published in Aug 2019
Publisher Packt
ISBN-13 9781838983208
Pages pages
Edition 1st Edition
Languages
Concepts
Authors (5):
Miloš Radivojević Miloš Radivojević
Profile icon Miloš Radivojević
Dejan Sarka Dejan Sarka
Profile icon Dejan Sarka
William Durkin William Durkin
Profile icon William Durkin
Christian Cote Christian Cote
Profile icon Christian Cote
Matija Lah Matija Lah
Profile icon Matija Lah
View More author details
Toc

Table of Contents (20) Chapters close

Title Page
Copyright Contributors About Packt Preface 1. Introduction to SQL Server 2017 2. SQL Server Tools 3. JSON Support in SQL Server 4. Stretch Database 5. Temporal Tables 6. Columnstore Indexes 7. SSIS Setup 8. What Is New in SSIS 2016 9. Key Components of a Modern ETL Solution 10. Dealing with Data Quality 11. Unleash the Power of SSIS Script Task and Component 12. On-Premises and Azure Big Data Integration 13. Extending SSIS Custom Tasks and Transformations 14. Scale Out with SSIS 2017 1. Other Books You May Enjoy

Querying stretch databases

When you query a stretch database, the SQL Server Database Engine runs the query against the local or remote database depending on data location. This is completely transparent to the database user. When you run a query that returns both local and remote data, you can see the Remote Query operator in the execution plan. The following query returns all rows from the stretch T1 table:

USE Mila; 
SELECT * FROM dbo.T1; 

As expected, it returns five rows:

id          c1                   c2
----------- -------------------- -----------------------
2           Manchester United    2018-02-02 00:00:00.000
4 Juventus Torino 2018-02-25 00:00:00.000
5 Red Star Belgrade 2018-02-25 00:00:00.000
1 Benfica Lisbon 2018-01-15 00:00:00.000
3 Rapid Vienna 2018-01-28 00:00:00.000

You are surely much more interested...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}