Oracle GoldenGate 12.2 – Enhanced Heartbeat Table

Prior to OGG 12.2, configuration of Heartbeat table was very tedious with lots of confusion. From OGG 12.2 this has been simplified avoiding to follow huge steps which are mentioned in the DOC ID below,

Oracle GoldenGate Best Practices: Heartbeat Table for Monitoring Lag times (Doc ID 1299679.1)
http://www.ateam-oracle.com/oracle-goldengate-best-practices-heartbeat-table-for-monitoring-lag-times

You need to manually create the heartbeat tables prior to OGG 12.2 where as from OGG 12.2, you can configure heartbeat table with only a single command which is below,

ADD HEARTBEATTABLE

The above command should be issued in the GGSCI prompt. This command creates all the necessary tables, views, jobs and procedures related to the heartbeat table.

The details of the objects are below,

There are also few more parameters available which are below,

HEARTBEATTABLE

This parameter allows us to use a non-default name for the heartbeat table. The table GG_HEARTBEAT is the default name. The tables are created under the schema which is mentioned in the parameter GGSCHEMA in ./GLOBALS parameter file.

The syntax is below,

HEARTBEATTABLE schema_name heartbeat_table_name

By default, the tables are created under the schema which is mentioned in the GGSCHEMA. But you can also change the schema name using this parameter.

In the below example, I have changed the prefix of the table_name of the heartbeat table in the ./GLOBALS parameter file,

Now I am adding the heartbeat table and you could see that the tables are created with the prefix “GGHBT”.

ENABLE_HEARTBEAT_TABLE | DISABLE_HEARTBEAT_TABLE

The above parameter is used to enable or disable the heartbeat processing. This parameter is valid for GLOBALS, Extract and Replicat.

ENABLE_HEARTBEAT_TABLE
Enables Oracle GoldenGate processes to handle records from a GG_HEARTBEAT table. This is the default.

DISABLE_HEARTBEAT_TABLE
Disables Oracle GoldenGate processes from handing records from a GG_HEARTBEAT table

Note: Whenever you make some changes to the ./GLOBALS parameter file, you need to exit and relogin to the GGSCI prompt. Else the parameter which was modified in the ./GLOBALS parameter file will not be in effect.

To delete the heartbeat table, simply issue the below command.

DELETE HEARTBEATTABLE

Cheers 🙂

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *