Add "Ignore users" option when publishing SSDT project
You need to add an "Ignore users" option when publishing Sql Server Data Tools projects. You have this option on import. The ideal solution would be to reuse the same include/exclude objects dialog from import.
This is a major problem for us, and obviously for more than us: http://social.msdn.microsoft.com/Forums/en-US/aa87ac52-d7b1-40e3-b6d0-063472b127df/how-to-ignore-users-in-vs-11-sql-server-database-project-publish?forum=vstsdb
Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we havenÕt acted on it. Looking at the VS Ò15Ó plans, weÕre not going to take action on this item, so weÕre going to close it. If the suggestion is still relevant, please either take a look to see if thereÕs another suggestion thatÕs similar that you can vote on, or open a new suggestion.
- The Visual Studio Team
Kevin Cunnane commented
I'm happy to announce this issue has been fixed in the latest SQL Server tools release. The blog post announcing this is here: http://blogs.msdn.com/b/ssdt/archive/2015/02/23/new-advanced-publish-options-to-specify-object-types-to-exclude-or-not-drop.aspx
Thanks everyone for raising this issue.
SQL Server tools team
I agree with this suggestion. We should have a provision to include/exclude DB object types. I know there is a work around to exclude/include it, but that defeats the purpose of convenience of DB deployments.
Steve Reiter commented
The publish feature of Visual Studio is completely useless to us without this. There are no work arounds that maintain an appropriate level of security on our database.
We are a small team and as the lead developer I need to be able to publish changes to our test database which resides on the same database server as the production databases. The only way to accomplish this is to remove all uses from the visual studio project so that all users are deleted on publish and then re-added with a post-deployment script and SQLCMD variables. This means that I must have essentially SA access at the server level otherwise the publish fails when my user is removed from the DB permissions. This means that I also then have full access to our production DB and a slight mistake (such as forgetting to change the DB connection string during development) could have dire consequences.
As mentioned before. Logins and user may be different between different environments. DEV has development logins and users, TEST has test logins and users and PROD has neither development or test logins and users.