Deploy SQL databases in Fabric from VS Code: No more context switching
Making schema changes in your SQL databases often means working across a few different steps. You write code in VS Code, then move over to the Fabric portal to find your workspace, locate your database, and deploy your changes. Sometimes that means exporting a script and running it manually. Sometimes it’s copy‑paste into the query editor. Either way, it pulls you out of your flow.
That context switching? It’s no longer required. You can now deploy schema changes to SQL databases in Fabric without leaving VS Code.
What’s new: Publish dialog and item templates
We’ve added two features to the SQL Database Projects extension for VS Code that make working with SQL databases in Fabric faster and less error-prone:
1. Publish dialog: See what you are deploying before you deploy it
When you right-click your SQL database project and select Publish, you get a dialog that lets you:
- Browse your Fabric workspaces and select your target database—no more copying connection strings or searching for server names
- Preview the deployment script—see exactly what SQL will run before you commit.
- Configure deployment options—control behavior like whether to drop objects that don’t exist in your project.
This is especially valuable when you’re deploying to production or making changes that could affect existing data. You can review the exact T-SQL that will be executed, verify it’s doing what you expect, and then deploy with confidence.
Explore this YouTube demo for Publish dialog and item templates to watch it in action.
2. Item templates: Get started faster
Item templates generate pre-configured code for tables, stored procedures, views, and other database objects with structure that matches your team’s standards. No more copy-pasting from old projects or remembering syntax.
- Select your project
- Select Add Item
- Choose your template (table, view, stored procedure, function)
- Get a properly formatted file ready to customize
Copilot code completions and Copilot agent in VS Code are also ready to assist you in completing the database objects. Hint: Tell Copilot agent ‘I’m creating a Microsoft.Build.Sql project and need <complex set of objects>.’ If your team has naming conventions, security patterns, or audit columns that should be on every table, templates provide a consistent starting point.
This saves time on repetitive tasks and reduces the chance of syntax errors when creating new database objects. Templates provide a consistent starting point, making it faster to scaffold new schemas, functions, or triggers without starting from a blank file.
Why this matters: Your database workflow should feel like app development
If you are building an application, your workflow probably looks like this: write code in VS Code, commit to Git, deploy via CI/CD pipeline. You don’t switch between tools for every step. You stay in your editor, and the deployment happens from there.
Database development has traditionally been different. You write schema changes in one tool, deploy them in another tool, and manage source control somewhere else entirely. That fragmentation slows you down and creates opportunities for mistakes.
With SQL database projects in VS Code connected to Fabric, your database workflow can match your application workflow:
- Write schema changes in SQL files in your project.
- Version control them in Git (Fabric SQL databases now support Git integration).
- Review them in pull requests with your team.
- Deploy them directly from VS Code using the publish dialog.
All without leaving your editor. All with the same version control and review processes you use for application code.
Real-world scenarios
Test locally first: Deploy to a local SQL Server 2025 container before pushing to Fabric using the ‘allow incompatible platform’ option.
Enforce team standards: Use item templates to ensure consistent structure (like required audit columns) across all new database objects.
Review before production: Preview the exact T-SQL script that will be executed, share it for approval, then deploy from the same interface.
Get started
Both the publish dialog and item templates are available now in the latest SQL Database Projects extension for VS Code.
For detailed guidance on SQL database projects in Fabric, refer to the Publish dialog documentation and Item templates documentation. To learn how source control integration works with Fabric SQL databases, check out this video demo Introduction to the source control built-in with SQL database in Fabric.
What’s coming next
The publish dialog and item templates are just the beginning. Over the coming months, we’re investing in making VS Code the best place to build databases for Fabric:
- Code analysis and quality checks
- Advanced IntelliSense and productivity features
- Deeper integration with AI-assisted development
This is about more than individual features; it’s about bringing professional-grade database development workflows to Fabric. The kind of workflows enterprise teams need to build production applications with confidence.
We’ll be sharing more as these capabilities ship. The roadmaps for the MSSQL extension in VS Code and SQL projects are available on GitHub: vscode-mssql roadmap and DacFx roadmap.