User tokens

User tokens are GoldenGate environment variables that are captured and stored in the trail record for replication. They can be accessed via the @GETENV function, which we discussed in the Using and defining macros section. We can use token data in column maps, stored procedures called by SQLEXEC, and, of course, in macros.

Using user tokens to populate a heartbeat table

A vast array of user tokens exist in GoldenGate. Let's start by looking at a common method of replicating system information to populate a heartbeat table that can be used to monitor performance. We can use the TOKENS option of the Extract TABLE parameter to define a user token and associate it with the GoldenGate environment data.

The following Extract configuration code ...

Get Oracle GoldenGate 12c Implementer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.