网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

OracleGoldenGate官档知识

Oracle GoldenGate 下载:
http://www.oracle.com/technetwork/cn/middleware/goldengate/downloads/index.html

官网安装文档:
Oracle GoldenGate 12c (12.2.0.1):
http://docs.oracle.com/goldengate/c1221/gg-winux/index.html

Fusion Middleware Installing and Configuring Oracle GoldenGate for Oracle Database:
https://docs.oracle.com/goldengate/c1221/gg-winux/GIORA/GUID-3108B63B-F2A2-446E-8006-D685C8E9B3A3.htm#GIORA110

Fusion Middleware Oracle GoldenGate Release Notes for Windows and UNIX
:https://docs.oracle.com/goldengate/c1221/gg-winux/GRLWU/index.html

=================================
Oracle Fusion Middleware Installing and Configuring Oracle GoldenGate for Oracle Database

    Preface
    System Requirements and Preinstallation Instructions
    Installing Oracle GoldenGate
    Preparing the Database for Oracle GoldenGate
    Establishing Oracle GoldenGate Credentials
    Choosing Capture and Apply Modes
    Configuring Oracle GoldenGate in a Multitenant Container Database
    Configuring Capture in Integrated Mode
    Configuring Capture in Classic Mode
    Configuring Oracle GoldenGate Apply
    Additional Oracle GoldenGate Configuration Considerations
    Additional Configuration Steps for Using Classic Capture
    Additional Configuration Steps For Using Nonintegrated Replicat
    Configuring DDL Support
    Creating Process Groups
    Instantiating Oracle GoldenGate Replication
    Managing the DDL Replication Environment
    Uninstalling Oracle GoldenGate
    Optional Parameters for Integrated Modes
    Configuring a Downstream Mining Database
    Example Downstream Mining Configuration
    Installing Trigger-Based DDL Capture
    Supporting Changes to XML Schemas
    Preparing DBFS for an Active-Active Configuration
    Oracle GoldenGate Installed Components

=======================================================================
1 System Requirements and Preinstallation Instructions
本章包含支持Oracle GoldenGate的系统和数据库资源的要求。本章包括以下部分
    Verifying Certification and System Requirements
    Operating System Requirements
    Oracle Universal Installer Requirements for Oracle GoldenGate
    Database Configuration
    Summary of Supported Oracle Data Types and Objects Per Capture Mode
    Details of Support for Oracle Data Types
    Details of Support for Objects and Operations in Oracle DML
    Details of Support for Objects and Operations in Oracle DDL
    Supported and Non-supported Object Names


1.1 Verifying Certification and System Requirements
确保您在支持的硬件或软件配置上安装产品。 有关更多信息,请参阅Oracle Fusion Middleware Supported System Configurations("Oracle融合中间件支持的系统配置")页面上的发行证书文档。

1.2 Operating System Requirements操作系统检查
1.2.1 Memory Requirements
For more information about evaluating Oracle GoldenGate memory requirements, see the CACHEMGR parameter in Reference for Oracle GoldenGate for Windows and UNIX.
有关评估Oracle GoldenGate内存需求的更多信息,请参阅Oracle GoldenGate for Windows和UNIX的参考中的CACHEMGR参数。

1.2.2 Disk Requirements
1.2.2.1 Disk Requirements for Oracle GoldenGate Installation Files
This section shows the disk requirements for a manual installation and for an installation through OUI.
本部分显示手动安装和通过OUI安装的磁盘要求。
Table 1-1 shows the disk space that is consumed by the files of one Oracle GoldenGate installation in a manual build. A manual build does not use OUI. The person installing Oracle GoldenGate uncompresses the files and creates the working directories.
表1-1显示了手动构建中一个Oracle GoldenGate安装文件所消耗的磁盘空间。 手动构建不使用OUI。 安装Oracle GoldenGate的人员解压缩文件并创建工作目录。

Disk Requirements for an OUI Build
Platform     Oracle Version     Compressed Size (MB)     Installed Size (MB)
Linux     12c             325 zip file             521
                          329 OUI installer
                          
1.2.2.2 Other Disk Space Considerations
除了由GoldenGate安装的文件和二进制文件所需的磁盘空间之外,还可以在承载Oracle GoldenGate跟踪(或小节)的任何系统上额外增加1 GB的磁盘空间。  

1.2.2.3 Installing in a Cluster
要将Oracle GoldenGate安装到集群环境中,请将Oracle GoldenGate二进制文件和文件作为Oracle用户安装到所有集群节点可用的共享文件系统上。 有关详细信息,请参阅准备在群集中安装Oracle GoldenGate。            

1.2.2.4 Temporary Disk Requirements
默认情况下,Oracle GoldenGate会将数据写入Oracle GoldenGate安装目录的dirtmp子目录中。 当总缓存事务数据超过CACHEMGR参数的CACHESIZE设置时,Extract将开始将缓存数据写入临时文件。 缓存管理器假定文件系统上的所有可用空间都可用。 如果存在大型事务大小的事务卷,则该目录可以快速填满。 为了防止I / O争用和与磁盘相关的Extract故障,请将磁盘专用于此目录。 您可以使用CACHEMGR参数的CACHEDIRECTORY选项为此目录指定名称。

操作系统交换磁盘通常比使用Extract写入临时文件更有效。 默认的CACHESIZE设置假定为。 因此,应该有足够的磁盘空间来解决这个问题,因为只有在超过CACHESIZE的值之后才能将文件系统名称空间中的写事务缓存数据提取到临时文件。 如果在系统上运行多个"提取"进程,则磁盘需求可能会增加。 当没有足够的内存来存储打开的事务时,Oracle GoldenGate会写入磁盘。 一旦提交或回滚事务,就将写入的数据写入跟踪文件,并从内存中释放数据,并且Oracle GoldenGate不再跟踪该事务。 没有最低的磁盘要求,因为在每次操作之后提交事务时,这些事务永远不会写入磁盘。

1.2.3 Network
记录您分配给Oracle GoldenGate的端口。 在配置Manager进程时,您将使用参数指定它们。

1.2.4 Operating System Privileges
以下是安装Oracle GoldenGate并运行进程所需的操作系统中的权限:
要在UNIX上安装,安装Oracle GoldenGate的人员必须具有对Oracle GoldenGate安装目录的读写权限。

Oracle GoldenGate Extract,Replicat和Manager进程必须作为具有读取,写入和删除Oracle GoldenGate目录中的文件和子目录的权限的操作系统用户。 此外,Manager进程需要权限来控制其他Oracle GoldenGate进程。

(经典捕捉模式)在经典捕捉模式下,"提取"(Extract)进程将直接读取重做日志,并且必须作为具有对在线和存档的日志文件的读取访问权限的操作系统用户进行操作。 在UNIX系统上,该用户必须是拥有Oracle实例的组的成员。 如果在本文档中的安装步骤中将Manager进程作为Windows服务安装,则必须以管理员身份安装以分配正确的权限。 如果无法安装Manager作为服务,请手动分配对Extract进程的读访问权限,然后始终以管理员身份运行管理器和提取。

将Extract,Replicat和Manager操作系统用户专用于Oracle GoldenGate。 任何运行Oracle GoldenGate进程的人都可以使用敏感信息,这取决于数据库身份验证的配置方式。    

1.2.5 Console Character Sets
您可以使用以下DOS命令在打开GGSCI会话之前设置控制台的字符集:
chcp OS character set

1.3 Oracle Universal Installer Requirements for Oracle GoldenGate

1.4 Database Configuration数据库配置
本节包含特定于Oracle数据库的Oracle GoldenGate要求。 除非明确指出,否则这两种捕获模式都适用。
If you are using the DBMS_LOB.LOADFROMFILE procedure to update a LOB column only and your supplemental log is on all the columns, Integrated Extract captures the key columns and LOB improving performance. Classic Extract captures the all the columns by default. These behaviors do not effect like to like replications. However, with a replication to data warehouse, you may want all the columns for update. If you are converting from Classic Extract to Integrated Extract, you must use one of the following parameters to ensure that the Extract operates correctly:
如果您正在使用DBMS_LOB.LOADFROMFILE过程来更新LOB列,并且您的补充日志位于所有列上,Integrated Extract将捕获关键列和LOB以提高性能。  Classic Extract默认捕获所有列。 这些行为并不像喜欢复制一样。 但是,通过复制到数据仓库,您可能希望更新所有列。 如果要从Classic Extract转换为Integrated Extract,则必须使用以下参数之一来确保提取操作正确:

    Use KEYCOLS to add all columns (except LOB).

    Use LOGALLSUPCOLS to control the writing of supplementally logged columns.
    
Database user privileges and configuration requirements are explained in “Establishing Oracle GoldenGate Credentials”.
数据库用户权限和配置要求在建立Oracle GoldenGate凭据中有所描述。

If the database is configured to use a bequeath connection, the sqlnet.ora file must contain the bequeath_detach=true setting.
如果数据库配置为使用bequeath连接,则sqlnet.ora文件必须包含bequeath_detach = true设置。

To install Oracle GoldenGate in an Oracle Real Application Cluster (RAC) environment, install Oracle GoldenGate on the shared drive(s) that are accessed by the RAC nodes. For more information, see Preparing to Install Oracle GoldenGate Within a Cluster.
要在Oracle Real Application Cluster(RAC)环境中安装Oracle GoldenGate,请在由RAC节点访问的共享驱动器上安装Oracle GoldenGate。 有关详细信息,请参阅准备在群集中安装Oracle GoldenGate。

(Integrated capture mode) Integrated Capture mode makes use of a logmining server on the source system or in a downstream Oracle Database. Refer to My Oracle Support article 1557031.1 for all Oracle Database release bundled patches for Oracle GoldenGate.
(集成捕获模式)集成捕获模式使用源系统或下游Oracle数据库中的登录服务器。 有关Oracle GoldenGate的所有Oracle数据库版本捆绑补丁,请参阅我的Oracle支持文章1557031.1。

To use integrated capture with an Oracle 11.2.0.3 source database, download and install the 11.2.0.3 database specific bundled patch required for Integrated Extract.
For more information, see Choosing Capture and Apply Modes.
要使用集成捕获与Oracle 11.2.0.3源数据库,请下载并安装Integrated Extract所需的11.2.0.3数据库特定的捆绑补丁。有关详细信息,请参阅选择捕获和应用模式。

Oracle Databases must be in ARCHIVELOG mode so that Extract can process the log files.
Oracle数据库必须处于ARCHIVELOG模式,以便Extract可以处理日志文件。

1.5 Summary of Supported Oracle Data Types and Objects Per Capture Mode 每种捕获模式支持的Oracle数据类型和对象摘要
table 1-3 summarizes the way that Oracle GoldenGate supports the Oracle data types according to the capture mode that you choose. For more information about capture modes, see Deciding Which Capture Method to Use.
表1-3总结了Oracle GoldenGate根据您选择的捕获模式支持Oracle数据类型的方式。 有关捕获模式的更多信息,请参阅确定要使用的捕获方法。

Detailed support information for Oracle data types, objects, and operations starts with Details of Support for Oracle Data Types.
有关Oracle数据类型,对象和操作的详细支持信息,请参阅Oracle数据类型支持详细信息。

见:https://docs.oracle.com/goldengate/c1221/gg-winux/GIORA/GUID-B4C2B009-102D-46D2-9AF5-545AE984A16B.htm#GIORA122

1.6 Details of Support for Oracle Data Types Oracle数据类型支持的详细信息
The following outlines details of Oracle data type support by Oracle GoldenGate. Unless otherwise noted, the support applies to both classic and integrated capture mode. For more information about these modes, see Choosing “Capture and Apply Modes”.
以下概述了Oracle GoldenGate支持的Oracle数据类型的详细信息。 除非另有说明,否则支持适用于经典和集成捕获模式。 有关这些模式的更多信息,请参阅选择捕获和应用模式。

1.6.1 ANYDATA Data Types
1.6.1.1 Limitations of Support
Your source database compatibility must be set to 11.2.0.0.0 or higher. Support for named collections and VARRAYs embedded within those data types.
您的源数据库兼容性必须设置为11.2.0.0.0或更高版本。 支持嵌入在这些数据类型中的命名集合和VARRAY。

1.6.2 Numeric Data Types
1.6.2.1 Limitations of Support
The support of the range and precision for floating-point numbers depends on the host machine. In general, the precision is accurate to 16 significant digits, but you should review the database documentation to determine the expected approximations. Oracle GoldenGate rounds or truncates values that exceed the supported precision.
浮点数的范围和精度的支持取决于主机。 一般来说,精确度精确到16位有效数字,但您应该查看数据库文档以确定预期的近似值。  Oracle GoldenGate可以舍入或截断超出支持的精度的值。

1.6.3 Character Data Types
1.6.3.1 Limitations of Support
If an extended VARCHAR column is part of unique index or constraint, then direct path inserts to this table may cause Replicat to abend with a warning. Verify that the extended VARCHAR caused the abend by checking all_indexes/all_ind_columns for a unique index or all_cons_columns/all_constraints for a unique constraint. Once you determine that an extended VARCHAR, you can temporarily drop the index or disable the constraint:
如果扩展的VARCHAR列是唯一索引或约束的一部分,则直接路径插入此表可能会导致Replicat退出警告。 通过检查唯一索引的all_indexes / all_ind_columns来检查扩展VARCHAR是否导致了异常,或者唯一约束的all_cons_columns / all_constraints。 确定扩展的VARCHAR后,您可以临时删除索引或禁用约束:

For Unique Index:
    drop index t2u;
    
For Unique Constraint:
    alter table v32ind modify constraint sys_c0010125 disable;

Extended (32K) VARCHAR2 and NVARCHAR2 columns are supported when Extract is in integrated capture mode. All modes of Replicat support 32K VARCHAR2 and NVARCHAR2 columns. The following limitations apply:
Extract处于集成捕获模式时,支持扩展(32K)VARCHAR2和NVARCHAR2列。  Replicat的所有模式都支持32K VARCHAR2和NVARCHAR2列。 以下限制适用:

    Oracle GoldenGate does not support 32K VARCHAR2 and NVARCHAR2 columns as part of a key or unique index, nor as a column in a KEYCOLS clause of the TABLE or MAP parameter. 32K columns cannot be used as row identifiers because they are not supplementally logged even when part of a primary key.

    32K columns are not supported as resolution columns in a CDR (conflict resolution and detection) configuration nor as the basis for any other work that requires a column value to be present in the transaction log.

    Oracle GoldenGate does not limit the number of 32K columns, but each trail record has a length limit of 4MB for inline records. The number of 32K columns that reaches this limit is approximately 160 columns, but the number of columns also depends on the actual size of the extended VARCHAR2 column.

1.6.4 Multi-byte Character Types 多字节字符类型

1.6.5 Binary Data Types二进制数据类型

1.6.6 Date and Timestamp Data Types 日期和时间戳数据类型

1.6.7 Large Object Data Types

1.6.8 XML Data Types

1.6.9 User Defined or Abstract Types 用户定义或抽象类型

1.6.10 Non-Supported Oracle Data Types 不支持的Oracle数据类型

1.7 Details of Support for Objects and Operations in Oracle DML: Oracle DML中对象和操作的支持细节
This section outlines the Oracle objects and operations that Oracle GoldenGate supports for the capture and replication of DML operations.
本节概述Oracle GoldenGate支持捕获和复制DML操作的Oracle对象和操作。

1.7.1 Multitenant Container Databases多租户集装箱数据库
Oracle GoldenGate captures from, and delivers to, a multitenant container database. See Configuring Oracle GoldenGate in a Multitenant Container Database for more information about how Oracle GoldenGate supports multitenant container databases.
Oracle GoldenGate从多租户容器数据库捕获并传递给多租户集装箱数据库。 有关Oracle GoldenGate如何支持多租户容器数据库的更多信息,请参阅在多租户容器数据库中配置Oracle GoldenGate。

1.7.2 Tables, Views, and Materialized Views
Oracle GoldenGate supports the following DML operations made to regular tables, index-organized tables, clustered tables, and materialized views.
Oracle GoldenGate支持对常规表,索引组织表,聚簇表和物化视图进行的以下DML操作:
    INSERT
    UPDATE
    DELETE
    Associated transaction control operations
您可以使用DBA_GOLDENGATE_SUPPORT_MODE数据字典视图显示有关Oracle GoldenGate捕获进程对数据库中表的支持级别的信息。 有关更多信息,请参阅"Oracle数据库参考"。
 
1.7.3 Sequences

1.7.4 Non-supported Objects and Operations in Oracle DML

1.8 Details of Support for Objects and Operations in Oracle DDL :Oracle DDL中对象和操作支持的详细信息
This section outlines the Oracle objects and operation types that Oracle GoldenGate supports for the capture and replication of DDL operations. For more information about DDL support, see the following:
本节概述了Oracle GoldenGate支持捕获和复制DDL操作的Oracle对象和操作类型。 有关DDL支持的更多信息,请参阅以下内容:
Configuring DDL Support 配置DDL支持
Installing Trigger-Based DDL Capture (Trigger-based capture is required for Oracle releases that are earlier than version 11.2.0.4. If Extract will run in integrated mode against a version 11.2.0.4 or later Oracle Database, the DDL trigger and supporting objects are not required.)
安装基于触发器的DDL捕获(低于版本11.2.0.4的Oracle版本需要基于触发器的捕获)。如果Extract将针对11.2.0.4或更高

1.8.1 Supported Objects and Operations in Oracle DDL:Oracle DDL中支持的对象和操作
When the source database is Oracle 11.2.0.4 or later and Extract operates in integrated mode, DDL capture support is integrated into the database logmining server and does not require the use of a DDL trigger. You must set the database parameter compatibility to 11.2.0.4.0. In integrated capture mode, Extract supports DDL that includes password-based column encryption
当源数据库是Oracle 11.2.0.4或更高版本,Extract以集成模式运行时,DDL捕获支持集成到数据库登录服务器中,不需要使用DDL触发器。 您必须将数据库参数兼容性设置为11.2.0.4.0。 在集成捕获模式下,Extract支持包含基于密码的列加密的DDL
注意:Password-based column encryption in DDL is not supported in classic capture mode.

The following additional statements apply to both integrated and classic capture modes with respect to DDL support.以下附加说明适用于DDL支持的集成和经典捕获模式。
Oracle DDL复制支持所有Oracle GoldenGate拓扑配置。在包含相同元数据的两个(而且只有两个)数据库之间支持Oracle DDL的主动(双向)复制。Oracle GoldenGate支持以下对象上的DDL:
对于以下Oracle数据库对象,集成的Extract支持Oracle DDL的基于Oracle版本的重新定义(EBR)数据库复制

Oracle GoldenGate支持高达4 MB的DDL操作。  Oracle GoldenGate以字节为单位测量DDL语句的大小,而不是字符。 此大小限制包括包,过程和功能。  DDL支持的实际大小限制是近似值,因为大小不仅包括语句文本,还包括Oracle GoldenGate维护开销,这取决于对象名称的长度,DDL类型以及内部保留DDL记录的其他特性 。

Oracle GoldenGate支持全局临时表(GTT)DDL操作对Extract可见,以便它们可以被复制。 您必须将DDLOPTIONS参数设置为启用此操作,因为它未被默认设置。

Oracle GoldenGate支持用于NOUSERID和TRANLOGOPTIONS GETCTASDML的集成字典。 这意味着Extract将从LogMiner字典而不是DDL触发器获取对象元数据,而不查询字典对象。 当源数据库兼容性参数大于或等于11.2.0.4时,Oracle GoldenGate将自动使用集成字典,并使用集成提取。

Classic Extract不支持集成字典功能。

当在Oracle GoldenGate版本12.2.x中使用集成字典和跟踪格式时,如果Oracle数据库版本早于12.1.0.2,则Integrated Capture需要将Logminer补丁应用于挖掘数据库。

1.8.2 Non-supported Objects and Operations in Oracle DDL:Oracle DDL中不支持的对象和操作
These statements apply to integrated and classic capture modes.

1.8.2.1 Excluded Objects

1.8.2.2 Other Non-supported DDL

1.9 Supported and Non-supported Object Names 支持的和不支持的对象名称
Oracle object names are case insensitive by default, but can be made case-sensitive with the use of double quotes. Oracle GoldenGate supports Oracle case-sensitivity. For information about Oracle GoldenGate support for object names and case, see Administering Oracle GoldenGate for Windows and UNIX.
Oracle对象名称默认情况下不区分大小写,但可以使用双引号使其区分大小写。  Oracle GoldenGate支持Oracle区分大小写。 有关Oracle GoldenGate对对象名称和大小写的支持的信息,请参阅管理Oracle GoldenGate for Windows和UNIX。

2 Installing Oracle GoldenGate安装Oracle GoldenGate
本章包括首次安装Oracle GoldenGate的说明。 安装Oracle GoldenGate安装运行和管理处理所需的所有组件(不包括其他供应商所需的任何组件,如驱动程序或库),并安装Oracle GoldenGate实用程序。 本章包括以下部分:
    Understanding and Obtaining the Oracle GoldenGate Distribution
    Setting ORACLE_HOME and ORACLE_SID
    Setting Library Paths for Dynamic Builds on UNIX
    Preparing to Install Oracle GoldenGate Within a Cluster
    Installing Oracle GoldenGate
    Integrating Oracle GoldenGate into a Cluster

These instructions are for installing Oracle GoldenGate for the first time. Additionally, they are for downloading the base release of a new version of Oracle GoldenGate.这些说明首次用于安装Oracle GoldenGate。 此外,它们用于下载新版本的Oracle GoldenGate的基本版本。
To download and install subsequent patches to the base release, go to the Patches and Updates tab of My Oracle Support at:http://support.oracle.com
To upgrade Oracle GoldenGate from one version to another, follow the upgrade instructions at:http://docs.oracle.com/goldengate/c1221/gg-winux/index.html

2.1 Understanding and Obtaining the Oracle GoldenGate Distribution 了解和获取Oracle GoldenGate发行版
For complete information about how to obtain Oracle Fusion Middleware software, see "Understanding and Obtaining Product Distributions" in Planning an Installation of Oracle Fusion Middleware.

To download the Oracle WebLogic Server and Coherence software for development or evaluation, see the following location on the Oracle Technology Network (OTN):
http://www.oracle.com/technetwork/middleware/fusion-middleware/downloads/index.html

For more information about locating and downloading Oracle Fusion Middleware products, see the Oracle Fusion Middleware Download, Installation, and Configuration Readme Files on OTN.

To obtain Oracle GoldenGate follow these steps:
    1.Go to Oracle Technology Network.
    2.Find the Oracle GoldenGate 12c (12.2.0.1) release and download the ZIP file onto your system.


2.2 Setting ORACLE_HOME and ORACLE_SID 设置ORACLE_HOME和ORACLE_SID
确保将ORACLE_HOME和ORACLE_SID系统环境变量设置为正确的Oracle实例。 连接到数据库时,Oracle GoldenGate进程引用它们。
If there is one instance of Oracle Database on the system, set the ORACLE_HOME and ORACLE_SID environment variables 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.
如果系统上有一个Oracle数据库实例,请在系统级别设置ORACLE_HOME和ORACLE_SID环境变量。 如果不能以这种方式设置,请在将连接到实例的每个"提取"和"复制"组的参数文件中使用以下SETENV语句。  SETENV参数覆盖系统设置,并允许Oracle GoldenGate进程在连接到数据库时将变量设置为会话级别。

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. As input to the SETENV parameter, use the ORACLE_HOME and ORACLE_SID environment variables to point Oracle GoldenGate to the correct Oracle instance. For example, the following shows parameter files for two Extract groups, each capturing from a different Oracle instance.
如果系统上有多个连接了Extract和Replicat进程的Oracle实例,则需要在每个进程组的参数文件中使用SETENV语句。 作为SETENV参数的输入,使用ORACLE_HOME和ORACLE_SID环境变量将Oracle GoldenGate指向正确的Oracle实例。 例如,以下显示两个"提取"组的参数文件,每个从不同的Oracle实例捕获。

Group 1:
EXTRACT ora9a
SETENV (ORACLE_HOME = "/home/oracle/ora/product")
SETENV (ORACLE_SID = "oraa")
USERIDALIAS tiger1
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")
USERIDALIAS tiger1
RMTHOST sysb
RMTTRAIL /home/ggs/dirdat/st
TABLE fin.sales;
TABLE fin.cust;

2.3 Setting Library Paths for Dynamic Builds on UNIX:在UNIX上设置动态构建的库路径
Oracle GoldenGate使用共享库。 在UNIX系统上安装Oracle GoldenGate时,在运行GGSCI或任何其他Oracle GoldenGate进程之前,以下内容必须为真:
1.确保将数据库库添加到系统的共享库环境变量中。 此过程通常在数据库安装时执行。 如果您有任何问题,请咨询数据库管理员。
  当Oracle GoldenGate在与数据库相同的服务器上运行时,以下所有内容必须为64位:Oracle library versions;Oracle GoldenGate version;Database versions;
  当Oracle GoldenGate通过SQL * Net远程连接到数据库服务器时,需要以下内容:
    Replicat: The Oracle client library and the Oracle GoldenGate build must have the same Oracle version, bit type (64-bit or IA64), and operating system version.
    Extract: The Oracle client library and the Oracle GoldenGate build must have the same Oracle version, bit type (64-bit or IA64), and operating system version. In addition, both operating systems must be the same endian.
    
2.如果您将在UNIX系统上从Oracle GoldenGate安装目录外部运行Oracle GoldenGate程序   
(Optional) Add the Oracle GoldenGate installation directory to the PATH environment variable.
(可选)将Oracle GoldenGate安装目录添加到PATH环境变量中。
(Required) Add the Oracle GoldenGate installation directory to the shared-libraries environment variable.
(必需)将Oracle GoldenGate安装目录添加到共享库环境变量中。

Example 2-2 To Set the Variables in Bourne Shell:

export PATH=installation_directory:$PATH
export shared_libraries_variable=absolute_path_of_installation_directory:$shared_libraries_variable

Where shared libraries variable is one of the variables shown in Table 2-1:共享库变量是表2-1中显示的变量之一
Platform          Environment variable
LINUX           LD_LIBRARY_PATH

注意:
To view the libraries that are required by an Oracle Oracle GoldenGate process, use the ldd goldengate_process shell command before starting the process. This command also shows an error message for any that are missing.
要查看Oracle Oracle GoldenGate进程所需的库,请在启动该进程之前使用ldd goldengate_process shell命令。 此命令还显示任何缺少的错误消息。

2.4 Preparing to Install Oracle GoldenGate Within a Cluster 在集群中安装Oracle GoldenGate
本主题介绍了在集群环境中安装Oracle GoldenGate时的安装要求。  Oracle GoldenGate可以与任何能够自动进行故障切换的集群管理解决方案配合使用。  Oracle Clusterware解决方案提供了能够与或不与Oracle RAC数据库一起使用的优点,从而可以包括运行Oracle GoldenGate的任何非数据库服务器。

2.4.1 Deciding Where to Install Oracle GoldenGate Binaries and Files in the Cluster

2.4.2 Example Oracle Cluster Storage

2.5 Installing Oracle GoldenGate 安装Oracle GoldenGate
2.5.1 Performing an Interactive Installation with OUI 使用OUI执行交互式安装
OUI安装在数据库版本在11g及以上才支持

The interactive installation provides a graphical user interface that prompts for the required installation information. These instructions apply to new installations as well as upgrades. However, to perform an upgrade to Oracle GoldenGate, follow the instructions in Upgrading Oracle GoldenGate for Windows and UNIX, which includes a prompt to run OUI at the appropriate time.
交互式安装提供了一个图形用户界面,提示所需的安装信息。 这些说明适用于新的安装和升级。 但是,要执行升级到Oracle GoldenGate,请按照升级Oracle GoldenGate for Windows和UNIX的说明进行操作,其中包括在适当时间运行OUI的提示。

2.5.2 Performing a Silent Installation with OUI 使用OUI执行静默安装
You perform a silent installation by running a response file. You can create a response file by selecting the Save Response File option during an interactive OUI session or by editing a template, as shown in Example 2-4. To run a response file, issue the following command.
您可以通过运行响应文件执行静默安装。 您可以通过在交互式OUI会话期间选择保存响应文件选项或通过编辑模板来创建响应文件,如示例2-4所示。 要运行响应文件,请发出以下命令。
./runIntailler -silent -nowait -responseFile path_to_file

2.6 Integrating Oracle GoldenGate into a Cluster
If you installed Oracle GoldenGate in a cluster, take the following steps to integrate Oracle GoldenGate within the cluster solution.

For more information about installing and using Oracle GoldenGate in a cluster, see the Oracle GoldenGate with Oracle Real Application Clusters Configuration white paper http://www.oracle.com/technetwork/database/features/availability/maa-goldengate-rac-2007111.pdf.

2.6.1 General Requirements in a Cluster

2.6.2 Adding Oracle GoldenGate as a Windows Cluster Resource

3 Preparing the Database for Oracle GoldenGate 准备Oracle GoldenGate数据库
This chapter contains steps to take so that the source Oracle Database is configured properly to support the capture of transactional changes.
本章包含采取的步骤,以便正确配置源Oracle数据库以支持事务性更改的捕获。

This chapter includes the following sections:本章包括以下部分
    Configuring Connections for Integrated Processes
    Configuring Logging Properties
    Enabling Oracle GoldenGate in the Database
    Setting Flashback Query
    Managing Server Resources

3.1 Configuring Connections for Integrated Processes 组态集成过程的连接
If you will be using integrated capture and integrated Replicat, each requires a dedicated server connection in the tnsnames.ora file. You direct the processes to use these connections with the USERID or USERIDALIAS parameter in the Extract and Replicat parameter files when you configure those processes.
如果您将使用集成捕获和集成的Replicat,则每个都需要tnsnames.ora文件中的专用服务器连接。 在配置这些进程时,您可以使用"提取和复制"参数文件中的USERID或USERIDALIAS参数来指导进程使用这些连接。

示例:
The following is an example of the dedicated connection required for integrated capture (Extract) and integrated Replicat.

TEST =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = test2)(PORT = 1521))
    )
(CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = test)
  )
)

The following are the security options for specifying the connection string in the Extract or Replicat parameter file.

Password encryption method:
USERID intext@test, PASSWORD mypassword

Credential store method:
USERIDALIAS ext

In the case of USERIDALIAS, the alias ext is stored in the Oracle GoldenGate credential store with the actual connection string, as in the following example:
GGSCI> INFO CREDENTIALSTORE DOMAIN support
Domain: Support
  Alias: ext
  Userid: intext@test

For more information about specifying database connection information in the parameter file, see "Administering Oracle GoldenGate for Windows and UNIX".

3.2 Configuring Logging Properties 配置日志记录属性
Oracle GoldenGate依赖重做日志来捕获复制源事务所需的数据。 在启动Oracle GoldenGate处理之前,必须正确配置源系统上的Oracle重做日志。
本节介绍适用于Oracle GoldenGate的以下日志记录级别。 您使用的日志记录级别取决于您使用的Oracle GoldenGate功能或功能。

3.2.1 Enabling Minimum Database-level Supplemental Logging 启用最低数据库级补充日志记录
Oracle strongly recommends putting the Oracle source database into forced logging mode. Forced logging mode forces the logging of all transactions and loads, overriding any user or storage settings to the contrary. This ensures that no source data in the Extract configuration gets missed.
Oracle强烈建议将Oracle源数据库置于强制登录模式。 强制日志记录模式强制记录所有事务和加载,覆盖任何用户或存储设置相反。 这样可以确保"提取"配置中的源数据不会丢失。

In addition, minimal supplemental logging, a database-level option, is required for an Oracle source database when using Oracle GoldenGate. This adds row chaining information, if any exists, to the redo log for update operations.
此外,使用Oracle GoldenGate时,Oracle数据库需要最少的补充日志记录(数据库级别选项)。 这将添加行链接信息(如果有的话)到重做日志以进行更新操作。

Database-level primary key (PK) and unique index (UI) logging is strongly discouraged because of the excessive additional overhead it creates on tables outside of replication. Unless those logging options are required for business purposes, you only need to enable minimal supplemental logging at the database level and force logging for Oracle GoldenGate.
强烈不鼓励数据库级主键(PK)和唯一索引(UI)日志记录,因为它在复制之外的表上创建了额外的额外开销。 除非这些日志选项是商业目的需要的,否则您只需要在数据库级别启用最少的补充日志记录,并强制Oracle GoldenGate的日志记录。

检查是否开启最小补充日志和force logging:
SELECT supplemental_log_data_min, force_logging FROM v$database;

开启最小补充日志和force logging:
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
ALTER DATABASE FORCE LOGGING;

3.2.2 Enabling Schema-level Supplemental Logging 启用schema级补充日志记录
Oracle GoldenGate supports schema-level supplemental logging. Schema-level logging is required for an Oracle source database when using the Oracle GoldenGate DDL replication feature. In all other use cases, it is optional, but then you must use table-level logging instead (see Enabling Table-level Supplemental Logging).
Oracle GoldenGate支持Schema级补充日志记录.使用Oracle GoldenGate DDL复制功能时,Oracle源数据库需要Schema级日志记录。在所有其他用例中,它是可选的,但是您必须使用表级日志记录(请参阅启用表级补充日志记录)。

注意:Oracle强烈建议使用模式级日志记录而不是表级日志记录,因为它可以确保添加到模式中的任何新表符合通配符规范。

perform the following steps on the source system to enable schema-level supplemental logging.

    1.Apply Oracle Patch 13794550 to the source Oracle Database if the version is earlier than 11.2.0.2.
    
    2.Run GGSCI on the source system.
    
    3.Issue the DBLOGIN command with the alias of a user in the credential store who has privilege to enable schema-level supplemental logging.
      DBLOGIN USERIDALIAS alias
      See Reference for Oracle GoldenGate for Windows and UNIX for more information about DBLOGIN and additional options.
      
    4.Issue the ADD SCHEMATRANDATA command for each schema for which you want to capture data changes with Oracle GoldenGate.
     ADD SCHEMATRANDATA schema [ALLCOLS | NOSCHEDULINGCOLS]
     Where:
        Without options, ADD SCHEMATRANDATA schema enables the unconditional supplemental logging on the source system of the primary key and the conditional supplemental logging of all unique key(s) and foreign key(s) of all current and future tables in the given schema. Unconditional logging forces the primary key values to the log whether or not the key was changed in the current operation. Conditional logging logs all of the column values of a foreign or unique key if at least one of them was changed in the current operation. The default is optional to support nonintegrated Replicat but is required to support integrated Replicat because primary key, unique keys, and foreign keys must all be available to the inbound server to compute dependencies. For more information about integrated Replicat, see Deciding Which Apply Method to Use.

        ALLCOLS can be used to enable the unconditional supplemental logging of all of the columns of a table and applies to all current and future tables in the given schema. Use to support integrated Replicat when the source and target tables have different scheduling columns. (Scheduling columns are the primary key, the unique key, and the foreign key.)

        NOSCHEDULINGCOLS logs only the values of the primary key and all valid unique indexes for existing tables in the schema and new tables added later. This is the minimal required level of schema-level logging and is valid only for Replicat in nonintegrated mode.

    In the following example, the command enables default supplemental logging for the finance schema.
    ADD SCHEMATRANDATA finance

    In the following example, the command enables the supplemental logging only for the primary key and valid unique indexes for the hr schema.
    ADD SCHEMATRANDATA hr NOSCHEDULINGCOLS

    See Reference for Oracle GoldenGate for Windows and UNIX for more information about ADD SCHEMATRANDATA.

3.2.3 Enabling Table-level Supplemental Logging 启用表级补充日志
在以下情况下,在源系统上启用表级补充日志记录:在不使用schema级日志记录时启用所需级别的日志记录(请参阅启用schema级补充日志记录);防止为任何给定的表记录主键; 在表级别记录非关键列值,以支持特定的Oracle GoldenGate功能,例如过滤和冲突检测和解析逻辑。

Perform the following steps on the source system to enable table-level supplemental logging or use the optional features of the command.
    1.Run GGSCI on the source system.

    2.Issue the DBLOGIN command using the alias of a user in the credential store who has privilege to enable table-level supplemental logging.
     DBLOGIN USERIDALIAS alias
     See Reference for Oracle GoldenGate for Windows and UNIX for more information about DBLOGIN and additional options.

    3.Issue the ADD TRANDATA command.
     ADD TRANDATA [container.]schema.table [, COLS (columns)] [, NOKEY] [, ALLCOLS | NOSCHEDULINGCOLS]

     Where:
        container is the name of the root container or pluggable database if the table is in a multitenant container database.
        
        schema is the source schema that contains the table.
        
        table is the name of the table. See Administering Oracle GoldenGate for Windows and UNIX for instructions for specifying object names.

        ADD TRANDATA without other options automatically enables unconditional supplemental logging of the primary key and conditional supplemental logging of unique key(s) and foreign key(s) of the table. Unconditional logging forces the primary key values to the log whether or not the key was changed in the current operation. Conditional logging logs all of the column values of a foreign or unique key if at least one of them was changed in the current operation. The default is optional to support nonintegrated Replicat (see also NOSCHEDULINGCOLS) but is required to support integrated Replicat because primary key, unique keys, and foreign keys must all be available to the inbound server to compute dependencies. For more information about integrated Replicat, see Deciding Which Apply Method to Use.
        没有其他选项的ADD TRANDATA可以自动启用主键的无条件补充日志记录和条件补充日志记录表的唯一键和外键。 无条件日志记录会将主键值强制到日志,无论在当前操作中键是否更改。 条件记录记录外部或唯一键的所有列值,如果当前操作中至少有一个值被更改。 默认值是可选的,以支持非集成的Replicat(另见NOSCHEDULINGCOLS),但是需要支持集成的Replicat,因为主键,唯一键和外键都必须可用于入站服务器以计算依赖关系。 有关集成的Replicat的更多信息,请参阅确定使用哪种应用方法。

        ALLCOLS enables the unconditional supplemental logging of all of the columns of the table. Use to support integrated Replicat when the source and target tables have different scheduling columns. (Scheduling columns are the primary key, the unique key, and the foreign key.)
        ALLCOLS可以对表的所有列进行无条件的补充记录。 当源表和目标表具有不同的调度列时,用于支持集成的Replicat。  (调度列是主键,唯一键和外键)。

        NOSCHEDULINGCOLS is valid for Replicat in nonintegrated mode only. It issues an ALTER TABLE command with an ADD SUPPLEMENTAL LOG DATA ALWAYS clause that is appropriate for the type of unique constraint that is defined for the table, or all columns in the absence of a unique constraint. This command satisfies the basic table-level logging requirements of Oracle GoldenGate when schema-level logging will not be used. See Ensuring Row Uniqueness in Source and Target Tables for how Oracle GoldenGate selects a key or index.
        NOSCHEDULINGCOLS仅在非集成模式下对Replicat有效。 它使用ADD SUPPLEMENTAL LOG DATA ALWAYS子句发出一个ALTER TABLE命令,该子句适用于为表定义的唯一约束类型,或不存在唯一约束的所有列。 当不使用模式级日志记录时,此命令满足Oracle GoldenGate的基本表级日志记录要求。 请参阅确定源和目标表中的行唯一性,以了解Oracle GoldenGate如何选择密钥或索引。

        COLS columns logs non-key columns that are required for a KEYCOLS clause or for filtering and manipulation. The parentheses are required. These columns will be logged in addition to the primary key unless the NOKEY option is also present.
        COLS列记录KEYCOLS子句所需的非键列或过滤和操作。 括号是必需的。 这些列除了主键之外还将被记录,除非NOKEY选项也存在。

        NOKEY prevents the logging of the primary key or unique key. Requires a KEYCOLS clause in the TABLE and MAP parameters and a COLS clause in the ADD TRANDATA command to log the alternate KEYCOLS columns.
        NOKEY防止记录主键或唯一键。 需要TABLE和MAP参数中的KEYCOLS子句以及ADD TRANDATA命令中的COLS子句才能记录备用KEYCOLS列。

    4.If using ADD TRANDATA with the COLS option, create a unique index for those columns on the target to optimize row retrieval. If you are logging those columns as a substitute key for a KEYCOLS clause, make a note to add the KEYCOLS clause to the TABLE and MAP statements when you configure the Oracle GoldenGate processes.
    如果使用带有COLS选项的ADD TRANDATA,则为目标上的那些列创建唯一的索引,以优化行检索。 如果您正在将这些列作为KEYCOLS子句的替代键进行记录,请在配置Oracle GoldenGate进程时,记下将KEYCOLS子句添加到TABLE和MAP语句。
 
  See Reference for Oracle GoldenGate for Windows and UNIX for more information about ADD TRANDATA.

3.3 Enabling Oracle GoldenGate in the Database 在数据库中启用Oracle GoldenGate
必须为Oracle 11.2.0.4或更高版本的数据库显式启用支持Oracle GoldenGate捕获和应用所需的数据库服务。 这是Extract和Replicat的所有模式所必需的。

要启用Oracle GoldenGate,请设置以下数据库初始化参数。 Oracle RAC中的所有实例必须具有相同的设置。
ENABLE_GOLDENGATE_REPLICATION =true

For more information about this parameter, see Oracle Database Reference.

3.4 Setting Flashback Query 设置闪回查询
To process certain update records, Extract fetches additional row data from the source database. Oracle GoldenGate fetches data for the following:
    User-defined types
    Nested tables
    XMLType objects

By default, Oracle GoldenGate uses Flashback Query to fetch the values from the undo (rollback) tablespaces. That way, Oracle GoldenGate can reconstruct a read-consistent row image as of a specific time or SCN to match the redo record.
默认情况下,Oracle GoldenGate使用Flashback Query从undo(rollback)表空间中获取值。 这样,Oracle GoldenGate可以根据特定时间或SCN重建一个读取一致的行图像,以匹配重做记录。

For best fetch results, configure the source database as follows:为获得最佳提取结果,请按如下方式配置源数据库
  1.通过设置Oracle初始化参数UNDO_MANAGEMENT和UNDO_RETENTION来设置足够的重做保留次数
  2.使用以下公式计算undo表空间中所需的空间。
     undo_space = UNDO_RETENTION * UPS + overhead
     Use the system view V$UNDOSTAT to estimate UPS and overhead.
  3.对于包含LOB的表,请执行以下操作之一:
    Set the LOB storage clause to RETENTION. This is the default for tables that are created when UNDO_MANAGEMENT is set to AUTO;
    
    If using PCTVERSION instead of RETENTION, set PCTVERSION to an initial value of 25. You can adjust it based on the fetch statistics that are reported with the STATS EXTRACT command (see Table 3-2). If the value of the STAT_OPER_ROWFETCH CURRENTBYROWID or STAT_OPER_ROWFETCH_CURRENTBYKEY field in these statistics is high, increase PCTVERSION in increments of
分享标题:OracleGoldenGate官档知识
新闻来源:http://bjjierui.cn/article/gpsocc.html