Question

I am new to SSDT so hopefully this is an easy one. I would like to script different users based on build configuration in my database project. Is the only way to accomplish that by using SQLCMD variables and Post Deployment Scripts?

Était-ce utile?

La solution

Mike, as far as I know the only easy-ish way to do this is with SQLCMD variables and post-deploy scripts. You could probably code something that would parse the generated script and tweak it for each environment, but using the post-deploy scripts will be far easier in the long run.

I've blogged about this, building on Jamie Thomson's idea. http://schottsql.blogspot.com/2013/05/ssdt-setting-different-permissions-per.html

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top