Get started with cross-database queries (vertical partitioning) (preview)

In this article

Elastic database query (preview) for Azure SQL Database allows you to run T-SQL queries that span multiple databases using a single connection point. This article applies to vertically partitioned databases.

When completed, you will: learn how to configure and use an Azure SQL Database to perform queries that span multiple related databases.

Prerequisites

ALTER ANY EXTERNAL DATA SOURCE permission is required. This permission is included with the ALTER DATABASE permission. ALTER ANY EXTERNAL DATA SOURCE permissions are needed to refer to the underlying data source.

Create the sample databases

To start with, create two databases, Customers and Orders, either in the same or different SQL Database servers.

Execute the following queries on the Orders database to create the OrderInformation table and input the sample data.

The "username" and "password" should be the username and password used to log in into the Customers database.
Authentication using Azure Active Directory with elastic queries is not currently supported.

External data sources

To create an external data source, execute the following command on the Orders database: