title: Disable users of a database not Logins in SQL server 2008
body: <p>To disable users of a Database in SQL Server 2008, I gave the command:</p>
  
  <pre><code>Use Database
  Go
  Revoke Connect from username;
  </code></pre>
  
  <p>It works for the users with <em>SQL Server Authentication</em> such as <strong>abcdef</strong>.</p>
  
  <p>But not for the user with <em>Windows Authentication</em> such as <strong>DomainName\abcdef</strong>. It gives the error:</p>
  
  <blockquote>
    <p>Msg 102, Level 15, State 1, Line 1 Incorrect syntax near '\'.</p>
  </blockquote>
  
  <p>It does not even work by using the single quotes around the username in the above mentioned command.</p>
  
  <p>Please suggest.</p>