溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

Oracle GoldenGate官檔知識(shí)

發(fā)布時(shí)間:2020-08-06 19:56:05 來(lái)源:ITPUB博客 閱讀:424 作者:不一樣的天空w 欄目:關(guān)系型數(shù)據(jù)庫(kù)
Oracle GoldenGate 下載:
http://www.oracle.com/technetwork/cn/middleware/goldengate/downloads/index.html

官網(wǎng)安裝文檔:
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的系統(tǒng)和數(shù)據(jù)庫(kù)資源的要求。本章包括以下部分
    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
確保您在支持的硬件或軟件配置上安裝產(chǎn)品。 有關(guān)更多信息,請(qǐng)參閱Oracle Fusion Middleware Supported System Configurations("Oracle融合中間件支持的系統(tǒng)配置")頁(yè)面上的發(fā)行證書(shū)文檔。

1.2 Operating System Requirements操作系統(tǒng)檢查
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.
有關(guān)評(píng)估Oracle GoldenGate內(nèi)存需求的更多信息,請(qǐng)參閱Oracle GoldenGate for Windows和UNIX的參考中的CACHEMGR參數(shù)。

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.
本部分顯示手動(dòng)安裝和通過(guò)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顯示了手動(dòng)構(gòu)建中一個(gè)Oracle GoldenGate安裝文件所消耗的磁盤空間。 手動(dòng)構(gòu)建不使用OUI。 安裝Oracle GoldenGate的人員解壓縮文件并創(chuàng)建工作目錄。

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安裝的文件和二進(jìn)制文件所需的磁盤空間之外,還可以在承載Oracle GoldenGate跟蹤(或小節(jié))的任何系統(tǒng)上額外增加1 GB的磁盤空間。  

1.2.2.3 Installing in a Cluster
要將Oracle GoldenGate安裝到集群環(huán)境中,請(qǐng)將Oracle GoldenGate二進(jìn)制文件和文件作為Oracle用戶安裝到所有集群節(jié)點(diǎn)可用的共享文件系統(tǒng)上。 有關(guān)詳細(xì)信息,請(qǐng)參閱準(zhǔn)備在群集中安裝Oracle GoldenGate。            

1.2.2.4 Temporary Disk Requirements
默認(rèn)情況下,Oracle GoldenGate會(huì)將數(shù)據(jù)寫(xiě)入Oracle GoldenGate安裝目錄的dirtmp子目錄中。 當(dāng)總緩存事務(wù)數(shù)據(jù)超過(guò)CACHEMGR參數(shù)的CACHESIZE設(shè)置時(shí),Extract將開(kāi)始將緩存數(shù)據(jù)寫(xiě)入臨時(shí)文件。 緩存管理器假定文件系統(tǒng)上的所有可用空間都可用。 如果存在大型事務(wù)大小的事務(wù)卷,則該目錄可以快速填滿。 為了防止I / O爭(zhēng)用和與磁盤相關(guān)的Extract故障,請(qǐng)將磁盤專用于此目錄。 您可以使用CACHEMGR參數(shù)的CACHEDIRECTORY選項(xiàng)為此目錄指定名稱。

操作系統(tǒng)交換磁盤通常比使用Extract寫(xiě)入臨時(shí)文件更有效。 默認(rèn)的CACHESIZE設(shè)置假定為。 因此,應(yīng)該有足夠的磁盤空間來(lái)解決這個(gè)問(wèn)題,因?yàn)橹挥性诔^(guò)CACHESIZE的值之后才能將文件系統(tǒng)名稱空間中的寫(xiě)事務(wù)緩存數(shù)據(jù)提取到臨時(shí)文件。 如果在系統(tǒng)上運(yùn)行多個(gè)"提取"進(jìn)程,則磁盤需求可能會(huì)增加。 當(dāng)沒(méi)有足夠的內(nèi)存來(lái)存儲(chǔ)打開(kāi)的事務(wù)時(shí),Oracle GoldenGate會(huì)寫(xiě)入磁盤。 一旦提交或回滾事務(wù),就將寫(xiě)入的數(shù)據(jù)寫(xiě)入跟蹤文件,并從內(nèi)存中釋放數(shù)據(jù),并且Oracle GoldenGate不再跟蹤該事務(wù)。 沒(méi)有最低的磁盤要求,因?yàn)樵诿看尾僮髦筇峤皇聞?wù)時(shí),這些事務(wù)永遠(yuǎn)不會(huì)寫(xiě)入磁盤。

1.2.3 Network
記錄您分配給Oracle GoldenGate的端口。 在配置Manager進(jìn)程時(shí),您將使用參數(shù)指定它們。

1.2.4 Operating System Privileges
以下是安裝Oracle GoldenGate并運(yùn)行進(jìn)程所需的操作系統(tǒng)中的權(quán)限:
要在UNIX上安裝,安裝Oracle GoldenGate的人員必須具有對(duì)Oracle GoldenGate安裝目錄的讀寫(xiě)權(quán)限。

Oracle GoldenGate Extract,Replicat和Manager進(jìn)程必須作為具有讀取,寫(xiě)入和刪除Oracle GoldenGate目錄中的文件和子目錄的權(quán)限的操作系統(tǒng)用戶。 此外,Manager進(jìn)程需要權(quán)限來(lái)控制其他Oracle GoldenGate進(jìn)程。

(經(jīng)典捕捉模式)在經(jīng)典捕捉模式下,"提取"(Extract)進(jìn)程將直接讀取重做日志,并且必須作為具有對(duì)在線和存檔的日志文件的讀取訪問(wèn)權(quán)限的操作系統(tǒng)用戶進(jìn)行操作。 在UNIX系統(tǒng)上,該用戶必須是擁有Oracle實(shí)例的組的成員。 如果在本文檔中的安裝步驟中將Manager進(jìn)程作為Windows服務(wù)安裝,則必須以管理員身份安裝以分配正確的權(quán)限。 如果無(wú)法安裝Manager作為服務(wù),請(qǐng)手動(dòng)分配對(duì)Extract進(jìn)程的讀訪問(wèn)權(quán)限,然后始終以管理員身份運(yùn)行管理器和提取。

將Extract,Replicat和Manager操作系統(tǒng)用戶專用于Oracle GoldenGate。 任何運(yùn)行Oracle GoldenGate進(jìn)程的人都可以使用敏感信息,這取決于數(shù)據(jù)庫(kù)身份驗(yàn)證的配置方式。    

1.2.5 Console Character Sets
您可以使用以下DOS命令在打開(kāi)GGSCI會(huì)話之前設(shè)置控制臺(tái)的字符集:
chcp OS character set

1.3 Oracle Universal Installer Requirements for Oracle GoldenGate

1.4 Database Configuration數(shù)據(jù)庫(kù)配置
本節(jié)包含特定于Oracle數(shù)據(jù)庫(kù)的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過(guò)程來(lái)更新LOB列,并且您的補(bǔ)充日志位于所有列上,Integrated Extract將捕獲關(guān)鍵列和LOB以提高性能。  Classic Extract默認(rèn)捕獲所有列。 這些行為并不像喜歡復(fù)制一樣。 但是,通過(guò)復(fù)制到數(shù)據(jù)倉(cāng)庫(kù),您可能希望更新所有列。 如果要從Classic Extract轉(zhuǎn)換為Integrated Extract,則必須使用以下參數(shù)之一來(lái)確保提取操作正確:

    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”.
數(shù)據(jù)庫(kù)用戶權(quán)限和配置要求在建立Oracle GoldenGate憑據(jù)中有所描述。

If the database is configured to use a bequeath connection, the sqlnet.ora file must contain the bequeath_detach=true setting.
如果數(shù)據(jù)庫(kù)配置為使用bequeath連接,則sqlnet.ora文件必須包含bequeath_detach = true設(shè)置。

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)環(huán)境中安裝Oracle GoldenGate,請(qǐng)?jiān)谟蒖AC節(jié)點(diǎn)訪問(wèn)的共享驅(qū)動(dòng)器上安裝Oracle GoldenGate。 有關(guān)詳細(xì)信息,請(qǐng)參閱準(zhǔn)備在群集中安裝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.
(集成捕獲模式)集成捕獲模式使用源系統(tǒng)或下游Oracle數(shù)據(jù)庫(kù)中的登錄服務(wù)器。 有關(guān)Oracle GoldenGate的所有Oracle數(shù)據(jù)庫(kù)版本捆綁補(bǔ)丁,請(qǐng)參閱我的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源數(shù)據(jù)庫(kù),請(qǐng)下載并安裝Integrated Extract所需的11.2.0.3數(shù)據(jù)庫(kù)特定的捆綁補(bǔ)丁。有關(guān)詳細(xì)信息,請(qǐng)參閱選擇捕獲和應(yīng)用模式。

Oracle Databases must be in ARCHIVELOG mode so that Extract can process the log files.
Oracle數(shù)據(jù)庫(kù)必須處于ARCHIVELOG模式,以便Extract可以處理日志文件。

1.5 Summary of Supported Oracle Data Types and Objects Per Capture Mode 每種捕獲模式支持的Oracle數(shù)據(jù)類型和對(duì)象摘要
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總結(jié)了Oracle GoldenGate根據(jù)您選擇的捕獲模式支持Oracle數(shù)據(jù)類型的方式。 有關(guān)捕獲模式的更多信息,請(qǐng)參閱確定要使用的捕獲方法。

Detailed support information for Oracle data types, objects, and operations starts with Details of Support for Oracle Data Types.
有關(guān)Oracle數(shù)據(jù)類型,對(duì)象和操作的詳細(xì)支持信息,請(qǐng)參閱Oracle數(shù)據(jù)類型支持詳細(xì)信息。

見(jiàn):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數(shù)據(jù)類型支持的詳細(xì)信息
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數(shù)據(jù)類型的詳細(xì)信息。 除非另有說(shuō)明,否則支持適用于經(jīng)典和集成捕獲模式。 有關(guān)這些模式的更多信息,請(qǐng)參閱選擇捕獲和應(yīng)用模式。

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.
您的源數(shù)據(jù)庫(kù)兼容性必須設(shè)置為11.2.0.0.0或更高版本。 支持嵌入在這些數(shù)據(jù)類型中的命名集合和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.
浮點(diǎn)數(shù)的范圍和精度的支持取決于主機(jī)。 一般來(lái)說(shuō),精確度精確到16位有效數(shù)字,但您應(yīng)該查看數(shù)據(jù)庫(kù)文檔以確定預(yù)期的近似值。  Oracle GoldenGate可以舍入或截?cái)喑鲋С值木鹊闹怠?/strong>

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:
如果擴(kuò)展的VARCHAR列是唯一索引或約束的一部分,則直接路徑插入此表可能會(huì)導(dǎo)致Replicat退出警告。 通過(guò)檢查唯一索引的all_indexes / all_ind_columns來(lái)檢查擴(kuò)展VARCHAR是否導(dǎo)致了異常,或者唯一約束的all_cons_columns / all_constraints。 確定擴(kuò)展的VARCHAR后,您可以臨時(shí)刪除索引或禁用約束:

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處于集成捕獲模式時(shí),支持?jǐn)U展(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 多字節(jié)字符類型

1.6.5 Binary Data Types二進(jìn)制數(shù)據(jù)類型

1.6.6 Date and Timestamp Data Types 日期和時(shí)間戳數(shù)據(jù)類型

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數(shù)據(jù)類型

1.7 Details of Support for Objects and Operations in Oracle DML: Oracle DML中對(duì)象和操作的支持細(xì)節(jié)
This section outlines the Oracle objects and operations that Oracle GoldenGate supports for the capture and replication of DML operations.
本節(jié)概述Oracle GoldenGate支持捕獲和復(fù)制DML操作的Oracle對(duì)象和操作。

1.7.1 Multitenant Container Databases多租戶集裝箱數(shù)據(jù)庫(kù)
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從多租戶容器數(shù)據(jù)庫(kù)捕獲并傳遞給多租戶集裝箱數(shù)據(jù)庫(kù)。 有關(guān)Oracle GoldenGate如何支持多租戶容器數(shù)據(jù)庫(kù)的更多信息,請(qǐng)參閱在多租戶容器數(shù)據(jù)庫(kù)中配置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支持對(duì)常規(guī)表,索引組織表,聚簇表和物化視圖進(jìn)行的以下DML操作:
    INSERT
    UPDATE
    DELETE
    Associated transaction control operations
您可以使用DBA_GOLDENGATE_SUPPORT_MODE數(shù)據(jù)字典視圖顯示有關(guān)Oracle GoldenGate捕獲進(jìn)程對(duì)數(shù)據(jù)庫(kù)中表的支持級(jí)別的信息。 有關(guān)更多信息,請(qǐng)參閱"Oracle數(shù)據(jù)庫(kù)參考"。
 
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中對(duì)象和操作支持的詳細(xì)信息
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:
本節(jié)概述了Oracle GoldenGate支持捕獲和復(fù)制DDL操作的Oracle對(duì)象和操作類型。 有關(guān)DDL支持的更多信息,請(qǐng)參閱以下內(nèi)容:
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.)
安裝基于觸發(fā)器的DDL捕獲(低于版本11.2.0.4的Oracle版本需要基于觸發(fā)器的捕獲)。如果Extract將針對(duì)11.2.0.4或更高

1.8.1 Supported Objects and Operations in Oracle DDL:Oracle DDL中支持的對(duì)象和操作
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
當(dāng)源數(shù)據(jù)庫(kù)是Oracle 11.2.0.4或更高版本,Extract以集成模式運(yùn)行時(shí),DDL捕獲支持集成到數(shù)據(jù)庫(kù)登錄服務(wù)器中,不需要使用DDL觸發(fā)器。 您必須將數(shù)據(jù)庫(kù)參數(shù)兼容性設(shè)置為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.以下附加說(shuō)明適用于DDL支持的集成和經(jīng)典捕獲模式。
Oracle DDL復(fù)制支持所有Oracle GoldenGate拓?fù)渑渲?。在包含相同元?shù)據(jù)的兩個(gè)(而且只有兩個(gè))數(shù)據(jù)庫(kù)之間支持Oracle DDL的主動(dòng)(雙向)復(fù)制。Oracle GoldenGate支持以下對(duì)象上的DDL:
對(duì)于以下Oracle數(shù)據(jù)庫(kù)對(duì)象,集成的Extract支持Oracle DDL的基于Oracle版本的重新定義(EBR)數(shù)據(jù)庫(kù)復(fù)制

Oracle GoldenGate支持高達(dá)4 MB的DDL操作。  Oracle GoldenGate以字節(jié)為單位測(cè)量DDL語(yǔ)句的大小,而不是字符。 此大小限制包括包,過(guò)程和功能。  DDL支持的實(shí)際大小限制是近似值,因?yàn)榇笮〔粌H包括語(yǔ)句文本,還包括Oracle GoldenGate維護(hù)開(kāi)銷,這取決于對(duì)象名稱的長(zhǎng)度,DDL類型以及內(nèi)部保留DDL記錄的其他特性 。

Oracle GoldenGate支持全局臨時(shí)表(GTT)DDL操作對(duì)Extract可見(jiàn),以便它們可以被復(fù)制。 您必須將DDLOPTIONS參數(shù)設(shè)置為啟用此操作,因?yàn)樗幢荒J(rèn)設(shè)置。

Oracle GoldenGate支持用于NOUSERID和TRANLOGOPTIONS GETCTASDML的集成字典。 這意味著Extract將從LogMiner字典而不是DDL觸發(fā)器獲取對(duì)象元數(shù)據(jù),而不查詢字典對(duì)象。 當(dāng)源數(shù)據(jù)庫(kù)兼容性參數(shù)大于或等于11.2.0.4時(shí),Oracle GoldenGate將自動(dòng)使用集成字典,并使用集成提取。

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

當(dāng)在Oracle GoldenGate版本12.2.x中使用集成字典和跟蹤格式時(shí),如果Oracle數(shù)據(jù)庫(kù)版本早于12.1.0.2,則Integrated Capture需要將Logminer補(bǔ)丁應(yīng)用于挖掘數(shù)據(jù)庫(kù)。

1.8.2 Non-supported Objects and Operations in Oracle DDL:Oracle DDL中不支持的對(duì)象和操作
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 支持的和不支持的對(duì)象名稱
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對(duì)象名稱默認(rèn)情況下不區(qū)分大小寫(xiě),但可以使用雙引號(hào)使其區(qū)分大小寫(xiě)。  Oracle GoldenGate支持Oracle區(qū)分大小寫(xiě)。 有關(guān)Oracle GoldenGate對(duì)對(duì)象名稱和大小寫(xiě)的支持的信息,請(qǐng)參閱管理Oracle GoldenGate for Windows和UNIX。

2 Installing Oracle GoldenGate安裝Oracle GoldenGate
本章包括首次安裝Oracle GoldenGate的說(shuō)明。 安裝Oracle GoldenGate安裝運(yùn)行和管理處理所需的所有組件(不包括其他供應(yīng)商所需的任何組件,如驅(qū)動(dòng)程序或庫(kù)),并安裝Oracle GoldenGate實(shí)用程序。 本章包括以下部分:
    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.這些說(shuō)明首次用于安裝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發(fā)行版
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 設(shè)置ORACLE_HOME和ORACLE_SID
確保將ORACLE_HOME和ORACLE_SID系統(tǒng)環(huán)境變量設(shè)置為正確的Oracle實(shí)例。 連接到數(shù)據(jù)庫(kù)時(shí),Oracle GoldenGate進(jìn)程引用它們。
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.
如果系統(tǒng)上有一個(gè)Oracle數(shù)據(jù)庫(kù)實(shí)例,請(qǐng)?jiān)谙到y(tǒng)級(jí)別設(shè)置ORACLE_HOME和ORACLE_SID環(huán)境變量。 如果不能以這種方式設(shè)置,請(qǐng)?jiān)趯⑦B接到實(shí)例的每個(gè)"提取"和"復(fù)制"組的參數(shù)文件中使用以下SETENV語(yǔ)句。  SETENV參數(shù)覆蓋系統(tǒng)設(shè)置,并允許Oracle GoldenGate進(jìn)程在連接到數(shù)據(jù)庫(kù)時(shí)將變量設(shè)置為會(huì)話級(jí)別。

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.
如果系統(tǒng)上有多個(gè)連接了Extract和Replicat進(jìn)程的Oracle實(shí)例,則需要在每個(gè)進(jìn)程組的參數(shù)文件中使用SETENV語(yǔ)句。 作為SETENV參數(shù)的輸入,使用ORACLE_HOME和ORACLE_SID環(huán)境變量將Oracle GoldenGate指向正確的Oracle實(shí)例。 例如,以下顯示兩個(gè)"提取"組的參數(shù)文件,每個(gè)從不同的Oracle實(shí)例捕獲。

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上設(shè)置動(dòng)態(tài)構(gòu)建的庫(kù)路徑
Oracle GoldenGate使用共享庫(kù)。 在UNIX系統(tǒng)上安裝Oracle GoldenGate時(shí),在運(yùn)行GGSCI或任何其他Oracle GoldenGate進(jìn)程之前,以下內(nèi)容必須為真:
1.確保將數(shù)據(jù)庫(kù)庫(kù)添加到系統(tǒng)的共享庫(kù)環(huán)境變量中。 此過(guò)程通常在數(shù)據(jù)庫(kù)安裝時(shí)執(zhí)行。 如果您有任何問(wèn)題,請(qǐng)咨詢數(shù)據(jù)庫(kù)管理員。
  當(dāng)Oracle GoldenGate在與數(shù)據(jù)庫(kù)相同的服務(wù)器上運(yùn)行時(shí),以下所有內(nèi)容必須為64位:Oracle library versions;Oracle GoldenGate version;Database versions;
  當(dāng)Oracle GoldenGate通過(guò)SQL * Net遠(yuǎn)程連接到數(shù)據(jù)庫(kù)服務(wù)器時(shí),需要以下內(nèi)容:
    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系統(tǒng)上從Oracle GoldenGate安裝目錄外部運(yùn)行Oracle GoldenGate程序   
(Optional) Add the Oracle GoldenGate installation directory to the PATH environment variable.
(可選)將Oracle GoldenGate安裝目錄添加到PATH環(huán)境變量中。
(Required) Add the Oracle GoldenGate installation directory to the shared-libraries environment variable.
(必需)將Oracle GoldenGate安裝目錄添加到共享庫(kù)環(huán)境變量中。

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:共享庫(kù)變量是表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進(jìn)程所需的庫(kù),請(qǐng)?jiān)趩?dòng)該進(jìn)程之前使用ldd goldengate_process shell命令。 此命令還顯示任何缺少的錯(cuò)誤消息。

2.4 Preparing to Install Oracle GoldenGate Within a Cluster 在集群中安裝Oracle GoldenGate
本主題介紹了在集群環(huán)境中安裝Oracle GoldenGate時(shí)的安裝要求。  Oracle GoldenGate可以與任何能夠自動(dòng)進(jìn)行故障切換的集群管理解決方案配合使用。  Oracle Clusterware解決方案提供了能夠與或不與Oracle RAC數(shù)據(jù)庫(kù)一起使用的優(yōu)點(diǎn),從而可以包括運(yùn)行Oracle GoldenGate的任何非數(shù)據(jù)庫(kù)服務(wù)器。

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執(zhí)行交互式安裝
OUI安裝在數(shù)據(jù)庫(kù)版本在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.
交互式安裝提供了一個(gè)圖形用戶界面,提示所需的安裝信息。 這些說(shuō)明適用于新的安裝和升級(jí)。 但是,要執(zhí)行升級(jí)到Oracle GoldenGate,請(qǐng)按照升級(jí)Oracle GoldenGate for Windows和UNIX的說(shuō)明進(jìn)行操作,其中包括在適當(dāng)時(shí)間運(yùn)行OUI的提示。

2.5.2 Performing a Silent Installation with OUI 使用OUI執(zhí)行靜默安裝
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.
您可以通過(guò)運(yùn)行響應(yīng)文件執(zhí)行靜默安裝。 您可以通過(guò)在交互式OUI會(huì)話期間選擇保存響應(yīng)文件選項(xiàng)或通過(guò)編輯模板來(lái)創(chuàng)建響應(yīng)文件,如示例2-4所示。 要運(yùn)行響應(yīng)文件,請(qǐng)發(fā)出以下命令。
./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 準(zhǔn)備Oracle GoldenGate數(shù)據(jù)庫(kù)
This chapter contains steps to take so that the source Oracle Database is configured properly to support the capture of transactional changes.
本章包含采取的步驟,以便正確配置源Oracle數(shù)據(jù)庫(kù)以支持事務(wù)性更改的捕獲。

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 組態(tài)集成過(guò)程的連接
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,則每個(gè)都需要tnsnames.ora文件中的專用服務(wù)器連接。 在配置這些進(jìn)程時(shí),您可以使用"提取和復(fù)制"參數(shù)文件中的USERID或USERIDALIAS參數(shù)來(lái)指導(dǎo)進(jìn)程使用這些連接。

示例:
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依賴重做日志來(lái)捕獲復(fù)制源事務(wù)所需的數(shù)據(jù)。 在啟動(dòng)Oracle GoldenGate處理之前,必須正確配置源系統(tǒng)上的Oracle重做日志。
本節(jié)介紹適用于Oracle GoldenGate的以下日志記錄級(jí)別。 您使用的日志記錄級(jí)別取決于您使用的Oracle GoldenGate功能或功能。

3.2.1 Enabling Minimum Database-level Supplemental Logging 啟用最低數(shù)據(jù)庫(kù)級(jí)補(bǔ)充日志記錄
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強(qiáng)烈建議將Oracle源數(shù)據(jù)庫(kù)置于強(qiáng)制登錄模式。 強(qiáng)制日志記錄模式強(qiáng)制記錄所有事務(wù)和加載,覆蓋任何用戶或存儲(chǔ)設(shè)置相反。 這樣可以確保"提取"配置中的源數(shù)據(jù)不會(huì)丟失。

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時(shí),Oracle數(shù)據(jù)庫(kù)需要最少的補(bǔ)充日志記錄(數(shù)據(jù)庫(kù)級(jí)別選項(xiàng))。 這將添加行鏈接信息(如果有的話)到重做日志以進(jìn)行更新操作。

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.
強(qiáng)烈不鼓勵(lì)數(shù)據(jù)庫(kù)級(jí)主鍵(PK)和唯一索引(UI)日志記錄,因?yàn)樗趶?fù)制之外的表上創(chuàng)建了額外的額外開(kāi)銷。 除非這些日志選項(xiàng)是商業(yè)目的需要的,否則您只需要在數(shù)據(jù)庫(kù)級(jí)別啟用最少的補(bǔ)充日志記錄,并強(qiáng)制Oracle GoldenGate的日志記錄。

檢查是否開(kāi)啟最小補(bǔ)充日志和force logging:
SELECT supplemental_log_data_min, force_logging FROM v$database;

開(kāi)啟最小補(bǔ)充日志和force logging:
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
ALTER DATABASE FORCE LOGGING;

3.2.2 Enabling Schema-level Supplemental Logging 啟用schema級(jí)補(bǔ)充日志記錄
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級(jí)補(bǔ)充日志記錄.使用Oracle GoldenGate DDL復(fù)制功能時(shí),Oracle源數(shù)據(jù)庫(kù)需要Schema級(jí)日志記錄。在所有其他用例中,它是可選的,但是您必須使用表級(jí)日志記錄(請(qǐng)參閱啟用表級(jí)補(bǔ)充日志記錄)。

注意:Oracle強(qiáng)烈建議使用模式級(jí)日志記錄而不是表級(jí)日志記錄,因?yàn)樗梢源_保添加到模式中的任何新表符合通配符規(guī)范。

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 啟用表級(jí)補(bǔ)充日志
在以下情況下,在源系統(tǒng)上啟用表級(jí)補(bǔ)充日志記錄:在不使用schema級(jí)日志記錄時(shí)啟用所需級(jí)別的日志記錄(請(qǐng)參閱啟用schema級(jí)補(bǔ)充日志記錄);防止為任何給定的表記錄主鍵; 在表級(jí)別記錄非關(guān)鍵列值,以支持特定的Oracle GoldenGate功能,例如過(guò)濾和沖突檢測(cè)和解析邏輯。

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.
        沒(méi)有其他選項(xiàng)的ADD TRANDATA可以自動(dòng)啟用主鍵的無(wú)條件補(bǔ)充日志記錄和條件補(bǔ)充日志記錄表的唯一鍵和外鍵。 無(wú)條件日志記錄會(huì)將主鍵值強(qiáng)制到日志,無(wú)論在當(dāng)前操作中鍵是否更改。 條件記錄記錄外部或唯一鍵的所有列值,如果當(dāng)前操作中至少有一個(gè)值被更改。 默認(rèn)值是可選的,以支持非集成的Replicat(另見(jiàn)NOSCHEDULINGCOLS),但是需要支持集成的Replicat,因?yàn)橹麈I,唯一鍵和外鍵都必須可用于入站服務(wù)器以計(jì)算依賴關(guān)系。 有關(guān)集成的Replicat的更多信息,請(qǐng)參閱確定使用哪種應(yīng)用方法。

        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可以對(duì)表的所有列進(jìn)行無(wú)條件的補(bǔ)充記錄。 當(dāng)源表和目標(biāo)表具有不同的調(diào)度列時(shí),用于支持集成的Replicat。  (調(diào)度列是主鍵,唯一鍵和外鍵)。

        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僅在非集成模式下對(duì)Replicat有效。 它使用ADD SUPPLEMENTAL LOG DATA ALWAYS子句發(fā)出一個(gè)ALTER TABLE命令,該子句適用于為表定義的唯一約束類型,或不存在唯一約束的所有列。 當(dāng)不使用模式級(jí)日志記錄時(shí),此命令滿足Oracle GoldenGate的基本表級(jí)日志記錄要求。 請(qǐng)參閱確定源和目標(biāo)表中的行唯一性,以了解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子句所需的非鍵列或過(guò)濾和操作。 括號(hào)是必需的。 這些列除了主鍵之外還將被記錄,除非NOKEY選項(xiàng)也存在。

        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參數(shù)中的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選項(xiàng)的ADD TRANDATA,則為目標(biāo)上的那些列創(chuàng)建唯一的索引,以優(yōu)化行檢索。 如果您正在將這些列作為KEYCOLS子句的替代鍵進(jìn)行記錄,請(qǐng)?jiān)谂渲肙racle GoldenGate進(jìn)程時(shí),記下將KEYCOLS子句添加到TABLE和MAP語(yǔ)句。
 
  See Reference for Oracle GoldenGate for Windows and UNIX for more information about ADD TRANDATA.

3.3 Enabling Oracle GoldenGate in the Database 在數(shù)據(jù)庫(kù)中啟用Oracle GoldenGate
必須為Oracle 11.2.0.4或更高版本的數(shù)據(jù)庫(kù)顯式啟用支持Oracle GoldenGate捕獲和應(yīng)用所需的數(shù)據(jù)庫(kù)服務(wù)。 這是Extract和Replicat的所有模式所必需的。

要啟用Oracle GoldenGate,請(qǐng)?jiān)O(shè)置以下數(shù)據(jù)庫(kù)初始化參數(shù)。 Oracle RAC中的所有實(shí)例必須具有相同的設(shè)置。
ENABLE_GOLDENGATE_REPLICATION =true

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

3.4 Setting Flashback Query 設(shè)置閃回查詢
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.
默認(rèn)情況下,Oracle GoldenGate使用Flashback Query從undo(rollback)表空間中獲取值。 這樣,Oracle GoldenGate可以根據(jù)特定時(shí)間或SCN重建一個(gè)讀取一致的行圖像,以匹配重做記錄。

For best fetch results, configure the source database as follows:為獲得最佳提取結(jié)果,請(qǐng)按如下方式配置源數(shù)據(jù)庫(kù)
  1.通過(guò)設(shè)置Oracle初始化參數(shù)UNDO_MANAGEMENT和UNDO_RETENTION來(lái)設(shè)置足夠的重做保留次數(shù)
  2.使用以下公式計(jì)算undo表空間中所需的空間。
     undo_space = UNDO_RETENTION * UPS + overhead
     Use the system view V$UNDOSTAT to estimate UPS and overhead.
  3.對(duì)于包含LOB的表,請(qǐng)執(zhí)行以下操作之一:
    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 10 until the statistics show low values.
  4.Grant either of the following privileges to the Oracle GoldenGate Extract user:
     GRANT FLASHBACK ANY TABLE TO db_user:
     
     GRANT FLASHBACK ON schema.table TO db_user

3.5 Managing Server Resources 管理服務(wù)器資源
在集成模式下,Extract與源數(shù)據(jù)庫(kù)中的底層日志服務(wù)器進(jìn)行交互,Replicat與目標(biāo)數(shù)據(jù)庫(kù)中的入站服務(wù)器進(jìn)行交互。 本節(jié)提供管理這些服務(wù)器所使用的共享內(nèi)存的指導(dǎo)。

服務(wù)器使用的共享內(nèi)存來(lái)自數(shù)據(jù)庫(kù)中系統(tǒng)全局區(qū)域(SGA)的Streams池部分。 因此,您必須將數(shù)據(jù)庫(kù)初始化參數(shù)STREAMS_POOL_SIZE設(shè)置得足夠高,以保持足夠的內(nèi)存可用于您希望以集成模式運(yùn)行的Extract和Replicat進(jìn)程數(shù)。 請(qǐng)注意,Streams池也被數(shù)據(jù)庫(kù)的其他組件(如Oracle Streams,Advanced Queuing和Datapump導(dǎo)出/導(dǎo)入)使用,因此在確定Oracle GoldenGate的Streams池時(shí),請(qǐng)務(wù)必考慮它們。

默認(rèn)情況下,一個(gè)集成捕獲提取請(qǐng)求登錄服務(wù)器以MAX_SGA_SIZE為1GB的行數(shù)運(yùn)行,并且PARALLELISM為2.因此,如果在同一數(shù)據(jù)庫(kù)實(shí)例中以集成捕獲模式運(yùn)行三個(gè)提取,則至少需要3 GB的內(nèi)存 到Streams池。 作為最佳做法,可以保留25%的Streams池。 例如,如果集成捕獲模式中有三個(gè)提取,請(qǐng)將STREAMS_POOL_SIZE設(shè)置為以下:
3 GB + (3 GB * 0.25) = 3.75 GB


4. Establishing Oracle GoldenGate Credentials 建立Oracle GoldenGate證書(shū)
This chapter provides guidelines for creating database users for the processes that will interact with the database, assigning the correct privileges, and securing the credentials from unauthorized use.
本章提供了為與數(shù)據(jù)庫(kù)進(jìn)行交互的過(guò)程創(chuàng)建數(shù)據(jù)庫(kù)用戶的準(zhǔn)則,分配正確的權(quán)限以及保護(hù)憑據(jù)以防止未經(jīng)授權(quán)的使用。

This chapter includes the following sections:本章包括以下部分:

    Assigning Credentials to Oracle GoldenGate

    Securing the Oracle GoldenGate Credentials
    
4.1 Assigning Credentials to Oracle GoldenGate
The Oracle GoldenGate processes require one or more database credentials with the correct database privileges for the database version, database configuration, and Oracle GoldenGate features that you are using. Create a source database user and a target database user, each one dedicated to Oracle GoldenGate on the source and target systems. The assigned user can be the same user for all of the Oracle GoldenGate processes that must connect to a source or target Oracle Database.
Oracle GoldenGate進(jìn)程需要一個(gè)或多個(gè)數(shù)據(jù)庫(kù)憑據(jù),以及正在使用的數(shù)據(jù)庫(kù)版本,數(shù)據(jù)庫(kù)配置和Oracle GoldenGate功能的正確數(shù)據(jù)庫(kù)權(quán)限。 創(chuàng)建源數(shù)據(jù)庫(kù)用戶和目標(biāo)數(shù)據(jù)庫(kù)用戶,每個(gè)用戶都在源和目標(biāo)系統(tǒng)上專用于Oracle GoldenGate。 對(duì)于必須連接到源或目標(biāo)Oracle數(shù)據(jù)庫(kù)的所有Oracle GoldenGate進(jìn)程,分配的用戶可以是相同的用戶。

The following sections outline the Oracle GoldenGate processes that require user credentials:

    Extract User

    Replicat User

    Other Oracle GoldenGate Users

4.1.1 Extract User
The Extract user performs metadata queries on the source database and fetches data from the source tables when needed. In a local mining deployment of integrated capture, this user also creates, alters, and connects to the logmining server and receives logical change records (LCR) from it. (See Deciding Which Capture Method to Use for more information about capture modes.)

If the source database is a multitenant container database, the Extract user must be a common user and must log into the root container. See Configuring Oracle GoldenGate in a Multitenant Container Database for more information.

You need to assign an additional user if Extract will be operating in integrated capture mode and you are using a downstream mining database. This user will be the mining user and is created in the downstream database. The mining user creates, alters, and connects to the logmining server on the mining database, and it receives logical change records (LCR) from it. This user can be the same as the source Extract user or different. Choose the name of the mining user carefully. Once created by this user, the database logmining server cannot be altered or used by another user. See Configuring a Downstream Mining Database for more information about configuring downstream mining.

4.1.2 Replicat User
The Replicat user creates the Replicat checkpoint table (if used) and applies DML and DDL operations through Oracle Call Interface or through a database inbound server, depending on the Replicat mode. (See Deciding Which Apply Method to Use for more information about Replicat modes.)
Replicat用戶創(chuàng)建Replicat檢查點(diǎn)表(如果使用),并根據(jù)Replicat模式通過(guò)Oracle調(diào)用接口或數(shù)據(jù)庫(kù)入站服務(wù)器應(yīng)用DML和DDL操作。  (有關(guān)復(fù)制模式的更多信息,請(qǐng)參閱確定使用哪種應(yīng)用方法。)

4.1.3 Other Oracle GoldenGate Users
A user is required in the source database for the Manager process if you are using Oracle GoldenGate DDL support. This user performs maintenance on the Oracle GoldenGate database objects that support DDL capture.
如果您正在使用Oracle GoldenGate DDL支持,則需要在源數(shù)據(jù)庫(kù)中為Manager進(jìn)程使用用戶。 此用戶對(duì)支持DDL捕獲的Oracle GoldenGate數(shù)據(jù)庫(kù)對(duì)象執(zhí)行維護(hù)。

4.1.4 Granting the Appropriate User Privileges 授予適當(dāng)?shù)挠脩魴?quán)限
The user privileges that are required for Oracle GoldenGate depend on the database version and the Extract or Replicat process mode. For more information about process modes, see Choosing Capture and Apply Modes.

4.1.4.1 Oracle 11.2.0.4 or Later Database Privileges

4.1.4.2 Oracle 11.2.0.3 or Earlier Database Privileges

4.1.4.3 About the dbms_goldengate_auth.grant_admin_privilege Package
Most of the privileges that are needed for Extract and Replicat to operate in classic and integrated mode are granted through the dbms_goldengate_auth.grant_admin_privilege package.
Extract和Replicat以經(jīng)典和集成模式運(yùn)行所需的大部分權(quán)限通過(guò)dbms_goldengate_auth.grant_admin_privilege包進(jìn)行授予。

4.1.4.4 Optional Grants for dbms_goldengate_auth.grant_admin_privilege
Additional grants can be added to dbms_goldengate_auth.grant_admin_privilege to support the optional features shown in Table 4-3.

4.2 Securing the Oracle GoldenGate Credentials
To preserve the security of your data, and to monitor Oracle GoldenGate processing accurately, do not permit other users, applications, or processes to log on as, or operate as, an Oracle GoldenGate database user.
為了保持?jǐn)?shù)據(jù)的安全性,并準(zhǔn)確監(jiān)控Oracle GoldenGate處理,不允許其他用戶,應(yīng)用程序或進(jìn)程以O(shè)racle GoldenGate數(shù)據(jù)庫(kù)用戶身份登錄或操作。

Oracle GoldenGate provides different options for securing the login credentials assigned to Oracle GoldenGate processes. The recommended option is to use a credential store. You can create one credential store and store it in a shared location where all installations of Oracle GoldenGate can access it, or you can create a separate one on each system where Oracle GoldenGate is installed.
Oracle GoldenGate提供了不同的選項(xiàng)來(lái)保護(hù)分配給Oracle GoldenGate進(jìn)程的登錄憑據(jù)。 推薦的選項(xiàng)是使用憑證存儲(chǔ)。 您可以創(chuàng)建一個(gè)憑據(jù)存儲(chǔ),并將其存儲(chǔ)在Oracle GoldenGate的所有安裝可以訪問(wèn)的共享位置,也可以在安裝了Oracle GoldenGate的每個(gè)系統(tǒng)上創(chuàng)建一個(gè)單獨(dú)的憑據(jù)存儲(chǔ)。

The credential store stores the user name and password for each of the assigned Oracle GoldenGate users. A user ID is associated with one or more aliases, and it is the alias that is supplied in commands and parameter files, not the actual user name or password. The credential file can be partitioned into domains, allowing a standard set of aliases to be used for the processes, while allowing the administrator on each system to manage credentials locally.
憑據(jù)存儲(chǔ)存儲(chǔ)每個(gè)分配的Oracle GoldenGate用戶的用戶名和密碼。 用戶ID與一個(gè)或多個(gè)別名相關(guān)聯(lián),它是在命令和參數(shù)文件中提供的別名,而不是實(shí)際的用戶名或密碼。 可以將憑據(jù)文件分區(qū)為域,允許將一組標(biāo)準(zhǔn)的別名用于進(jìn)程,同時(shí)允許每個(gè)系統(tǒng)上的管理員在本地管理憑據(jù)。

See “Administering Oracle GoldenGate for Windows and UNIX” for more information about creating a credential store and adding user credentials.
有關(guān)創(chuàng)建憑據(jù)存儲(chǔ)和添加用戶憑據(jù)的更多信息,請(qǐng)參閱管理適用于Windows和UNIX的Oracle GoldenGate。

 







 



 





向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI