A, 初始数据装载阶段: 此阶段,extract进程主要从source的数据表,抽取数据
Oracle GoldenGate supports up to 5,000 concurrent Extract and
Replicat processes per instance of Oracle GoldenGate. Each Extract and Replicat
process needs approximately 25-55 MB of memory, or more depending on the size of
the transactions and the number of concurrent transactions.
Non-supported Oracle data types
Oracle GoldenGate does not support the following data types.
■ Abstract data types (ADT) with scalar, LOBs, VARRAYS, nested tables, and/or REFs
■ ANYDATA
■ ANYDATASET
■ ANYTYPE
■ BFILE
■ ORDDICOM
■ TIMEZONE_ABBR
■ URITYPE
■ UROWID
See additional exclusions in the Limitations of support sections in "Summary
Tables, views, and materialized views
Oracle GoldenGate supports the following DML operations made to regular tables,
index-organized tables, clustered tables, and materialized views.
■ INSERT
■ UPDATE
■ DELETE
■ Associated transaction control operations
Oracle GoldenGate supports tables that contain only one column, except when the
column contains one of the following data types:
– LOB
– LONG
– Nested table
– User defined data type
– VARRAY
– XML
Oracle GoldenGate supports tables with these partitioning attributes:
– Range partitioning
– Hash Partitioning
– Interval Partitioning
– System Partitioning
– Composite Partitioning
– Virtual Column-Based Partitioning
– Reference Partitioning
– List Partitioning
Oracle GoldenGate supports tables with virtual columns, but does not capture
change data for these columns or apply change data to them: The database does
not write virtual columns to the transaction log, and the Oracle database does
permit DML on virtual columns.
Oracle GoldenGate supports replication to and from Oracle Exadata
Specifying Oracle variables on UNIX and Linux systems
If there is one instance of Oracle on the system, set ORACLE_HOME and ORACLE_SID at the
system level. If you cannot set them that way, use the following SETENV statements in
the parameter file of every Extract and Replicat group that will be connecting to the
instance. The SETENV parameters override the system settings and allow the Oracle
GoldenGate process to set the variables at the session level when it connects to the
database.
SETENV (ORACLE_HOME = “path to Oracle home location”)
SETENV (ORACLE_SID = “SID”)
If there are multiple Oracle instances on the system with Extract and Replicat
processes connecting to them, you will need to use a SETENV statement in the
parameter file of each process group and point it to the correct instance. For example,
the following shows parameter files for two Extract groups, each capturing from a
different Oracle instance.
Group 1:
EXTRACT ora9a
SETENV (ORACLE_HOME = “/home/oracle/ora/product”)
SETENV (ORACLE_SID = “oraa”)
USERID ggsa, PASSWORD ggsa
RMTHOST sysb
RMTTRAIL /home/ggs/dirdat/rt
TABLE hr.emp;
TABLE hr.salary;
Group 2:
EXTRACT orab
SETENV (ORACLE_HOME = “/home/oracle/ora/product”)
SETENV (ORACLE_SID = “orab”)
USERID ggsb, PASSWORD ggsb
RMTHOST sysb
RMTTRAIL /home/ggs/dirdat/st
TABLE fin.sales;
TABLE fin.cust;
MGR:
PORT 7809
DYNAMICPORTLIST 7810-7820, 7830
AUTOSTART ER t*
AUTORESTART ER t*, RETRIES 4, WAITMINUTES 4
STARTUPVALIDATIONDELAY 5
PURGEOLDEXTRACTS /ogg/dirdat/tt*, USECHECKPOINTS, MINKEEPHOURS 2
1. In GGSCI on the source system, create the Extract parameter file.
EDIT PARAMS name
Where: name is the name of the primary Extract.
2. Enter the Extract parameters in the order shown, starting a new line for each
parameter statement. Examples are provided for classic and integrated capture.
Your input variables will be different. See Table 4–2 for descriptions.
Basic parameters for the primary Extract group in classic capture mode:
EXTRACT finance
USERID ogg,
PASSWORD AACAAAAAAAAAAAJAUEUGODSCVGJEEIUGKJDJTFNDKEJFFFTC &
AES128, ENCRYPTKEY securekey1
ENCRYPTTRAIL AES192, KEYNAME mykey1
EXTTRAIL /ggs/dirdat/lt
SEQUENCE hr.employees_seq;
TABLE hr.*;
Basic parameters for the primary Extract group in integrated capture mode
where the source database is the mining database:
EXTRACT financep
USERID ogg, &
PASSWORD AACAAAAAAAAAAAJAUEUGODSCVGJEEIUGKJDJTFNDKEJFFFTC &
AES128, ENCRYPTKEY securekey1
ENCRYPTTRAIL AES192, KEYNAME mykey1
EXTTRAIL /ggs/dirdat/lt
SEQUENCE hr.employees_seq;
TABLE hr.*;
Basic parameters for the primary Extract group in integrated capture mode
where the mining database is a downstream database:
EXTRACT financep
USERID ogg, PASSWORD AACAAAAAAAAAAAJAUEUGODSCVGJEEIUGKJDJTFNDKEJFFFTC &
AES128, ENCRYPTKEY securekey1
TRANLOGOPTIONS [MININGUSER oggm, &
MININGPASSWORD AACAAAAAAAAAAAJAUEUGODSCVGJEEIUGKJDJTFNDKEJFFFTC &
AES128, ENCRYPTKEY securekey1]
TRANLOGOPTIONS INTEGRATEDPARAMS (MAX_SGA_SIZE 164, &
DOWNSTREAM_REAL_TIME_MINE y)
ENCRYPTTRAIL AES192, KEYNAME mykey1
EXTTRAIL /ggs/dirdat/lt
SEQUENCE hr.employees_seq;
TABLE hr.*;
Configuring the data pump
These steps configure the data pump that reads the local trail and sends the data
across the network to a remote trail.
1. In GGSCI on the source system, create the data-pump parameter file.
EDIT PARAMS name
Where: name is the name of the data pump Extract.
2. Enter the data-pump parameters in the order shown, starting a new line for each
parameter statement. Your input variables will be different. See Table 4–3 for
descriptions.
Basic parameters for the data-pump Extract group:
EXTRACT extpump
USERID ogg, PASSWORD AACAAAAAAAAAAAJAUEUGODSCVGJEEIUGKJDJTFNDKEJFFFTC &
AES128, ENCRYPTKEY securekey1
DECRYPTTRAIL AES192, KEYNAME mykey1
RMTHOST fin1, MGRPORT 7809 ENCRYPT AES192, KEYNAME securekey2
ENCRYPTTRAIL AES192, KEYNAME mykey1
RMTTRAIL /ggs/dirdat/rt
SEQUENCE hr.employees_seq;
TABLE hr.*;
Configuring Replicat for change delivery
1. From the Oracle GoldenGate directory on the target, run GGSCI and issue the
DBLOGIN command to log into the target database.
DBLOGIN, USERID db_user [, PASSWORD pw [encryption options]]
2. In GGSCI, create the checkpoint table in a schema of your choice (ideally
dedicated to Oracle GoldenGate).
ADD CHECKPOINTTABLE owner.table
4.9.1.2 Specifying the checkpoint table in the Oracle GoldenGate configuration
1. Create a GLOBALS file (or edit the existing one).
EDIT PARAMS ./GLOBALS
2. In the GLOBALS file, enter the CHECKPOINTTABLE parameter.
CHECKPOINTTABLE owner.table
Where: owner.table is the owner and a name that is supported by the database.
3. Save and close the GLOBALS file.
4.9.2 Configuring Replicat
These steps configure the Replicat process in a basic way without any special mapping
or conversion of the data. For more advanced mapping options, see the Oracle
GoldenGate Windows and UNIX Administrator's Guide.
1. In GGSCI on the target system, create the Replicat parameter file.
EDIT PARAMS name
Where: name is the name of the Replicat group.
2. Enter the Replicat parameters in the order shown, starting a new line for each
parameter statement. See Table 4–4 for descriptions.
REPLICAT financer
USERID ogg, PASSWORD AACAAAAAAAAAAAJAUEUGODSCVGJEEIUGKJDJTFNDKEJFFFTC &
AES128, ENCRYPTKEY securekey1
-- SUPPRESSTRIGGERS is for Oracle 10.2.0.5 & later patches, and
-- for Oracle 11.2.0.2 and later 11gR2 versions
-- See following "Note" for how SUPPRESSTRIGGERS works.
DBOPTIONS SUPPRESSTRIGGERS
DECRYPTTRAIL AES192, KEYNAME mykey1
ASSUMETARGETDEFS
DISCARDFILE /users/ogg/disc
MAP hr.*, TARGET hr2.*;
By default, one integrated capture Extract requests the logmining server to run with
max_sga_size of 1GB and a parallelism of 2. Thus, if you are running three Extracts
in integrated capture mode in the same database instance, you need at least 3 GB of
memory allocated to the Streams pool. As best practice, keep 25 percent of the Streams
pool available. For example, if there are three Extracts in integrated capture mode, set
streams_pool_size to the following:
3 GB + (3 GB * 0.25) = 3.75 GB
Setting NLS_LANG with SETENV
These instructions set NLS_LANG from the Replicat parameter file.
1. Use the following syntax to set NLS_LANG with the SETENV parameter.
SETENV (NLS_LANG = NLS_LANGUAGE_NLS_TERRITORY.NLS_CHARACTERSET)
The following is an example from the UNIX platform:
SETENV (NLS_LANG = “AMERICAN_AMERICA.AL32UTF8”)