This solution delves on the nuances of the setting of the parameter SP_DEQ_LOCK_WAIT.
General information.
The parameter SP_DEQ_LOCK_WAIT represents the time in second for which compare will wait while trying to lock the source table. For example, the parameter’s default setting of 300 allows the compare process to wait for 300 seconds for the purpose of locking the source table for read consistency before giving up on it. If it is reduced, compare will wait for a lesser time before exiting. To set it higher or lower may be more of an individual preference. Setting it to a very high value may not be desirable as it may result in compare waiting for an inordinately longer time. By the same token, if it is set too low, compare will exit out too soon requiring the command to be issued multiple times on a very busy system.
The parameter needs to be set before a compare is run.