Oracle GoldenGate Veridata is more flexible allowing the users to choose what data must be compared. It is not necessary to always perform a full comparison of a table.
For example, if the size of the table is in TBs, then it will take time to compare the entire data of the table and it would be difficult to compare them daily.
To overcome this issue, we have a feature called “Delta Comparison”. To know more about it, please refer to the below link,
Oracle GoldenGate Veridata Delta Comparison
However, you can compare data of the tables using SCN in Veridata.
In this article, I will explain on how to perform comparison based on the SCN.
We have two options available which are below,
-
(a) Compare Data using SCN
(b) Compare Data After SCN
To Compare Data using SCN
It is not that, you need to compare the full table data always. Veridata provides the user with the flexibility where a set of data based on the SCN can be fetched and compared.
In order to do this, under the “Groups & Compare Pairs”, select any of the Compare Pair and you will be taken to the Compare Pair Details. Under this, you will see the “Row Partitioning” option.
Groups and Compare Pairs -> Compare Pairs Details -> Row Partitioning
Simply toggle on the toggle button for both Source Partition and Target Partition.
Now, you can provide the SCN in the SQL Predicate. Click on the “+” button and you will “SQL Predicate” option opens up where you can provide the SCN details like below.
The SCN should be taken from both the Source and Target databases.
For example,
ORA_ROWSCN <= 12345
The data will be fetched till the SCN 12345
ORA_ROWSCN >= 12345
The data will fetched from the SCN 12345
Here, the SCN provided is 12345 and the data will be fetched from the table till the SCN 12345 for comparison. However, it is a manual approach and has to be set in each Compare Pair (each table comparison).
Compare Data After SCN
For any Delta comparison, the first step is to perform a full comparison of the table, which we refer to as the “Initial Full Compare.” The “Compare Data After SCN” option is primarily used for data validation after migrations.
During migrations, we take a consistent backup of the Source/Primary database and restore it on the Target database. Following the restore, replication between the two databases is initiated.
Since the data will be in sync between the source and target up to a specific SCN, there is no need to compare this data again.
However, for Delta comparison, the prerequisite is still to conduct the initial full comparison. To avoid performing the full comparison, you can use the “Compare Data After SCN” option instead.
This can be achieved by adding the below parameter in agent.properties file.
#This will be used if initial delta comparison has to be skipped. Only the rows greater than the given SCN value will be compared.
#rowscn = scn number
The data after the SCN mentioned will be fetched and compared.
For example,
rowscn = 12345
Here, the data after the SCN 12345 will be fetched for comparison.
Cheers 🙂