title: How can I manage SQL permissions between development and production?
body: <p>I'm trying to set up a smooth deployment process where we can deploy to a production or development SQL server with a single deploy script.</p>
  
  <p>But I don't know how best to manage users and permissions between the two environments. For example, in development we want the developers group to have the <code>db_owner</code> database role. On production we either want no access or just the <code>datareader</code> role.</p>
  
  <p>I think the easiest way to do this would be to set up the users once on each server and then not keep them in the database project. But then they get dropped during deployment.</p>
  
  <p>Is there some way I can do this using project configuration in Visual Studio?</p>
  
  <p>We're using a complete Microsoft stack</p>
  
  <ul>
  <li>Visual Studio 2010 database project</li>
  <li>SQL Server 2008</li>
  <li>TFS version control and build server</li>
  <li><code>vsdbcmd</code> for deployment</li>
  </ul>