Positioning Extract to a Specific Start Point

You can position the Extract to a specific start point in the transaction logs using the ADD/ALTER EXTRACT commands:

{ADD | ALTER EXTRACT} group, LOGNUM log_num, LOGPOS log_pos

  • group is the name of the Oracle GoldenGate Extract group for which the start position is required.

  • LOGNUM is the log file number. For example, if the required log file name is test.000034, the LOGNUM value is 34. Extract will search for this log file.

    Note:

    In Microservices Architecture, ADD EXTRACT will fail if the LOGNUM value contains zeroes preceding the value. For example, ADD EXTRACT ext1, TRANLOG, LOGNUM 000001, LOGPOS 0 will fail. Instead, set LOGNUM to 1 for this example to succeed.
  • LOGPOS is an event offset value within the log file that identifies a specific transaction record. Event offset values are stored in the header section of a log record. To position at the beginning of a binlog file, set the LOGPOS as 0.

In MySQL logs, an event offset value can be unique only within a given binary file. The combination of the position value and a log number will uniquely identify a transaction record. Maximum Log number length is 8 bytes unsigned integer and Maximum Log offset length is 8 bytes unsigned integer. Log number and Log offset are separated by a pipe (‘|’) delimiter. Transactional records available after this position within the specified log will be captured by Extract. In addition, you can position an Extract using a timestamp.

Initial Positioning Support for GTID-based Extract for MySQL

MySQL Extract supports initial positioning by GTID set in addition to positioning by timestamp, EOL, and log number or log position. The following MySQL database versions and services support this feature:
  • MySQL Server 5.7

  • MySQL Server 8.0

  • MySQL Database Service (MDS)

In Oracle GoldenGate, 64 KB is the maximum supported size of GTID set as a position by option. In case, the size of the GTID set exceeds the specified size, use the extended checkpoint file to add or alter Extract by GTID set. For more details, see

The syntax of the ADD/ALTER EXTRACT command with position by option as GTIDSET is:

{ADD | ALTER EXTRACT} group, TRANLOG, GTIDSET gtid-set

The following examples list the use of GTIDSET for initial positioning of GTID-based Extract:

{ADD | ALTER EXTRACT} group, TRANLOG, GTIDSET "E11FA47-71CA-11E1-9E33-C80AA9429562:4"
{ADD | ALTER EXTRACT} group, TRANLOG, GTIDSET "3E11FA47-71CA-11E1-9E33-C80AA9429562:1-10"
{ADD | ALTER EXTRACT} group, TRANLOG, GTIDSET "3E11FA47-71CA-11E1-9E33-C80AA9429562:1-3:11:47-49"
{ADD | ALTER EXTRACT} group, TRANLOG, GTIDSET "2174B383-5441-11E8-B90A-C80AA9429562:1-3,24DA167-0C0C-11E8-8442-00059A3C7B00:1-19"