Fails when Indexed Views in use on SQL2005

Jan 27, 2010 at 10:36 AM



I get failure to clear partition if I have Indexed views present in SQL 2005, the views don't need to use the partition, as its the bit of code that checks all indexed views that fails. Looks to me like its caused by a reference to a system view 'sys.dm_sql_referenced_entities' which doesn't exist in SQL2005.

Anyone any ideas of a workaround?





Jan 27, 2010 at 3:53 PM

Switching Partitions involving Indexed Views was not supported until SQL Server 2008.  In SQL Server 2005 your only choice is to drop the index before performing the switch.