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?
SSDT Generating non SQLCMD deployment scripts
Asked Answered
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.
© 2022 - 2024 — McMap. All rights reserved.