Вопрос

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?

Это было полезно?

Решение

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top