Before running the compare or repair commands during Oracle to Oracle replication, review these guidelines.
- All of the SharePlex processes (Capture, Read, Export, Import, Post) must be running when you run a comparison or repair command.
- The tables that you want to compare or repair must be part of an active configuration file.
- Uncommitted transactions on a source table prevent the compare and repair processes from obtaining the brief locks they need to obtain read consistency. Make certain that all transactions are committed before you run a comparison or repair.
- If a table is large, it will probably need to be sorted in the TEMP tablespace. Before running the compare or repair commands, the TEMP tablespace may need to be made larger. The size depends on the setting of the SP_DEQ_THREADS parameter or the threads option within the command syntax, both of which controls the number of processing threads used by SharePlex on the target. Each thread processes a table. At the default of two threads, the size of the tablespace should be larger than the sum of the sizes of the two largest tables. If you set the number of threads higher, then increase the size of the tablespace to accommodate a proportionate number of the largest tables. However,
- The UNDO tablespace may also need to be increased. Based on transaction volume and the length of time it takes to compare the largest table, increase the size of the UNDO tablespace and increase the undo_retention database parameter to avoid an ORA-1555 Snapshot too old error. Tables with LOBs take much longer to compare or repair than tables without them.
Before running the compare or repair commands during PostgreSQL to PostgreSQL replication, review these guidelines.
- All of the SharePlex processes (Capture, Read, Export, Import, Post) must be running when you run a comparison or repair command.
- The tables that you want to compare or repair must be part of an active configuration file.
- Uncommitted transactions on a source table prevent the compare and repair processes from obtaining the brief locks they need to obtain read consistency. Make certain that all transactions are committed before you run a comparison or repair.
-
If the size of a table row (sum of data in each column) is large, it will likely require more memory, as the PostgreSQL database posts table data to the calling process that invokes the SELECT query. Before running the compare or repair commands, ensure that sufficient memory is available. The size depends on the setting of the SP_DEQ_THREADS parameter or the threads option within the command syntax, and the SP_DEQ_MALLOC value, which determines how many tables are processed at a time and the memory allocated for each thread. The value assigned to the SP_DEQ_MALLOC parameter is divided among the number of running threads.
Compare and repair parameters:
The following are commonly modified compare and repair parameters. Do not increase the values unless necessary. For details about these parameters, see their documentation in the SharePlex Reference Guide.
Parameter | Description |
---|---|
SP_DEQ_MALLOC |
This parameter controls the fetch batch size. The batch size controls the number of rows that SharePlex selects at once for comparison. Larger batch sizes increase processing speed but require more memory. The value is divided equally by the number of compare threads to be used, and then the batch size is recalculated based on all column sizes added together. |
SP_DEQ_PARRALLISM |
This parameter manages the select statement Degree of Parallelism hint. The parallelism option of the command overrides this setting. |
SP_DEQ_PART_TABLE_UPDATE | This parameter controls how the repair commands work on Oracle partitioned tables, depending on whether row movement is possible. |
SP_DEQ_PG_DECLARE_FETCH_SIZE |
This parameter determines whether the driver attempts to return a result set in a single fetch or across multiple fetches. This parameter is applicable only for PostgreSQL database. |
SP_DEQ_READ_BUFFER_SIZE | This parameter controls the size of the buffer that holds fetched LONG and LOB data and can be adjusted based on available system memory. |
SP_DEQ_ROW_LOCK_THRESHOLD | This parameter sets a threshold that controls whether SharePlex uses row-level or table-level locking when a WHERE option is used. |
SP_DEQ_SKIP_LOB |
This parameter determines whether or not LOBs are included in the compare/repair processing.
Set this parameter on the source system. |
SP_DEQ_TIMEOUT | This parameter sets a queue backlog threshold. High backlogs delay the establishment of a connection between the source and target compare/repair processes. If the backlog meets or exceeds this value, any compare or repair command that is issued on the source will exit and return an error. If this happens, consider running the compare or repair when the system is less busy. |
SP_DEQ_ORA_DATE_FORMAT |
Set the parameter to 1 at both the Oracle source and PostgreSQL target when you have the Oracle DATE data type mapped to the PostgreSQL TIMESTAMP(0) data type, as the Oracle DATE can store the timestamp portion. In this case, values will be read in the 'YYYY-MM-DD HH24:MI' format. Set the parameter to 0 when you have the Oracle Date data type mapped to the PostgreSQL DATE data type, as only the date portion is stored by PostgreSQL. In this case, values will be read in the 'YYYY-MM-DD' format from the Oracle database, and the timestamp portion will be skipped during the compare/repair process. |
SP_DEQ_ORA_NLS_LANG | This parameter value is used to set the correct NLS_LANG for Oracle DB login, ensuring that data is fetched in the expected character set encoding. |