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?

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.