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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s