title: How to grant database user read/write access roles the "new way"?
body: <p>OK, so I have a database, a login and a database user assigned to a login. To grant that user db_datareader and db_datawriter access to the database I would do this:</p>
  
  <pre><code>USE [mydatabase];
  EXEC sp_addrolemember db_datareader, [myuser];
  EXEC sp_addrolemember db_datawriter, [myuser];
  </code></pre>
  
  <p>But if I'm reading the <a href="http://technet.microsoft.com/en-us/library/ms187750.aspx" rel="nofollow">documentation</a> correctly, the use of <code>sp_addrolemember</code> is discouraged:</p>
  
  <blockquote>
    <p>This feature will be removed in a future version of Microsoft SQL
    Server. Avoid using this feature in new development work, and plan to
    modify applications that currently use this feature. Use ALTER ROLE
    instead.</p>
  </blockquote>
  
  <p>So how do you do this with ALTER ROLE? When I do this:</p>
  
  <pre><code>ALTER ROLE sys.database_role_members.db_datareader ADD MEMBER [myuser];
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>Incorrect syntax near ADD MEMBER</p>
  </blockquote>