Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>SQL Database ProjectsNew to Visual Studio Code? Get it now.
SQL Database Projects

SQL Database Projects

Microsoft

microsoft.com
|
4,062,799 installs
| (5) | Free
Enables users to develop and publish database schemas for MSSQL Databases
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

SQL Database Projects extension

Database source control where objects are stored as code, integrating with build-time validation and dynamically calculated deployments for database DevOps. Cross-platform and compatible with Visual Studio SQL Server Data Tools (SSDT) for SQL Server, Azure SQL, and Fabric SQL.

Overview

SQL Database Projects for Azure Data Studio and VS Code provides a way to design, edit, and publish objects to SQL databases from a source controlled project. For a complete development workflow, build and deploy your database projects in CI/CD pipelines, such as GitHub Actions or Azure DevOps.

SQL project lifecycle

📕 Learn more about SQL Database Projects in the documentation: https://aka.ms/sqlprojects

Requirements

The extension will prompt to install the .NET SDK if it is not found, as it is required to build SQL projects. You can also install the .NET SDK manually from here for Windows, macOS, and Linux.

Quick start

  1. Create a new database project by going to the Database Projects view or by searching for Database Projects: New in the command palette.
  2. Add .sql files to the project to define database objects. For example, creating a file Product.sql in the SQL project folder to add a table named Product:
CREATE TABLE [dbo].[Product](https://github.com/Microsoft/azuredatastudio/blob/HEAD/
    [ProductID] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY,
    [ProductName] [nvarchar](https://github.com/Microsoft/azuredatastudio/blob/HEAD/200) NOT NULL
);
  1. Build the SQL project to validate the SQL syntax and object references. In the Database Projects view, right-click the database project's root node and select Build.
  2. Building the project created a .dacpac file in the output folder. This file contains the schema of the database project and can be deployed to a SQL Server or Azure SQL instance.

📕 Dive in further with this complete tutorial for creating and deploying a SQL project.

AdventureWorks SQL project

Features

  • Microsoft.Build.Sql SDK-style projects
  • Develop and validate database objects using T-SQL
  • Start from an existing database to get it in source control
  • Publish the database objects to a SQL Server or Azure SQL instance
  • Publish the database objects to a local development container
  • Automate generation of deployment scripts and reports
  • Update the database project from a database and visualize differences
  • Code analysis for best practices
  • Include custom scripts before and after deployment
  • Declare deploy-time variables

Preview Features

  • Generate SQL projects from OpenAPI/Swagger specs

Settings

General Settings

  • sqlDatabaseProjects.dotnetSDK Location: The path to the folder containing the dotnet folder for the .NET SDK. If not set, the extension will attempt to find the .NET SDK on the system.
  • sqlDatabaseProjects.microsoftBuildSqlVersion: Version of Microsoft.Build.Sql binaries used when building SQL projects that are not SDK-style SQL projects. If not set, the extension will use Microsoft.Build.Sql 1.0.0.
  • sqlDatabaseProjects.netCoreDoNotAsk: When true, no longer prompts to install .NET SDK when a supported installation is not found.
  • sqlDatabaseProjects.collapseProjectNodes: Option to set the default state of the project nodes in the database projects view to collapsed. If not set, the extension will default to expanded.

AutoRest Settings (preview)

  • sqlDatabaseProjects.nodejsDoNotAsk: When true, no longer prompts to install Node.js when a supported installation is not found.
  • sqlDatabaseProjects.autorestSqlVersion: Version of AutoRest.sql to use for generating SQL projects from OpenAPI/Swagger specs. If not set, the extension will use the latest version.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Telemetry

This extensions collects telemetry data, which is used to help understand how to improve the product. For example, this usage data helps to debug issues, such as slow start-up times, and to prioritize new features. While we appreciate the insights this data provides, we also know that not everyone wants to send usage data and you can disable telemetry as described here for Azure Data Studio or here for VS Code.

Privacy Statement

To learn more about our Privacy Statement visit this link.

Feedback

Please report issues and feature requests here.

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft