Welcome to the new Azure SQL Database local development experience!

Silvano Coriani

The “inner loop” in software development workflows is the process of writing, building, debugging and testing code, usually on a local workstation or development environment, before sharing it with someone else. In contrast, the “outer loop” kicks off as soon as that code is checked in a source control system from where CI/CD pipelines can manage all required steps (including testing and validation) to publish code artefacts and configuration to production systems.

Modern database development follows a similar path, but it requires some specific capabilities as we’re dealing with a rich, fully stateful service like a relational database system for hosting our artefacts (database schema, functions, procedures, index definitions, etc.).

At Build 2022 We are introducing a local development experience for Azure SQL Database as a key building block in supporting database developers across the inner and outer loops of their database development workflows.

Local development experience for Azure SQL Database includes a series of extensions for Visual Studio Code and Azure Data Studio and a new Azure SQL Database emulator that lets developers to publish and run their database projects locally, on a containerised, cross-platform emulator providing close fidelity with Azure SQL Database public service while enabling a complete offline experience for running and testing their databases.

Image azure sql db local dev

End to end database development experience.

Key extensions for the local development experience are mssql and SQL Database Project. The former manages all connection aspects with Azure SQL Database emulator and public service, and lets developers to browse and query local and remote databases. It can also be used to point to an existing database and generate a SQL Database Project that can be used for subsequent modifications.

SQL Database Project extension supports developers in creating their database projects, building and validating schemas and other objects against Azure SQL Database syntax and capabilities. Finally, it supports publishing these projects to the local emulator for further testing and validation and, once passed, to a new or existing logical server in Azure SQL Database public service.

In Azure Data Studio, we also provide additional extensions that can support the database development process like Schema Compare, where developers can compare a source and target SQL Project or a live Azure SQL Database running in the emulator or in the public service, verify the differences and even generate a script to reconcile the two. More extensions covering other areas of the database development process such as design, testing and troubleshooting will be added in the future.

Database projects can be checked in source control systems, such as GitHub repos, together with other code artefacts and projects, providing a true “database as code” experience for designing, implementing and maintaining databases as part of the entire end-to-end solution. From there, developers and DevOps teams can leverage features like GitHub Actions for publishing a new database or a schema change to a test or production environment in Azure SQL Database public service.

Learn how to setup the new local development experience for Azure SQL Database by following our official documentation, which includes also a step by step quickstart guide to build and publish your first database project.

We’re planning to expand our end-to-end developer experience significantly in the future, covering more scenarios and use cases across all phases of the database development workflow. You can read a dedicated blog post on this subject, and leave your feedback, requests or suggestions in the comments section.

5 comments

Discussion is closed. Login to edit/delete existing comments.

  • Christopher Mire 0

    “dedicated blog post” link broken.

    Does this mean we have a migration path from .NET framework based .sqlproj to something following sdk projects?

    Is this recommended over deploying to a local sql2019 instance if we are targeting azure sql?

  • Alejandro Leguízamo 1

    What about Visual Studio? The largest majority of organisations today are not using Visual Studio Code.

    Is Microsoft abandoning Visual Studio Enterprise?

    • Silvano CorianiMicrosoft employee 0

      Absolutely not! We’re partnering with Visual Studio team to improve local development experience for Azure SQL Database, including ARM64-based scenarios.
      But VS already has LocalDB and SQL Server Data Tools included so things like offline development are already possible.
      With this release, we are providing a new option for Mac and Linux (and all non-VS) developers that didn’t have one previously.

      • Erik Ejlskov Jensen 0

        It would be very useful to have a newer LocalDB version in VS (current is 13 I think)

Feedback usabilla icon