With data replication in place, you expect systems to be in sync, but are they? How do you find out? And if they are not in sync, what operations were performed recently that may have caused the systems to go out of sync?
To identify whether your data is in sync, HVR provides a Compare capability. Like Refresh and ongoing data replication, the Compare capability is based on the Channel Definition. (i.e. any transformations as part of the Channel Definition are taken into consideration when you compare the data)
For the purpose of the Test Drive, we have you perform a Bulk Compare between your Oracle source, and MariaDB and PostgreSQL targets:
1. To compare the data for the orcl2mdbpg Channel, navigate to the Channel Definition orcl2mdbpg, and use the context menu anywhere within the Channel Definition to select HVR Compare.
2. At the top left, select Location: orcl.
3. At the top right select both Locations, mdb and pg.
4. Keep the default with all tables selected.
5. Below the table selector, leave the default set to Bulk Granularity.
6. Set Parallelism for Locations to 3.
7. Set Parallelism for Sessions to 3.
8. Click Compare at the bottom of the dialog to start an interactive comparison.
There are two modes to compare the data:
HVR supports Compare between databases in a heterogeneous setup, as well as between a database and a file system like S3, HDFS, or one of the Azure data stores.
In all likelihood the result of this comparison, which takes a few seconds to compute, will show differences. Some tables will likely come out as identical, but others will be different. Notice that some tables are reported as different despite having identical row counts, while others have a different row count and are, of course, reported as different.
The reason for all of these differences is most likely in-flight changes that are not accounted for during the Bulk Compare. HVR can take in-flight changes into account during a Row-wise Compare. Close the Compare Results dialog but leave the Compare dialog open to make changes to the Compare run.
1. On the Options tab below the table selector, switch to Row by Row Granularity. Notice that as you switch, the option for Online Compare becomes enabled.
2. Change the option Parallelism for Locations back to None.
3. Select the option Online Compare and leave the default Compare tables once and combine differences with captured transactions selected.
This default method for Online Compare is fastest and most accurate, but only available if HVR is used to replicate the changes. I.e. you can also use HVR to compare data for environments that do not use HVR to replicate changes!
4. Switch to the Scheduling tab, and choose the option Generate Compare Event. Leave the default Start Immediately. (Live Compare is only available through events and not as an interactive option.)
5. Click Compare to start the run.
Notice that this Compare run starts the browser and you can see the Compare results being populated in real-time as the run progresses. This run will of course take a bit longer because (1) data must be sorted and transferred to the target, and (2) following an initial Compare, the identified differences have to be reconciled with transaction files during the Compare run to identify whether systems are exactly in sync.
6. If all is well, your systems should now be in sync. Navigate into the details of the jobs to verify this.
7. Close the browser window.
HVR Compare has lots of capabilities that are identical to HVR Refresh capabilities. The Scheduling tab provides options like scheduling and slicing, and the Contexts tab provides options identical to the options available on the Contexts tab for HVR Refresh.
Close the HVR Compare dialog.
You also validated whether the databases are truly in sync and saw that along the way, HVR diligently kept an audit log of the operations you performed as you were making changes to the setup and implemented data replication.
You may now show what you achieved in this trial to your co-workers, play around with this setup for the remaining allocated time that this trial is available to you.