VSDBCMD: Create a .dbschema File from an Existing Database

If you have a Visual Studio Database project and want to reference an existing database, you can generate a .dbschema file from the command line. Here’s an example:

[cc]

vsdbcmd /a:Import /cs:”Server=(local);Database=MyDatabase;Trusted_Connection=True;” /dsp:SQL /ModelFile:MyDatabase.dbschema

[/cc]

Hope this helps!

This entry was posted in MS SQL Server, Visual Studio. Bookmark the permalink.

One Response to VSDBCMD: Create a .dbschema File from an Existing Database

  1. Mike says:

    Great !!!

Leave a Reply

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