There is no direct, built-in support for this, unfortunately.
You can come close to this:
- in SQL Server Management Studio, go to Object Explorer, right-click the database you want and select Tasks> Generate Scripts
- select all database objects you want to use script out
- at the end, choose to generate scripts in separate files for each db object
As a result, you will get several .sql scripts in the folder of your choice, which basically represents your database.
Further:
- create a database project in Visual Studio 2008
- as soon as you do, add existing scripts to this project
This is a little more related to what it should be - but this is the only way I know to achieve this right now. I don't know if VS2010 will support this easier ...
marc_s
source share