E Best Practices
E.1 Veridata Components Proximity
For an optimal working of Oracle GoldenGate Veridata, Oracle recommends the following:
- Ensure that the Oracle GoldenGate Veridata Server and Veridata
Repository are on the same node:
The Veridata Repository stores essential data needed for Veridata to function smoothly. To ensure a fast and reliable connection between the server and the repository, place them on the same node. This helps preventing delays. However, if that is not possible for some reason then ensure that both are on nearby nodes and the network connection between them is fast. Check the time taken in connecting from server node to repository node. Time taken should be in milli seconds or lesser than that. For more information, see How to Check Connection between 2 Nodes.
- Veridata Server and Veridata Agents:
Oracle GoldenGate Veridata Server and Veridata Agents can be on different nodes/machines. If the server and agents are on different nodes/machines, then ensure that the connection between them is fast as there are bound to be several calls between server and agents. Check the connection between the Veridata server and source agent. We also need to check connection between Veridata server and target agent. For more information, For more information, see How to Check Connections between 2 Nodes.
- Veridata Agent and the corresponding database on the same node:
A large amount of data is frequently transferred between the database and the agent, so a fast connection is essential. Oracle recommends to keep the source agent and source database on the same node. Similarly, place the target agent and target database on the same node. However, if that is not possible for some reason then ensure that both are on nearby nodes and network connection between them is fast. Check the time taken in connecting from agent node to DB node. Time taken should be in milli seconds or lesser than that. For more information, see How to Check Connections between 2 Nodes.
-
Veridata Server and Sort Directory on the same node:
The server processes data in small chunks that fit into main memory, sorting them and storing them in temporary files within a designated directory called the sort directory. For optimal performance, the sort directory should be located on the same node as the server.
If not, connection time between server and sort directory should be in milli seconds or smaller than that. For more information, see How to Check Connections between 2 Nodes.
E.1.1 How to Check Connection between 2 Nodes
You can test connectivity between any two nodes or machines using these methods. For example: If you want to check the connection between the Veridata server and the source agent, then:
Call the Veridata server → node_1
Call the source agent → node_2
To Test Connectivity using Ping:
- On the node_1 open a terminal and run:
ping [node_2]
. - Replace [node_2] with the hostname or IP address of node_2.
- To measure latency and to check the speed of the connection, run ping
-c 4 [node_2]
. The following is a sample output:Success Case: PING 192.168.1.2 (192.168.1.2): 56 data bytes 64 bytes from 192.168.1.2: icmp_seq=0 ttl=64 time=0.123 ms --- 192.168.1.2 ping statistics --- 4 packets transmitted, 4 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.123/0.124/0.125/0.001 ms Note: If the time for round-trip is in range of milli seconds or less than then connection between source host target host is considered fast. Failure Case: PING 192.168.1.2 (192.168.1.2): 56 data bytes Request timeout for icmp_seq 0 --- 192.168.1.2 ping statistics --- 4 packets transmitted, 0 packets received, 100.0% packet loss
To check connectivity when Ping is not available:
- Use Telnet to check specific ports. On the node_1, run:
telnet [node_2] [port]
- Replace [node_2] with the hostname or IP address of node_2, and [port] with the specific port number. For example, 8089.
Sample Output
Success Case: Trying 192.168.1.2... Connected to 192.168.1.2. Escape character is '^]'. Failure Case: Trying 192.168.1.2... telnet: Unable to connect to remote host: Connection refused
To check connectivity when Ping is not available using Netcat (NC), On the node_1, run:
nc -zv [node_2] [port]
Sample Output
Success Case: Connection to 192.168.1.2 8089 port [tcp/*] succeeded! Failure Case: nc: connect to 192.168.1.2 port 8089 (tcp) failed: Connection refused
E.2 Veridata Server and Agent Memory
For a proper working of Oracle GoldenGate Veridata, ensure to set correct memory for Veridata Server, Veridata agents and sort directory.
E.2.1 Server Memory
E.2.1.1 How to Check Current Memory of Server?
ps aux | grep VERIDATA_server1
Review the output and locate Xms and Xmx, for example:
/java/jdk/bin/java server -Xms256m -Xmx1024m -Dweblogic.Name=VERIDATA_server1
Here Xms is the minimum heap and Xmx is the maximum heap.
E.2.1.2 What Should be the Optimum Memory for Server?
Oracle recommends that the server memory should be at least 60% of the size of the data to be compared.
E.2.1.3 How to Modify Memory for Server?
In $ORACLE_HOME/user_projects/domains/base_domain /bin/setStartupEnv.sh
file, locate the first SERVER_MEM_ARGS_64HotSpot
entry after
VERIDATA-MANAGED-SERVERS
It should be as follows:
[Line 327] # Startup parameters for STARTUP_GROUP VERIDATA-MANAGED-SERVERS
...
[Line 362] SERVER_MEM_ARGS_64HotSpot="-Xms256m -Xmx1024m"
SERVER_MEM_ARGS_64HotSpot="-Xms32g -Xmx96g"
Restart the server and ensure new Xms and Xmx values are reflected.
E.2.2 Agent Memory
How to check current memory of agent?
Locate and open agent.sh
file and check the value for
USER_MEM_ARGS
. Here, Xmx is maximum agent memory and Xms is minimum
agent memory.
What should be the optimum memory for agent?
We generally recommend that agent memory should be at least 25% of the size of the data to be compared.
How to modify the memory for agent?
Open agent.sh
file and check the value for
USER_MEM_ARGS
. By default the value will be
USER_MEM_ARGS="-Xmx1024M -Xms1024M"
.
To increase the memory, -Xmx
value should be increased.
Note:
Any configuration change needs the Agent to be restarted.E.2.2.1 How to Check Current Memory of Agent?
Locate and open agent.sh
file (in linux) and agent.bat
(in windows) and check the value for USER_MEM_ARGS
. Here Xmx is maximum
agent memory and Xms is minimum agent memory.
E.2.2.2 What Should be the Optimum Memory for Agent?
Oracle recommends that agent memory should be at least 25% of the size of the data to be compared.
E.2.2.3 How to Modify the Memory for Agent?
Open agent.sh
file (in linux) and agent.bat
(in
windows) and check the value for USER_MEM_ARGS
. By default, the value
is USER_MEM_ARGS="-Xmx1024M -Xms1024M"
.
To increase the memory, -Xmx
value should be increased.
Note:
Any configuration change requires the Agent to be restarted.E.2.3 Memory for Sorting and Sort Directory
How to calculate disk space and memory requirements for Sort Directory?
See Disk and Memory Requirements for the Server Component.
The maximum memory available to Oracle GoldenGate Veridata is set using
jvm.memory.xmx
in
<VERIDATA_HOME>/config/oggvdt_cainput.properties
.
When server-side sorting is enabled, a significant portion of this memory is used for sorting during comparisons.
The server.max_sort_memory
parameter in the
veridata.cfg
file determines the maximum sorting memory. To avoid
issues, ensure that the jvm.memory.xmx
value is higher than the sorting
memory requirements.
See Server Parameters in Administering Oracle GoldenGate Veridata.
E.3 SSL Certificate Validation
An SSL (Secure Sockets Layer) connection is a secure and encrypted communication link between a client (such as a web browser or application) and a server. It ensures that data transmitted between the two parties remains private and protected from eavesdropping, tampering, and forgery.
If SSL is enabled, then verify the validity of the certificate.
How to check if SSL is enabled?
For SSL between agent and server:
Check agent.properties
file and see the value of the following
properties: server.useSsl
. If this is set to true
,
then SSL is enabled.
For SSL between agent and database:
Check db_url
in the agent.properties
file.
If db_url
has SSL embedded in it then SSL is enabled.
How to check if SSL certificate is Valid?
Using browser
- Visit the website in question.
- Click the padlock icon in the address bar.
- Select Certificate or Connection is secure (wording varies by browser).
- View the certificate details, including:
- Issuer
- Validity period (start and expiration dates)
- Subject name (who the certificate is issued to)
- Using opensslRun the following command and examine the output for Certificate validity period and Issuer details::
openssl s_client -connect <hostname>:443 -showcerts
- Using curl:
This shows the start and expiration dates of certificate.curl -v https://<hostname> --insecure 2>&1 | grep 'start date\|expire date'
E.4 Database Permissions
In the Oracle databases, during the COOS phase, if COOS join is enabled, then a temporary table is created and deleted when the session ends. Grant the user (specified during connection setup) the privilege to create private temporary tables (PTT), as they are useful in this phase.
How to check the user?
- Click Connections and select a connection.
- Click Connection Details and then select Data Source.
Note:
Ensure that the user has ->CREATE TABLE
, CREATE TABLESPACE
,
PRIVATE TEMP TABLE
, and INSERT/UPDATE/DELETE
privileges.
E.5 Data for Comparison
Knowing what data to compare and what not to is one of the most crucial aspect of using Oracle GoldenGate Veridata the right way. This topic describes the following best practices to identify the data that should be compared.
E.5.1 Specifying Primary Key (PK) Columns
Solution - Optimizing with Key Columns
Add at least one key column or a combination of multiple key columns such that the values remain unique.
By ensuring proper key column definitions in the table, Oracle GoldenGate Veridata can perform more efficient comparisons.
To add key columns:
- In the Oracle GoldenGate Veridata UI, go to Group and Compare Pairs.
- Select Group and then click Compare Pair.
- Click the Column Mapping tab.
- Set Key Mapping Method to User Defined.
- Set one or more columns which can be set as keys during the operation.
- Click Save.
E.5.2 Partitioning
Working with large tables might impact Veridata performance so you can divide large source and target tables into smaller dataset.
It can be done using the following: Auto Partitions, Manual Row Partitions, or Table Partitioning.
Automatic Row Partitions
This option is available only for Oracle DB which can split the compare pair (tables) into the multiple parts based on the values you provide. Automatic Row Partitions can be configured while creating a compare pair. This speeds up the comparison as it will run on smaller dataset.
To configure Automatic Row Partitions:
- In the Oracle GoldenGate Veridata UI, on the Compare Pair page, click Manual Mapping, and then click Automatic Row Partition .
Manual Row Partitioning
This can be useful for manually distributing the workload across multiple
processes or restricting the comparison to a specific subset of data, such as the last n
days. Manual Row Partitioning can be useful for manually distributing the workload
across multiple processes or restricting the comparison to a specific subset of data,
such as the last n
days.
This option is available for both Oracle as well as non-Oracle databases. This can be achieved by applying a SQL Predicate and filtering the records.
- In the Compare Pair page, click Row Partitioning.
- Click + sign and enter the SQL predicate to partition the table.
Table Partitions
This option is available only for Oracle DB. If a table is created with partitions then all the partitions are listed on the page. You can select only required partitions during creation of Compare Pair.
To configure Table Partitions:
- In the Oracle GoldenGate Veridata UI, go to Group and Compare Pairs.
- Click Create, click Mapping Rules, and then select the Include Table Partitions check box.
E.5.3 Exclude Columns
- If a table contains columns that will never change.
Or
- Irrespective of the columns being in sync or not.
To exclude columns:
To add key columns:
- In the Oracle GoldenGate Veridata UI, go to Group and Compare Pairs.
- Select Group and then click Compare Pair.
- Click the Column Mapping tab.
- Click Remove mapping for the columns you want to exclude.
- Click Save.
E.5.4 Delta Comparison
Compare pairs can be configured to use delta processing, a performance feature that compares only the data blocks that have changed since the last run, instead of scanning the entire table.
Delta Comparison prevents comparing all the historical data again and again and compares only changed (delta) data.
To enable Delta Comparison:
- In the Oracle GoldenGate Veridata UI, go to Group and Compare Pairs.
- Select Group and then select a compare pair from Existing compare pair list.
- Click Delta Processing.
- In the Delta Processing tab, toggle Delta Processing.
- Select Delta Columns.
- Click Save.
E.5.4.1 Delta Column Selection
- A column that increments on every DML operation (DML - Data Manipulation Language. These operations allow you to insert, update, delete, or retrieve records from tables).
- A column with either of the following data types: number or timestamp.
- This column should not be primary key as primary key does not change on every DML operation. (It remains same for update operations).
ORA_ROWSCN
. This works best when ROWDEPENDENCIES
are enabled for table. For DBs other than Oracle, there is no default delta column.
Therefore, select a column with the properties listed in this topic.
E.5.4.2 ROWDEPENDENCIES
ROWDEPENDENCIES
are enabled when creating database tables.
How to check if ROWDEPENDENCIES are enabled for Oracle DB?
SELECT owner, table_name, dependencies FROM dba_tables;
This will return ENABLED
or DISABLED
for each table. If
you don't have access to dba_tables
, query all_tables
instead.
You cannot change this after the table has been created, therefore re create the table to set it on.
What is SCN and how to change its value?
For more information, see ROWSCN.
Why ORA_ROWSCN works best when ROWDEPENDENCIES are enabled for the table?
The SCN (System Change Number) plays a critical role in Veridata's comparison process. Here's how it impacts the comparison workflow and why enabling row dependencies is important:
- SCN Behaviour with Row Dependencies Enabled:
When row dependencies are enabled, an SCN is associated with each individual row in the database.
This ensures that only the rows that have undergone changes between the source and target are flagged for comparison.
- SCN Behaviour with Row Dependencies Disabled:
If row dependencies are not enabled, then the SCN is associated with data blocks instead of individual rows.
- Impact on Initial Comparison:
Divergence in data blocks can result in numerous false positives during the initial compare phase. The compare-out-of-sync (COOS) step will unnecessarily include additional rows for comparison, even if the data within those rows has not changed. So more data are oos.
- Why Enable Row Dependencies?
Enabling row dependencies reduces unnecessary comparisons, improving the accuracy and efficiency of the process.
Without row dependencies, the system allows rows in a diverged block to be compared, potentially increasing the workload and causing delays.
What happens when ORA_ROWSCN is used as delta column but ROWDEPENDENCIES are not enabled?
Block level comparison are used. Block-level comparison in databases refers to the process of comparing data stored in blocks or pages rather than at the individual record or row level. In this case, delta compare will be slower. It will still be faster than comparison without delta.
E.6 Profile Configurations
E.6.1 Connection Configurations
Compare Fetch Size
This configuration is useful in determining the batch size for fetching the data from database. Default value is 1000.
To speed up the compare process, the number of rows fetched from database can be increased in the connection settings by changing Compare Fetch Size. Start with 10,000 and increase up to 100,000.
To update Compare Fetch Size, from the Connections tab, open the connection that is used in the compare job and change the value of the Initial Compare Fetch Batch Size. This speeds up the fetch process during the initial comparison.
E.6.2 Sorting Configuration
Oracle recommends you to set the value of Sort Data Using to Server, as sorting done at the Oracle GoldenGate Veridata server will be faster than sorting at the Database level.
To set this sorting method:
- In the Oracle GoldenGate Veridata UI, click Profiles and select a profile.
- Click the Sorting Method tab and select Sort Data Using and select a value from the drop-down list.
E.6.3 Initial Compare Configuration
Max Concurrent Comparison Threads
This is used to run multiple compares in parallel.
When running multiple compare pairs in parallel, exceeding the machine's capacity can exhaust memory, leading to slower processing. This can be addressed by configuring the Max Concurrent Comparison Threads setting. Default value is 4.
What should be the value of Max Concurrent Comparison Threads?
Value of Max Concurrent Comparison Threads depends on the value of number of
CPU cores
in Veridata server node. Start with 30-40% of the CPU core
and it can be increased up to the number of cores.
To change the value of Max Concurrent Comparison Threads
- In the Oracle GoldenGate Veridata UI, click Profiles and select a profile.
- Click the Initial Compare tab and select Max Concurrent Comparison Threads. Maximum value for this field is 100 and minimum value is 1.
Source and Target Optimizer Hint
In Oracle, the optimizer hint is used to enable parallel execution for a specific table or query operation. An optimizer hint can be used to increase the processing of the queries.
For example, PARALLEL(x,16)
tells Oracle to execute operations on
the table x using 16 parallel execution threads (or degrees of parallelism -
DOP).
To set the Optimizer hint:
- In the Oracle GoldenGate Veridata UI, click Profiles and select a profile.
- Click the Initial Compare tab and select Source Oracle
Optimizer Hint and Target Oracle Optimizer Hint.
Note:
Parallel running is beneficial for large tables but can increase system resource usage.
E.6.4 Out-of-Sync Configuration
Confirm-Out-Of-Sync(COOS) Batch Size
This setting enables fetching data in batches instead of fetching individual rows and making lot of round trips to the database.
To update coos batch size
- In the Oracle GoldenGate Veridata UI, click Profiles and select a profile.
- Click the Confirm-Out-Of-Sync tab and select
Confirm-Out-Of-Sync Batch Size and select a value from the drop-down
list.
Note:
The default value is 1000. Maximum value for this field is 100,000 and minimum value is 1. Start with 10,000 and increase up to 100,000.
Source and Target Optimizer Hint
To set the Optimizer hint:
- In the Oracle GoldenGate Veridata UI, click Profiles and select a profile.
- Click the Confirm-Out-Of-Sync tab and select Source Oracle Optimizer Hint and Target Oracle Optimizer Hint.
E.6.5 Repair Configuration
Repair Batch Size
This setting enables repairing data in batches instead of individual rows and making lot of round trips to the database.This can be set from profiles. The default value is 1000. Maximum value for this field is 100000 and the minimum value is 1.
To set the Repair Batch Size:
- In the Oracle GoldenGate Veridata UI, click Profiles and select a profile.
- Click the Repair tab and select Repair Batch Size.
Number of Concurrent Repair Operations
To run repair concurrently, you can use this setting. The default value for this is 1. However, this can be increased to perform a repair in parallel.
To set the Number of Concurrent Repair Operations:
- In the Oracle GoldenGate Veridata UI, click Profiles and select a profile.
- Click the Repair tab and select Number of Concurrent Repair Operations.
E.6.6 Possible Configurations from the veridata.cfg File
The veridata.cfg
file is located here:
<VERIDATA_HOME>/config/veridata
folder. It stores many
configurations that are needed to run and customise Veridata operations.
Coos
join:This is enabled by default for table with no unique or primary key and the behaviour can be overridden from the
veridata.cfg
file in the<VERIDATA_HOME>/config/veridata
folder.With this configuration, the database queries will use join and will be a lot faster compared to queries without join.
You need to add/edit the following properties:
coos.join.strategy
=Values nokey
,always
, andnever
nokey
- This is the default value of the field and it is useful on the tables that do not have primary key/indexes defined.always
– Always use COOS join.never
- Don't use COOS Join.
server.concurrent.writers
: The number of writer threads per sort directory.server.concurrent.readers
: The number of reader threads for entire server.server.number_sort_threads
: The number of threads used to sort input buffers from the agent. Should not be larger than number of available processes.
E.6.7 Possible Configurations from the agent.properties File
E.6.7.1 Coos Batch Fetch
Using COOS batch, Oracle GoldenGate Veridata can be leveraged to perform fetch on the agents as batches instead of running individual queries. This in turn saves a lot of database trips and hence will be faster.
Adding coos batch fetch in agent.properties
To enable this, add the following property to the
agent.properties
file for both the agents and restart the
agents:coos.batch.fetch=true
Note:
Do not use COOS join and COOS batch at the same time. Use either of them at a time.E.6.7.2 ROWSCN
This step is useful when customer wants to skip full table comparison and want to compare data after a particular SCN value.
What is SCN?
In a database, a System Change Number (SCN) is a logical, internal, and monotonically increasing number used to track changes made to the database. Each committed transaction in the database is assigned a unique SCN that represents the point in time when the transaction was committed.
If the current SCN value is 100, then designate the rowscn
value to 100, then the comparison omits those records with that specific SCN value. This
property can be added in agent.properties
. For more information,
see Frequently Asked Questions (FAQ).
rowscn=10000
After adding this for both the agents, restart both agents and run the comparison again.
E.6.8 Frequently Asked Questions (FAQ)
What is a sort directory?
In the sorting phase, chunks of data small enough to fit in main memory are read, sorted, and written out to a temporary file in a directory.
How to find a sort directory?
This can be found from profile setting page under Sorting Method.
- Go to Profiles, Select Profile, and click Sorting method
- Select Temporary Storage Directory for Source Data and click Temporary Storage Directory for Target Data.
What is Agent Properties file location?
This can be found in <agent_home>
path with name
agent.properties
.
Where is Veridata server config file present?
<VERIDATA_HOME>/config/veridata/veridata.cfg
Where is oggvdt_cainput.properties file present?
<VERIDATA_HOME>/config/oggvdt_cainput.properties
Where to find the Reports?
Reports are present in path:
<VERIDATA_HOME>/veridata/reports
Can we have multiple agents for 1 DB?
Yes. But we recommend 1 agent for 1 DB.
How many Compare pairs I can create in a group?
No restriction on this. Any number is fine.
How many Compare pairs I can run in parallel?
100 is the max default number. But it can be updated from veridata.cfg
file by changing the value of max_concurrent_jobs
.