I use SQL Server 2008 R2, I need to rebuild the index for every table in a database
Using this script, I receive an error
USE myDb
GO
EXEC sp_MSForEachTable 'ALTER INDEX ALL ON ? REBUILD'
Error:
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.
Any idea how to fix it? thanks
SQL Fool (Michelle Ufford) has a great script to do this for you – all done and well tested by many users.
It’s a great piece of work – it allows you to define fragmentation levels for which you
Don’t reinvent the wheel – just go see and use the script!