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

05/23/2016

2 minutes to read

Contributors

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 topic 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

You must possess ALTER ANY EXTERNAL DATA SOURCE permission. 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, we need to create two databases, Customers and Orders, either in the same or different logical 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 login 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: