What about Existing Databases?

Its easy: Import an existing database into a new SSDT project.

We’ll use AdventureWorks2017, which can be downloaded from Microsoft, or any database where you can read the Data Definition Language, DDL. The download file and instructions are here
https://learn.microsoft.com/en-us/sql/samples/adventureworks-install-configure?view=sql-server-ver16&tabs=ssms

Import Existing Database

The key is starting with a SSDT project without any SQL objects – feel free to adjust the project project properties before importing – then right click the project and select Import > Database…

Here are the detailed steps:

New Project

  1. Create a new SQL Server Database Project named AdventureWorks
  2. Open Properties and change these settings
    • Project Settings > tick Include schema name in file name
    • Build > Treat Transact-SQL warnings as errors

Import Database

  1. Right click the project, select Import > Database… and a wizard will guide you though the steps
  1. Click Select Connection…
  2. Enter the connection details
  3. Click Connect
  4. Select Folder structure: Schema\Object Type
  5. Click Start
  1. Click Finish
  1. Review the Solution Explorer for the imported objects
  1. Double click Person.Address and review the table