title: How to handle users and logins in Visual Studio Database Project?
body: <p>I've built a database in SQL Server 2008 R2 and am using Visual Studio 2010 Ultimate to create a database project for it.</p>
  
  <p>I've created both a SQL Server project and Database project to represent my environment based on this <a href="http://msdn.microsoft.com/en-us/library/dd193268%28v=vs.100%29.aspx" rel="noreferrer">MSDN walkthrough</a>.  The schema comparisons for both projects work as expected and I'm able to replicate all changes server to project.</p>
  
  <p>However, it seems to have imported some environment specific configuration, such as logins, user/login mapping, local service accounts (e.g. NT SERVICE\MSSQL$SQLEXPRESS2008), etc.  This seems not ideal because my impression was this database project could be deployed onto another server and those environment specific details could be different.  For example the named instances could be different between Dev, QA, and Prod.  Users could be mapped to different logins.</p>
  
  <p>Am I doing this properly or should I be taking extra steps to make the database project portable to all environments?</p>
  
  <p>My goal is to utilize this project to </p>
  
  <ol>
  <li>Capture schema in version control</li>
  <li>deploy schema changes such as by generating change scripts</li>
  <li>tie to unit testing to create a disposable test environment on the fly.</li>
  </ol>