Create a project for a local Azure SQL Database development environment

Applies to: Azure SQL Database

The Azure SQL Database local development experience empowers application developers and database professionals to design, edit, build/validate, publish, and run database schemas for databases directly on their workstation using an Azure SQL Database containerized environment. As part of this workflow, you'll create a SQL Database Project. The SQL Database Project extension allows you to create a new blank project, create a new project from a database, and open previously created projects.

Prerequisites

Before creating or opening a SQL Database project, follow the steps in Quickstart: Set up a development environment with Dev Container Templates for Azure SQL Database to configure your environment.

Create a new project

In the Database Projects view, select the New Project button and enter a project name in the text input that appears. In the Select a Folder dialog that appears, choose a directory for the project's folder, .sqlproj file, and other contents to reside in.

The empty project is opened and visible in the Database Projects view for editing.

Create a project from Azure SQL Database

In the Project view, select the Import Project from Database button and connect to a database in Azure SQL Database. Once connected, select a database from the list of available databases and set the name of the project.

Finally, select a target structure of the extraction. The new project opens and contains SQL scripts for the contents of the selected database.

Open an existing project

In the Database Projects view, select Open Project and open an existing .sqlproj file from the file picker that appears. Existing projects can originate from Azure Data Studio, Visual Studio Code, or Visual Studio SQL Server Data Tools.

The existing project opens and its contents are visible in the Database Projects view for editing.

Next step

Learn more about the local development experience for Azure SQL Database: