Type-based method allows you to include or exclude an entire class of objects, such as tables or views. To exclude objects by type, use the <ObjectTypeSelection> element and specify two attributes:

The following xml fragment excludes tables and views from the comparison.

<ObjectTypeSelection>
     <ObjectType Type="Table" Include="false" />
     <ObjectType Type="View" Include="false" />
</ObjectTypeSelection>

The command line provides a list of predefined types that you can choose to include or exclude:

In addition to these types, the command line supports also three macro-types in order to facilitate the selection:

The Include attribute is ignored for macro-types. Object types included by DefaultObjects macro-option are those that you see in the Schema Compare User-Interface option screen when you click on the Restore Defaults button. More details are provided here.

Depending on your scenario, you could combine one of the macro-types with the actual types to achieve the desired result. For example, to exclude only views and procedures, you could use the following xml fragment:

<ObjectTypeSelection>
     <ObjectType Type="DefaultObjects" />
     <ObjectType Type="View" Include="false" />
     <ObjectType Type="StoredProcedure" Include="false" />
</ObjectTypeSelection>

or just:

<ObjectTypeSelection>
     <ObjectType Type="View" Include="false" />
     <ObjectType Type="StoredProcedure" Include="false" />
</ObjectTypeSelection>

To include only tables and exclude all other objects, you could combine the None macro-type with the Table type as in the following xml fragment:

<ObjectTypeSelection>
     <ObjectType Type="None" />
     <ObjectType Type="Table" Include="true" />
</ObjectTypeSelection>

 

Total compare from data to schema with IDERA SQL Comparison Toolset. Learn more > >

IDERA WebsiteProductsPurchaseSupportCommunityAbout UsResources Legal