microsoft / microsoft/vscode-mssql

[Bug]: Missing SQL objects after Importing from existing database

Open
#22,100 6 comments 0 reactions 1 assignee Claimed by @ssreerama View on GitHub
Area - SQL Project Bug User-filed
Dominant language
TypeScript
Stars
1.9k
Forks
610
Avg merge
2d 3h
Merged PRs (30d)
97

Description

### Description

Hello,

I'm trying to restructure a process deployment of an existing AZURE SQL Database.
I've created an new SQL project (in VS Code and in VS 2022 Pro) and used the "import form existing database" feature to import SQL objects to my newly created project.

However, the import is missing some SQL Objects.
In my case a full schema with all his tables, views,etc... is missing.
Moreover the project build returns an error saying there is missing objects references, pointing to the not imported schema objects !
For example, for this error :
View: [Expo].[VW_GetAccounts] has an unresolved reference to object [CDC].[AccountsEvents].
I can see the object [CDC].[AccountsEvents] in the database via SSMS, but i do not see it in the project (neither VSC nor VS2022).

Have anyone faced this same issue ?

Many Thanks for the help.

### Steps to Reproduce

In vs code:

1. Create new Database Project
2. Click on "Update Project from Database"
3. Chose the source database connection profile
4. Select "Apply all changes"
5. Wait for the import to finish

### Affected 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 affected area

_No response_

### Environment Information

- VS code Version: 1.119.0 (user setup)
- Commit: 8b640eef5a6c6089c029249d48efa5c99adf7d51
- Electron: 39.8.8
- ElectronBuildId: 13870025
- Chromium: 142.0.7444.265
- Node.js: 22.22.1
- V8: 14.2.231.22-electron.0
- OS: Windows_NT x64 10.0.17763
- MSSQL Extension Version : 1.42.2
- Operating System : WINDOWS SERVER 2022
- Connextion Type : AZURE SQL DATABASE

### Confirmation

- [x] I have searched existing issues and couldn't find a match
- [ ] I want to work on this issue

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.