title: Programmatically set a DB user to be db_owner
body: <p>How can I assign the <code>db_owner</code> role to a user that I have created?</p>
  
  <p>I am able to create a login and add them to the database. I don't know how to change their permission to <code>db_owner</code> using a SQL query. </p>
  
  <p>I have a feeling I am maybe missing something with my query where I add the user to the database? </p>
  
  <p>Here is the query to add the user to the database</p>
  
  <pre><code>CREATE USER [Driver-SOC-ChrisTest] FOR LOGIN [Driver-SOC-ChrisTest] 
  WITH DEFAULT_SCHEMA=[dbo]
  </code></pre>