SQL Data Compare: Comparing Views

In case you haven’t come across this before you can actually compare two views in SQL Data Compare. The only pre-requisite is that the view has an index defined on it. As an example lets create and compare an indexed view on pubs.

First we must create the view with the schema binding option:

We now need to create the index on the view:

When we now use SQL Data Compare to compare two databases with this indexed view defined we are given the option of including it in the comparison.