Partition differences innacurate
mfal
Posts: 19
We have a database in two different environment with a large partitioned table. The table has 5 indexes on it, 4 which are partitioned on one field, 1 which is partitioned differently. This was done in order to support specific query patterns.
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:
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)?
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:
select i.name, c.name, case 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)?
Comments
I'd be happy to help if you could provide examples on what's different in your case/shouldn't be different. It's not using a single query for this.
Also it would be useful to know if you see the problem as an identical object being scripted in the synchronization, or being shown in the results of the comparison, as the two sets use different logic (and sometimes the visual differences do not accurately reflect the comparison result).
Again, both of these tables and all indexes are partitioned in the same way as validated by my previously supplied query. So the question remains why Data Compare shows them as being different.
We would like to know why SQL Compare is incorrectly reporting a difference. Please let me know what I have not made clear.