Create a New Database Project in SSDT from Existing Database

One of the very useful features in SQL Server Data Tools (SSDT) is a possibility of offline database projects. If you have an existing database in SQL Server it’s quite easy to create a database project from it.

  • In Visual Studio click File -> New -> Project
  • In New Project window select SQL Server template, select SQL Server Database Project and enter the desired name for you project, then press OK
New database project window
  • In Soltion Explorer right-click you project, select Import in context menu, then Database.
  • In Import Database page press New Connection button (if you had not created any connection earlier).
Import database - step 1
  • In Connection Properties page enter the Server name and select a database name in dropdown list.
Setup connection
  • In Import Database page press Start button. Visual Studio will create the definitions of your database objects in database project.
  • After all is done just press Finish button. Now let’s go to the Solution Explorer and examine the code.

Import database - final step

Leave a Reply

Your email address will not be published. Required fields are marked *