title: How to ALTER INDEX for every Table in my DataBase
body: <p>I use SQL Server 2008 R2, I need to rebuild the index for every table in a database</p>
  
  <p>Using this script, I receive an error</p>
  
  <pre><code>USE myDb
  GO
  
  EXEC sp_MSForEachTable 'ALTER INDEX ALL ON ? REBUILD'
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>ALTER INDEX failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER'. Verify that SET options are
    correct for use with indexed views and/or indexes on computed columns
    and/or filtered indexes and/or query notifications and/or XML data
    type methods and/or spatial index operations.</p>
  </blockquote>
  
  <p>Any idea how to fix it? thanks</p>