The Out Of Memory exception is encountered when comparing large databases in ApexSQL Data Diff

Applies to:
ApexSQL Data Diff

Symptoms:
If very large databases are compared, in some cases, the memory limitation of the application may be exceeded. If so this will produce an Out Of Memory error.

Due to how data is compare in memory, there will always be a finite amount of data that can be compared based on the memory available to the process. ApexSQL Data Diff has been continuously optimized to increase this maximum threshold by processing more efficiently, but depending on the amount of data to be compared and memory resources of the system it is running on, this threshold may still be hit.

Workaround:
This problem can be mitigated by gradually breaking down the comparison process to smaller parts of a database, by comparing tables, or columns to hopefully avoid hitting the maximum memory threshold.

This can be accomplished by first setting the data sources, and then enabling the Object filter, which is accessed by the advanced options menu.

cid:image004.jpg@01D066E4.F0009110

In the Object filter select the table that needs to be compared, and run the comparison.

cid:image005.png@01D066E4.F0009110

If the error is still encountered, then proceed to selecting only one column from the table, and if successful, repeat the process for other columns.

cid:image006.jpg@01D066E4.F0009110

Affected versions:
ApexSQL Data Diff  All, although newer versions experience the problem much less frequently.

Planned resolution
ApexSQL is always working to increase the amount of data that can be compared and newer versions are always able to process larger amounts of data more efficiently.