title: How to transfer a database AND its users from one SQL Server to another?
body: <p>we have one db in an SQLServer instance that should be transferred to another instance (let's say <code>dbname="testdb"</code> with a user <code>testuser</code>).</p>
  
  <p>This transfer works easily when we use SQL Server Management Studio (backup the database on the source machine and restore it on the target machine).</p>
  
  <p>The problem is now that I can't connect with the <code>testuser</code> on the target machine. It's part of the db but not part of the SQL Server wide logins.</p>
  
  <p>Now my question. How can I add the user from the db to the SQL Server logins?</p>
  
  <p>Thanks in advance for any comments!</p>
  
  <p>Cheers,
  Helmut</p>