When observing the table in the system views, all partitioning and indexing matches, however SQL Compare (10.4.8.87) is showing the tables as partitioned differently. Running the following query provides the index/partition key combinations and shows them as matching across environments:
- Code: Select all
when i.index_id in (0,1) then 'TABLE'
else 'INDEX' end
from sys.indexes i
join sys.index_columns ic on (i.object_id = ic.object_id and i.index_id = ic.index_id)
join sys.columns c on (ic.object_id = c.object_id and ic.column_id = c.column_id)
where i.object_id = object_id('TableName') and ic.partition_ordinal=1
order by i.name
What is SQL Compare's process for identifying partition schemes and functions? Shouldn't it show the tables and indexes in both environments as partitioned identically (since they are)?