[dba-SQLServer] Very strange behavior

Arthur Fuller fuller.artful at gmail.com
Wed Sep 10 23:14:43 CDT 2008


In the simple case of Northwind you are correct, but try it against
Adventureworks and you will see the problem. Try running these statements:


EXEC
sp_MSForeachtable ('ALTER INDEX ALL ON ' + schema_name() + '.' ? + 'REBUILD
WITH ( PAD_INDEX = OFF, SORT_IN_TEMPDB = ON, STATISTICS_NORECOMPUTE = ON )')

EXEC
sp_MSForeachtable ('ALTER INDEX ALL ON ? REBUILD WITH ( PAD_INDEX = OFF,
SORT_IN_TEMPDB = ON, STATISTICS_NORECOMPUTE = ON )')



More information about the dba-SQLServer mailing list