microsoft / microsoft/vscode-mssql

[Feature Request]: Support Importing Multiple SQL Objects From a Single File Into SQL Projects

Open
#20,794 0 comments 0 reactions 0 assignees View on GitHub
Area - SQL Project Enhancement User-filed
Dominant language
TypeScript
Stars
1.9k
Forks
610
Avg merge
2d 3h
Merged PRs (30d)
97

Description

### Feature Description

**Requested Feature:**
Add an “Import From SQL File” capability that can parse a single script containing multiple objects and generate the appropriate folder structure and individual object files within a SQL project.

**Expected Behavior:**

User selects a .sql file with multiple DDL statements.

SQL Projects parses objects based on CREATE/ALTER statements.

Each object is generated as its own file with proper naming and placement.

Errors in the source script should not prevent import—unrecognized statements can be surfaced for review.

**Impact:**
This feature would significantly streamline SQL project maintenance and unlock several developer workflows that are currently blocked by the single-file-per-object requirement.

### Problem and Motivation

**Problem:**
SQL projects currently require each database object to exist in its own individual file. When working with third-party modeling tools or autogenerated scripts, it’s common to receive a single .sql file containing multiple objects (tables, views, procs, functions, etc.).
Today, the only way to bring these objects into a SQL project is to either:

Use Schema Compare against an existing database, or

Manually split the file and recreate each object one-by-one.

This is slow, error-prone, and blocks developers when the SQL project cannot build or deploy, or when the source script is generated externally.

**Why This Matters:**
Allowing SQL Projects to import multiple objects from a single script would:

Unblock scenarios where a project doesn’t currently build, preventing schema compare from running.

Enable frictionless integration with 3rd-party modeling tools that export consolidated SQL scripts.

Improve onboarding and productivity for DBAs and developers who regularly receive bulk DDL scripts.

Reduce manual work and risk of inconsistency when splitting files.

### Related Area

- [ ] Connection dialog (SQL Server | Azure browse/Fabric browse)
- [ ] Query editor
- [ ] Query results panel
- [ ] Object Explorer
- [ ] GitHub Copilot integration
- [ ] Preview/Edit data
- [ ] Table Designer
- [ ] Schema Designer
- [ ] Schema Compare
- [ ] Local SQL Server Container provisioning
- [ ] SQL database in Fabric provisioning
- [ ] DACPAC/BACPAC export/import
- [x] SQL Database projects
- [ ] Query Plan Visualizer
- [ ] Other (please describe below)

### If you selected "Other", please describe the area

_No response_

### Confirmation

- [x] I have searched existing feature requests and couldn't find a match
- [ ] I want to help implement this feature

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue identifies SQL Database projects as the affected area but names no files, tests, or entry points. Start by locating the existing SQL project import workflow and its parsing-related tests. Done means a multi-object .sql file produces separate, correctly placed object files while unrecognized statements remain reviewable.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql, typescript
Domain
database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.