Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2013+ DB Project - Partial Schema / Import Partial DB Project

I believe I am probably doing this wrong, but I am trying to create a DB Project in Visual Studio 2013 which only deals with a small subset of objects (tables, views, etc) from within an existing SQL Server database.

From looking online, I have found links detailing how to do this in Visual Studio 2010 such as:

  • https://msdn.microsoft.com/en-us/library/dd193248(v=vs.100).aspx
  • https://msdn.microsoft.com/en-us/library/dd172128(v=vs.100).aspx

But it doesn't seem the same options are available in VS2013.

Simply put, how can I accomplish the task of importing just a small selection of DB objects from an existing SQL Server instance into visual studio so as to be able to compartmentalize my development?

Thanks so much!!

like image 811
John Bustos Avatar asked Oct 16 '25 02:10

John Bustos


1 Answers

If I understand you correctly you should do the next steps to achieve your goal.

  1. Add a new database project to your solution. enter image description here
  2. Right click on the database project in the solution explorer and select Schema Copmare. enter image description here
  3. Left part will be predefined with a path to your database project. You should select a target schema and create connection to your database. enter image description here
  4. If you want to update a database project from an existing database you should switch source and target and press Compare. enter image description here
  5. Now you can see all objects which you can check for adding to your database project. enter image description here
  6. Finally you should click Update for updating your target schema.

I hope I answered your question.

like image 131
Neshta Avatar answered Oct 18 '25 17:10

Neshta



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!