Oracle GoldenGate tokens are
attributes to stores environment variable values, which are
available on the header of trail record header. Using Oracle
GoldenGate built-in function
@token within the
parameter files retrieves the token value.
Table 1-6 lists pre-defined
Oracle GoldenGate tokens.
Token
Name
|
Description
|
TK_HOST
|
Stores the host name
|
TK_GROUP
|
Stores the operating system group
name
|
TK_OSUSER
|
Stores the operating system user name
|
TK_DOMAIN
|
Stores the hostname domain
|
TK_COMMIT_TS
|
Stores the current commit transaction sequence
number
|
TK_POS
|
Stores the current read position
|
TK_RBA
|
Stores the relative byte address (RBA)
|
TK_TABLE
|
Stores the table name
|
TK_OPTYPE
|
Stores the operation types (INSERT, UPDATE, DELETE
or DDL)
|
Table 1-6: Oracle GoldenGate
pre-defined tokens
Another type of token is
user-token. These are defined on the source system and moved
to target system for event handling, providing extendibility
for attributes that are not pre-defined by Oracle
GoldenGate.
The replicate
rs1e201 parameter
file illustrates a basic implementation of token by
associating each row with Oracle GoldenGate environment
pre-defined tokens values that can be used by other
applications, such as auditing.
Name
Null?
Type
----------------------------------
-------- ---------
CUST_NO
NOT
NULL NUMBER
CUST_NAME
NOT
NULL VARCHAR2(128)
CUST_EMAIL
NOT NULL VARCHAR2(400)
CUST_MOBILE
NOT NULL
VARCHAR2(16)
CUST_ADDR
VARCHAR2(128)
HOST
VARCHAR2(128)
GG_GROUP
VARCHAR2(128)
OSUSER
VARCHAR2(128)
DOMAIN
VARCHAR2(128)
BA_IND
VARCHAR2(128)
COMMIT_TS
VARCHAR2(128)
POS
VARCHAR2(128)
RBA
VARCHAR2(128)
TABLENAME
VARCHAR2(128)
OPTYPE
VARCHAR2(128)
REPLICAT rs1e201
SETENV (ORACLE_SID=T1C1)
SETENV
(NLS_LANG=AMERICAN_AMERICA.AL32UTF8)
USERID ggs_admin@T1C1, PASSWORD
oracle
DISCARDFILE ./dirrpt/rs1e201.dsc,
PURGE
SOURCEDEFS ./dirdef/oracle.def
MAP osm$repapi.customers, TARGET
osm$repapi.customers, &
COLMAP (USEDEFAULTS,
cust_addr = cust_address,
host
= @TOKEN ('TK_HOST'),
gg_group
= @TOKEN ('TK_GROUP'),
osuser
= @TOKEN ('TK_OSUSER'),
domain
= @TOKEN ('TK_DOMAIN'),
ba_ind
= @TOKEN ('TK_BA_IND'),
commit_ts = @TOKEN ('TK_COMMIT_TS'),
pos
= @TOKEN ('TK_POS'),
rba
= @TOKEN ('TK_RBA'),
tablename = @TOKEN ('TK_TABLE'),
optype
= @TOKEN ('TK_OPTYPE'));
MAP osm$repapi.policies, TARGET
osm$repapi.policies;
Refer to chapter 10 to learn
about advanced implementation of how to store environment
variable into Oracle database instance memory, SGA.
|
|
|
Oracle GoldenGate 12c
The above is an excerpt from the upcoming
12c book
Oracle GoldenGate 12c: A Hands-on Guide to Data
Replication & Integration using Oracle & SQL Server.
|
|
|
|
Burleson is the American Team
Note:
This Oracle
documentation was created as a support and Oracle training reference for use by our
DBA performance tuning consulting professionals.
Feel free to ask questions on our
Oracle forum.
Verify
experience!
Anyone
considering using the services of an Oracle support expert should
independently investigate their credentials and experience, and not rely on
advertisements and self-proclaimed expertise. All legitimate Oracle experts
publish
their Oracle
qualifications.
Errata?
Oracle technology is changing and we
strive to update our BC Oracle support information. If you find an error
or have a suggestion for improving our content, we would appreciate your
feedback. Just
e-mail:
and include the URL for the page.
Copyright © 1996 - 2020
All rights reserved by
Burleson
Oracle ®
is the registered trademark of Oracle Corporation.
|
|