SSDT Generating non SQLCMD deployment scripts
Asked Answered
T

1

7

I am using SSDT to manage my database. Right now it generates SQLCMD deployment scripts. Is there any way to have it generate plain t-sql scripts?

Tamanaha answered 12/11, 2012 at 19:3 Comment(0)
E
4

Short answer: No. They were designed to work this way.

Longer Answer: No. SQL Projects use a lot of the SQLCMD commands to manage variables and such when releasing the database. Those can be passed in from the calling application in ways that standard T-SQL can't handle or can't handle well. One improvement that was made in SSDT over the older DB Projects is that you're now told that SQLCMD isn't enabled so the script won't run at all.

I'm not sure of your scenario, but you can automate the build/publish of the projects using SQLPackage. We've done that for our developer team so they can easily refresh their local working copies without having to open the projects or run scripts.

Ernaernald answered 1/5, 2013 at 15:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.