6 Using the Flat File Adapter

This chapter discusses how to manage on-going operation of your system by managing file rollover, gathering statistics on your Oracle GoldenGate adapter instance to help you tune your system, managing the processes, and handling errors.

This chapter includes the following sections:

6.1 Working with Control Files

Control files store information on which data files have rolled over. If the control file exists, it will be appended to; if it does not exist it will be created. For writers that output all data to one file, a single control file will be created. If the writer is outputting to one file per table or operation type, a control file will also be created per table or operation type.

The generation of a control file, its output directory, prefix, and extension are controlled by the properties defined in Output File Properties.

Each control file contains a comma-delimited list of data files that have been rolled over since the control file was created. The files are listed in the order they were rolled over. This allows data integration tools to ensure that data files are read in the correct order and that they have all been consumed.

6.2 Working with Statistical Summaries

Summary statistics about the data production process can be collected. This statistical summary information can be written to the Oracle GoldenGate report file or individual summary files.

When writing to the report file, the user can decide if this information should be written when files are rolled over, or periodically based on a time period. Information written to the report file is output in a standard fashion, and contains total records, totals for each database operation type, deltas since the last report, rate information, and detail information for each table.

When writing to individual summary files, a file is created for each rolled-over file. The statistical information for the rolled-over file is listed separated by a delimiter. The extension of the summary file, the data to be output, data delimiter, and line delimiter can all be controlled.

Statistics and Reporting, contains detailed property information about statistics and summary files.

6.3 Managing Oracle GoldenGate processes

The processes involved in a typical data integration solution include:

  • A primary Extract process, capturing transactional data from the source database

  • A PASSTHRU data pump Extract moving the captured transactional data across the network from the source database machine to the data integration machine

  • A delivery data pump Extract configured to run the user exit

Typically, the original capture and PASSTHRU data pump are part of one Oracle GoldenGate installation and the delivery data pump is part of a second installation. Both of these installations will also need to have an Oracle GoldenGate Manager process running.

Processes within these installations are managed through the Oracle GoldenGate GGSCI command line with simple commands like start and stop. Full details of managing these processes and their configuration can be found in the Oracle GoldenGate Administrator's Guide.

6.4 Trail Recovery Mode

The RECOVERYOPTIONS Extract parameter determines the restart behavior of an Extract that abends while writing to a trail. APPENDMODE is the default for release 10 trails and later. When an abended Extract restarts in append mode, it writes a recovery marker to the trail followed by the entire transaction that was interrupted.

When the Oracle GoldenGate Flat File Adapter file writer reads this trail, it receives the partial transaction followed by the recovery marker indicating the partial transaction should be discarded. The file writer then repositions itself in the output file to the beginning of the partial transaction and overwrites it with the next transaction from the trail file.

6.5 Locating Error Messages

There are three types of errors that may occur in the operation of the Oracle GoldenGate for Flat File:

  1. The Extract process running the user exit does not start
  2. The process starts, but abends at some point later
  3. The process runs successfully, but the data is incorrect or non-existent

In the first two cases, there are a number of places to look for error messages:

  • The standard ggserr.log file, which contains basic information about Oracle GoldenGate processes, their run history and a brief error message if any error occurred.

  • The Oracle GoldenGate report file for the Extract process running the user exit, found in the dirrpt subdirectory. For example, if the process name is ffwriter, the report file would be ffwriter.rpt. This may contain more detailed information about the error, especially if it is a problem in the Oracle GoldenGate core product rather than the user exit.

  • In the user exits log file, the name of which depends on the log.logname property. If this file does not exist, the user exit most likely did not start up and the report file should help isolate that problem.

Troubleshooting the Flat File Adapter contains more information on error handling.