开发者

Visual Studio 2010 Database project scripts generated

I have a database project in Visual Studio and when I deploy it creates a series of scripts and executes them. The scripts seem to be tied to Visual Studio deployment though. I would like to be able to take the script and execute it in SQL Server Management Studio on the server. I开发者_如何学JAVAs this possible?


Yes, it is possible to run the deployment TSQL script directly (although there may be some parameters required), but you would normally do this using VSDBCmd:

GDR comes with a command-line tool called VSDBCmd (vsdbcmd.exe). This tool can create a .dbschema file from an existing database and deploy a build output or only a .dbschema file to a target instance. VSDBCmd can also be used on a computer on which Visual Studio is not installed. To move the command-line tool from one computer to another, copy the executable and its components from the Deploy directory under the VSTSDB directory. In a standard Visual Studio installation, this will be "%programfiles%\microsoft visual studio 9.0\vstsdb\deploy. The Deploy directory can be copied onto a thumb-drive and then placed on another computer.

Ref: Introducing New Features In The VSTS Database Edition GDR

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜