7

By using VS TFS Database Edition 2008, how to create dbproject from an existing SQL SERVER database?

1
  • can u please tell me how to increase that...? Commented Mar 19, 2010 at 9:22

3 Answers 3

7

In "Visual Studio" go to the "SQL Server Object Explorer" locate to database, right-click on the database you want and select "Create New Project ..."

Sign up to request clarification or add additional context in comments.

Comments

6

This as updated in VS 2010. There is now the option to "Import database objects and settings" from the project context menu.

Comments

5

There no direct, built-in support to do that, unfortunately.

You can get close by doing this:

  • in SQL Server Management Studio, go to the Object Explorer, right-click on the database you want, and pick Tasks > Generate Scripts
  • select all the database objects you want to script out
  • at the end, choose to generate the scripts into separate files for each db object

What you end up with are a number of .sql scripts in a folder of your choice, which basically represent your database.

Next:

  • create a Database Project in Visual Studio 2008
  • once you've done that, add the existing scripts to that project

It's a bit more involved that it should be - but that's the only way that I know of to achieve this right now. Don't know if VS2010 will support this in an easier way....

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.