Making SSDT just generate a SQL script (and not deploy a database)

后端 未结 4 1482
感动是毒
感动是毒 2021-01-02 12:25

Having recently upgraded to SSDT 2012 I seem to be missing the option to just generate a T-SQL script instead of deploying the database to a server somewhere.

To be

4条回答
  •  暖寄归人
    2021-01-02 12:30

    You may want to look at the SQLPackage command line. You can set the options there to use an action of "script" and specify an outputfile name to generate scripts instead of publishing the database. You can also do that through a batch file so it will generate a script every time. You still need to provide a source project and target database, though. The reference for SQLPackage can be found here: http://msdn.microsoft.com/en-us/library/hh550080%28v=VS.103%29.aspx

提交回复
热议问题