ITPub博客

首页 > 数据库 > Oracle > Oracle GoldenGate 11g官方文档Administrator’s Guide续五

Oracle GoldenGate 11g官方文档Administrator’s Guide续五

翻译 Oracle 作者:long_small 时间:2020-05-26 18:15:25 0 删除 编辑

C HAPTER 5

Using Oracle GoldenGate for live reporting

第五章

使用Oracle GoldenGate进行实时报告

Overview of the reporting configuration

最基本的Oracle GoldenGate配置是沿一个方向复制的一对一配置:从源数据库到目标数据库,该数据库仅用于数据检索目的,例如报告和分析。 Oracle GoldenGate支持类似
或异构数据传输,具有在配置中的任何一个系统上进行过滤和转换的功能(支持因数据库平台而异)

报告拓扑


Oracle GoldenGate支持多种报告拓扑,使您可以根据对可伸缩性,可用性和性能的要求自定义配置模块。

单一目标

● “Creating a standard reporting configuration” on page 45 

● “Creating a reporting configuration with a data pump on the source system” on page 47 

● “Creating a reporting configuration with a data pump on an intermediary system” on  page 50

● “Creating a cascading reporting configuration” on page 55

多个目标

您可以将数据发送到多个报告目标。 请参阅第63页“使用Oracle GoldenGate进行实时数据分发”


选择报告配置时的注意事项

数据量

如果满足以下条件,则标准配置就足够了:

● 事务负载是一致的,并且具有中等大小的事务负载,该负载或多或少均匀地分布在所有要复制的对象中。

● 没有以下内容:受长时间事务处理的表,具有大量更改的列的表或包含Oracle GoldenGate必须从数据库中获取的列的表(通常是具有LOB的列, 受Oracle GoldenGate执行的SQL过程以及未记录到事务日志中的列的影响)。

如果您的环境不满足这些条件,请考虑添加一组或多组并行进程。 有关更多信息,请参见《 Oracle GoldenGate Windows和UNIX故障排除和调优指南》。


过滤和转换

数据过滤和数据转换都增加了开销,并且这些活动有时容易出现配置错误。 如果Oracle GoldenGate必须执行大量筛选和转换,请考虑使用一个或多个数据泵来完成这项工作。 您

可以使用复制来实现此目的,但是您将以这种方式通过网络发送更多数据,因为这些数据将未经过滤。 您可以通过在数据泵和复制之间划分过滤和转换,在两个系统之间进行划分。

要过滤数据,可以使用:

●在TABLE语句(Extract)或MAP语句(Replicat)中的FILTER或WHERE条件。

●SQL查询或存贮过程

●用户接口

要转换数据,可以使用:

●本机Oracle GoldenGate转换功能

●用户退出提取或复制过程,该过程应用来自外部转换解决方案的规则,然后将经处理的数据返回给Oracle GoldenGate。

●复制以将数据直接传递到ETL解决方案或其他转换引擎

有关Oracle GoldenGate的过滤和转换支持的更多信息,请参见:

●第140页上的“映射和处理数据”

●第224页的“自定义Oracle GoldenGate处理”


只读与高可用性

Oracle GoldenGate实时报告配置支持只读目标。 如果此配置中的目标也将用于支持高可用性的事务活动,请参阅第92页,“ Configuring Oracle GoldenGate for active-active high availability”。

附加信息

有关其他系统和数据库配置要求,请参见适用于您的数据库类型的《 Oracle GoldenGate安装和设置指南》。

有关Teradata Extract配置的其他要求的信息,请参见《 Oracle GoldenGate Teradata安装和设置指南》。


创建标准报告配置

在标准的Oracle GoldenGate配置中,一个抽取组通过TCP / IP将捕获的数据发送到目标系统上的路径,在该路径上存储该数据,直到由一个复制组进行处理。 请参阅图8,以直观方式表示要创建的对象

Source system 

To configure the Manager process 

1. On the source, configure the Manager process according to the instructions in Chapter  3. 

To configure the Extract group 

2. On the source, use the ADD EXTRACT command to create an Extract group. For  documentation purposes, this group is called ext . 

ADD EXTRACT <ext>, {TRANLOG | INTEGRATED TRANLOG}, BEGIN <time>  [, THREADS <n>] ❍ 

For TRANLOG and INTEGRATED TRANLOG , see the Oracle GoldenGate Windows and  UNIX Reference Guide . INTEGRATED TRANLOG enabled integrated capture for an  Oracle database.

3. On the source, use the ADD RMTTRAIL command to specify a remote trail to be created on   the target system. ADD RMTTRAIL <remote_trail>, EXTRACT <ext> ❍ Use the EXTRACT argument to link this trail to the Extract group.

On the source, use the EDIT PARAMS command to create a parameter file for the Extract   group. Include the following parameters plus any others that apply to your database   environment. 

-- Identify the Extract group: EXTRACT <ext> -- Specify database login information as needed for the database: 

[SOURCEDB <dsn_1>][, USERID <user>[, PASSWORD <pw>   [<encryption options>]]

-- Specify the name or IP address of the target system and 

-- optional encryption across TCP/IP: RMTHOST <target>, MGRPORT <portnumber>, ENCRYPT <encryption options> 

-- Specify the remote trail and encryption options on the target system: ENCRYPTTRAIL [<encryption options>] RMTTRAIL <remote_trail> 

-- Specify tables to be captured: TABLE <owner>.<table>;


Target system 

To configure the Manager process 

5.  On the target, configure the Manager process according to the instructions in Chapter   3. 

6. In the Manager parameter file, use the PURGEOLDEXTRACTS parameter to control the   purging of files from the local trail. 

To configure the Replicat group 

7.  On the target, create a Replicat checkpoint table. For instructions, see “Creating a   checkpoint table” on page 183. All Replicat groups can use the same checkpoint table. 

8. On the target, use the ADD REPLICAT command to create a Replicat group. For   documentation purposes, this group is called rep . ADD REPLICAT <rep>, EXTTRAIL <remote_trail>, BEGIN <time> 

❍ Use the EXTTRAIL argument to link the Replicat group to the remote trail

9. On the target, use the EDIT PARAMS command to create a parameter file for the Replicat   group. Include the following parameters plus any others that apply to your database   environment.

-- Identify the Replicat group: REPLICAT <rep> 

-- State whether or not source and target definitions are identical: 

SOURCEDEFS <full_pathname> | ASSUMETARGETDEFS 

-- Specify database login information as needed for the database: 

[TARGETDB <dsn_2>][, USERID <user>][, PASSWORD <pw>   [<encryption options>]] 

-- Specify error handling rules: 

-- Specify decryption if trail is encrypted: 

DECRYPTTRAIL <encryption options> 

REPERROR (<error>, <response>) 

-- Specify tables for delivery: 

MAP <owner>.<table>, TARGET <owner>.<table>[, DEF <template name>];


在源系统上使用数据泵创建报告配置

您可以在源系统上添加一个数据泵,以将主要抽取与TCP/IP功能隔离,增加存储灵活性,并从主要抽取中减轻过滤和转换处理的开销。

在此配置中,主抽取写入源系统上的本地队列。 本地数据泵读取该队列并将数据移动到目标系统上的远程队列,该队列由Replicat读取

您可以但不是必须使用数据泵来提高Oracle GoldenGate的性能和容错能力

请参阅图9,以直观方式表示要创建的对象

Source system 

To configure the Manager process

1. On the source, configure the Manager process according to the instructions in Chapter   3. 

2. In the Manager parameter file, use the PURGEOLDEXTRACTS parameter to control the   purging of files from the local trail.

To configure the primary Extract group

3. On the source, use the ADD EXTRACT command to create a primary Extract group. For   documentation purposes, this group is called ext . 

ADD EXTRACT <ext>, {TRANLOG | INTEGRATED TRANLOG}, BEGIN <time>   [, THREADS <n>] 

❍ For TRANLOG and INTEGRATED TRANLOG , see the Oracle GoldenGate Windows and   UNIX Reference Guide . INTEGRATED TRANLOG enabled integrated capture for an   Oracle database.

4. On the source, use the ADD EXTTRAIL command to create a local trail. The primary   Extract writes to this trail, and the data-pump Extract reads it. 

ADD EXTTRAIL <local_trail>, EXTRACT <ext> 

❍ Use the EXTRACT argument to link this trail to the primary Extract group. The   primary Extract group writes to this trail, and the data pump group reads it.

5. On the source, use the EDIT PARAMS command to create a parameter file for the primary   Extract group. Include the following parameters plus any others that apply to your   database environment.

-- Identify the Extract group: 

EXTRACT <ext> 

-- Specify database login information as needed for the database: 

[SOURCEDB <dsn_1>][,USERID <user>][, PASSWORD <pw>   [<encryption options>]] 

-- Specify the local trail that this Extract writes to and  

-- optional encryption: 

ENCRYPTTRAIL <encryption options> 

EXTTRAIL <local_trail> 

-- Specify tables to be captured: TABLE <owner>.<table>;


To configure the data pump Extract group

6. On the source, use the ADD EXTRACT command to create a data pump group. For   documentation purposes, this group is called pump . 

ADD EXTRACT <pump>, EXTTRAILSOURCE <local_trail>, BEGIN <time>

❍ Use EXTTRAILSOURCE as the data source option, and specify the name of the local   trail.

7. On the source, use the ADD RMTTRAIL command to specify a remote trail that will be   created on the target system. 

ADD RMTTRAIL <remote_trail>, EXTRACT <pump>

❍ Use the EXTRACT argument to link the remote trail to the data pump group. The   linked data pump writes to this trail.

8. On the source, use the EDIT PARAMS command to create a parameter file for the data   pump. Include the following parameters plus any others that apply to your database   environment. 

-- Identify the data pump group:

EXTRACT <pump> 

-- Specify database login information if using NOPASSTHRU: 

[SOURCEDB <dsn_1>][, USERID <user>][, PASSWORD <pw>   [<encryption options>]] 

-- Specify decryption if input trail is encrypted: 

DECRYPTTRAIL <encryption options> 

-- Specify the name or IP address of the target system 

-- and optional encryption of data over TCP/IP:

RMTHOST <target>, MGRPORT <portnumber>, ENCRYPT <encryption options> 

-- Specify the remote trail and encryption options on the target system:

ENCRYPTTRAIL [<encryption options>] 

RMTTRAIL <remote_trail> 

-- Allow mapping, filtering, conversion or pass data through as-is: 

[PASSTHRU | NOPASSTHRU] 

-- Specify tables to be captured: 

TABLE <owner>.<table>;

     注意:要使用PASSTHRU模式,源对象和目标对象的名称必须相同。 如果无法在参数文件中指定列映射,过滤,SQLEXEC函数,转换或其他需要数据操作的函            数。 通过将PASSTHRU和NOPASSTHRU与不同的TABLE语句配对,可以将常规处理与传递处理结合起来


Target system 

To configure the Manager process

9. On the target, configure the Manager process according to the instructions in Chapter   3. 

10. In the Manager parameter file, use the PURGEOLDEXTRACTS parameter to control the   purging of files from the local trail.

To configure the Replicat group 

11. On the target, create a Replicat checkpoint table. For instructions, see “Creating a   checkpoint table” on page 183. 

12. On the target, use the ADD REPLICAT command to create a Replicat group. For   documentation purposes, this group is called rep . 

ADD REPLICAT <rep>, EXTTRAIL <remote_trail>, BEGIN <time>

❍ Use the EXTTRAIL argument to link the Replicat group to the remote trail.

13. On the target, use the EDIT PARAMS command to create a parameter file for the Replicat   group. Include the following parameters plus any others that apply to your database   environment. 

-- Identify the Replicat group:

REPLICAT <rep>

-- State whether or not source and target definitions are identical: 

SOURCEDEFS <full_pathname> | ASSUMETARGETDEFS

-- Specify database login information as needed for the database: 

[TARGETDB <dsn_2>][, USERID <user>][, PASSWORD <pw>   [<encryption options>]] 

-- Specify decryption if input trail is encrypted: 

DECRYPTTRAIL <encryption options> 

-- Specify error handling rules: 

REPERROR (<error>, <response>) 

-- Specify tables for delivery: 

MAP <owner>.<table>, TARGET <owner>.<table>[, DEF <template name>];


Creating a reporting configuration with a data pump on an intermediary system

--使用中间系统上的数据泵创建报告配置

您可以将中间系统用作源系统和目标系统之间的转移点。 在此配置中,源系统上的数据泵将捕获的数据发送到中间系统上的远程队列。 中间系统上的数据泵读取队列并将数据发送到目标上的远程队列。 目标上的副本读取远程队列,并将数据应用于目标数据库。


考虑此拓扑时,请注意以下几点

● 如果源系统和目标系统位于不同的网络中并且它们之间没有直接连接,则此配置很实用。 您可以通过可以连接到两个系统的中间系统来传输数据

●此配置可用于增加存储灵活性,以补偿源或目标上的缺陷。

●如果所有系统上的字符集相同,则此配置可用于执行数据过滤和转换。 如果字符集不同,则数据泵无法在字符集之间执行转换,并且您必须配置Replicat才能在目标上执行转换和转换。

●要使用中介系统上的数据泵执行数据转换,假设字符集相同,则必须使用DEFGEN实用程序创建源定义文件和目标定义文件,然后将这两个文件都传输到中介系统。 有关定义文件和转换的更多信息,请参见第13章。

●此配置是级联复制的一种形式。 但是,在此配置中,数据不应用于中间系统上的数据库。 要在Oracle GoldenGate配置中将数据库包含在中间系统上,请参见“ Creating a   cascading reporting configuration”(第58页)。


Source system 

Refer to Figure 10 for a visual representation of the objects you will be creating.

To configure the Manager process 

1. On the source, configure the Manager process according to the instructions in Chapter   3. 

2. In the Manager parameter file, use the PURGEOLDEXTRACTS parameter to control the   purging of files from the trail.

To configure the primary Extract group on the source

3. On the source, use the ADD EXTRACT command to create a primary Extract group. For   documentation purposes, this group is called ext . 

ADD EXTRACT <ext>, {TRANLOG | INTEGRATED TRANLOG}, BEGIN <time> [, THREADS <n>]

❍ For TRANLOG and INTEGRATED TRANLOG , see the Oracle GoldenGate Windows and   UNIX Reference Guide . INTEGRATED TRANLOG enabled integrated capture for an   Oracle database.

4. On the source, use the ADD EXTTRAIL command to create a local trail. The primary   Extract writes to this trail, and the data-pump Extract reads it. 

ADD EXTTRAIL <local_trail>, EXTRACT <ext>

❍ Use the EXTRACT argument to link this trail to the primary Extract group. The   primary Extract group writes to this trail, and the data pump group reads it.

5. On the source, use the EDIT PARAMS command to create a parameter file for the primary   Extract group. Include the following parameters plus any others that apply to your   database environment. 

-- Identify the Extract group:

EXTRACT <ext> 

-- Specify database login information as needed for the database: 

[SOURCEDB <dsn_1>][, USERID <user>][, PASSWORD <pw>   [<encryption options>]] 

-- Specify the local trail that this Extract writes to and 

  -- encryption options: 

ENCRYPTTRAIL <encryption options> 

EXTTRAIL <local_trail>

-- Specify tables to be captured: TABLE <owner>.<table>;


To configure the data pump on the source

6. On the source, use the ADD EXTRACT command to create a data pump group. For   documentation purposes, this group is called pump_1 . 

ADD EXTRACT <pump_1>, EXTTRAILSOURCE <local_trail>, BEGIN <time>

❍ Use EXTTRAILSOURCE as the data source option, and specify the name of the local   trail.

7. On the source, use the ADD RMTTRAIL command to specify a remote trail that will be   created on the intermediary system. 

ADD RMTTRAIL <remote_trail_1>, EXTRACT <pump_1>

❍ Use the EXTRACT argument to link the remote trail to the pump_1 data pump group.   The linked data pump writes to this trail.

8. On the source, use the EDIT PARAMS command to create a parameter file for the pump_1   data pump. Include the following parameters plus any others that apply to your   database environment.

-- Identify the data pump group:

EXTRACT <pump_1> 

-- Specify database login information: 

[SOURCEDB <dsn_1>][, USERID <user>][, PASSWORD <pw>   [<encryption options>]]

-- Specify decryption if input trail is encrypted: 

DECRYPTTRAIL <encryption options> 

-- Specify the name or IP address of the intermediary system 

-- and optional encryption of data over TCP/IP: 

RMTHOST <target_1>, MGRPORT <portnumber>, ENCRYPT <encryption options> 

-- Specify remote trail and encryption options on intermediary system:

ENCRYPTTRAIL [<encryption options>] 

RMTTRAIL <remote_trail_1> 

-- Allow mapping, filtering, conversion or pass data through as-is: 

[PASSTHRU | NOPASSTHRU] 

-- Specify tables to be captured: TABLE <owner>.<table>;


       注意:要使用PASSTHRU模式,源对象和目标对象的名称必须相同。 如果无法在参数文件中指定列映射,过滤,SQLEXEC函数,转换或其他需要数据操作的              函数。 通过将PASSTHRU和NOPASSTHRU与不同的TABLE语句配对,可以将常规处理与传递处理结合起来


Intermediary system 

To configure the Manager process on the intermediary system

9. On the intermediary system, configure the Manager process according to the   instructions in Chapter 3. 

10. In the Manager parameter file, use the PURGEOLDEXTRACTS parameter to control the   purging of files from the trail.

To configure the data pump on the intermediary system 

11. On the intermediary system, use the ADD EXTRACT command to create a data-pump   group. For documentation purposes, this group is called pump_2 . 

ADD EXTRACT <pump_2>, EXTTRAILSOURCE <local_trail_1>, BEGIN <time>

❍ Use EXTTRAILSOURCE as the data source option, and specify the name of the trail that   you created on this system.

12. On the intermediary system, use the ADD RMTTRAIL command to specify a remote trail   on the target system. 

ADD RMTTRAIL <remote_trail_2>, EXTRACT <pump_2>

❍ Use the EXTRACT argument to link the remote trail to the pump_2 data pump. The   linked data pump writes to this trail.

13. On the intermediary system, use the EDIT PARAMS command to create a parameter file   for the pump_2 data pump. Include the following parameters plus any others that   apply to your database environment.

-- Identify the data pump group:

EXTRACT <pump_2>

-- Note that no database login parameters are required in this case.

-- State whether or not source and target definitions are identical:

SOURCEDEFS <full_pathname> | ASSUMETARGETDEFS

-- Specify the target definitions file if SOURCEDEFS was used:

TARGETDEFS <full_pathname>

-- Specify decryption if input trail is encrypted:

DECRYPTTRAIL <encryption options>

-- Specify the name or IP address of the target system

-- and optional encryption of data over TCP/IP:

RMTHOST <target_2>, MGRPORT <portnumber>, ENCRYPT <encryption options>

-- Specify the remote trail and encryption options on the target system:

ENCRYPTTRAIL [<encryption options>]

RMTTRAIL <remote_trail_2>

-- Allow mapping, filtering, conversion or pass data through as-is;

[PASSTHRU | NOPASSTHRU]

-- Specify tables to be captured:

TABLE <owner>.<table>;

❍ Use SOURCEDEFS and TARGETDEFS to specify the definitions files if the data pump will   perform conversion and transformation. 

❍ Use NOPASSTHRU (the default) if the data pump will perform conversion and   transformation. Otherwise, use PASSTHRU.


Target system 

To configure the Manager process on the target

14. On the target system, configure the Manager process according to the instructions in   Chapter 3. 

15. In the Manager parameter file, use the PURGEOLDEXTRACTS parameter to control the   purging of files from the trail. 

To configure the Replicat group on the target

16. On the target, create a Replicat checkpoint table. For instructions, see “Creating a   checkpoint table” on page 183. 

17. On the target, use the ADD REPLICAT command to create a Replicat group. For   documentation purposes, this group is called rep . 

ADD REPLICAT <rep>, EXTTRAIL <remote_trail_2>, BEGIN <time>

❍ Use the EXTTRAIL argument to link the Replicat group to the trail on this system.

18. On the target, use the EDIT PARAMS command to create a parameter file for the Replicat   group. Include the following parameters plus any others that apply to your database   environment. 

-- Identify the Replicat group:

REPLICAT <rep>

-- State whether or not source and target definitions are identical:

SOURCEDEFS <full_pathname> | ASSUMETARGETDEFS

-- Specify database login information as needed for the database:

[TARGETDB <dsn_2>][, USERID <user>][, PASSWORD <pw> 

[<encryption options>]]

-- Specify decryption if input trail is encrypted:

DECRYPTTRAIL <encryption options>

-- Specify error handling rules:

REPERROR (<error>, <response>)

-- Specify tables for delivery:

MAP <owner>.<table>, TARGET <owner>.<table>[, DEF <template name>];


Creating a cascading reporting configuration

Oracle GoldenGate支持级联同步,其中Oracle GoldenGate将数据更改从源数据库传播到第二个数据库,然后传播到第三个数据库。 在此配置中

●源上的主抽取将捕获的数据写入本地队列,然后数据泵将数据发送到级联中第二个系统上的远程队列。

●在第二个系统上,复制将数据应用于本地数据库

●同一系统上(第二个系统)的另一个主抽取从本地数据库捕获数据,并将其写入本地队列。
●数据泵将数据发送到级联中第三个系统上的远程队列,该数据由另一个Replicate应用于本地数据库。

  注意   如果您不需要将复制的更改应用于第二个系统上的数据库,请参阅第50页,“Creating a reporting configuration with a data pump on an intermediary system”。

在以下情况下使用此配置:

●一个或多个目标系统没有与源的直接连接,但是第二个系统可以双向连接

●您想限制源系统中的网络活动。

●您正在将数据发送到地理位置上相距甚远的两个或多个服务器,例如从芝加哥到洛杉矶,然后从洛杉矶到整个中国的服务器。

考虑此拓扑时,请注意以下几点:

●如果所有系统上的字符集相同,则此配置可用于执行数据过滤和转换。 如果字符集不同,则数据泵将无法在字符集之间执行转换,您必须配置Replicat才能在目标上执行转换和转换。

●要在第二个系统上使用数据泵执行数据转换和转换,假设字符集相同,则必须使用DEFGEN实用程序在第一个系统上创建源定义文件,然后将其传输到第二个系统。 此外,您必须在第二个系统上创建源定义文件,并将其传输到第三个系统。 有关定义文件和转换的更多信息,请参见第13章。

●在第二个系统上,必须配置抽取组以捕获复制活动并忽略本地业务应用程序活动。 控制此行为的Extract参数是IGNOREAPPLOPS和GETREPLICATES。

Source system

Refer to Figure 11 for a visual representation of the objects you will be creating.

To configure the Manager process on the source

1. On the source, configure the Manager process according to the instructions in Chapter 3.

2. In the Manager parameter file, use the PURGEOLDEXTRACTS parameter to control the purging of files from the trail.

To configure the primary Extract group on the source

3. On the source, use the ADD EXTRACT command to create the source Extract group. For 

documentation purposes, this group is called ext_1.

ADD EXTRACT <ext_1>, {TRANLOG | INTEGRATED TRANLOG}, BEGIN <time> [, THREADS <n>]

❍ For TRANLOG and INTEGRATED TRANLOG, see the Oracle GoldenGate Windows and 

    UNIX Reference Guide. INTEGRATED TRANLOG enabled integrated capture for an  Oracle database.

4. On the source, use the ADD EXTTRAIL command to create a local trail.

ADD EXTTRAIL <local_trail_1>, EXTRACT <ext>

❍ Use the EXTRACT argument to link this trail to the ext_1 Extract group.

5. On the source, use the EDIT PARAMS command to create a parameter file for the ext_1

Extract group. Include the following parameters plus any others that apply to your 

database environment.

-- Identify the Extract group:

EXTRACT <ext_1>

-- Specify database login information as needed for the database:

[SOURCEDB <dsn_1>][, USERID <user>][, PASSWORD <pw> 

[<encryption options>]]

-- Specify the local trail that this Extract writes to

-- and specify encryption options:

ENCRYPTTRAIL <encryption options>

EXTTRAIL <local_trail_1>

-- Specify tables to be captured:

TABLE <owner>.<table>;

To configure the data pump on the source

6. On the source, use the ADD EXTRACT command to create a data pump group. For 

documentation purposes, this group is called pump_1.

ADD EXTRACT <pump_1>, EXTTRAILSOURCE <local_trail_1>, BEGIN <time>

❍ Use EXTTRAILSOURCE as the data source option, and specify the name of the local trail.

7. On the source, use the ADD RMTTRAIL command to specify a remote trail that will be created on the second            system in the cascade.

ADD RMTTRAIL <remote_trail_1>, EXTRACT <pump_1>

❍ Use the EXTRACT argument to link the remote trail to the pump_1 data pump group. 

The linked data pump writes to this trail.

8. On the source, use the EDIT PARAMS command to create a parameter file for the pump_1  data pump. Include the following parameters plus any others that apply to your  database environment.

-- Identify the data pump group:

EXTRACT <pump_1>

-- Specify database login information if using NOPASSTHROUGH:

[SOURCEDB <dsn_1>][, USERID <user>][, PASSWORD <pw> 

[<encryption options>]]

-- Specify decryption if input trail is encrypted:

DECRYPTTRAIL <encryption options>

-- Specify the name or IP address of second system in cascade

-- and optional encryption of data over TCP/IP:

RMTHOST <target_1>, MGRPORT <portnumber>, ENCRYPT <encryption options>

-- Specify the remote trail and encryption options on the second system:

ENCRYPTTRAIL <encryption options>

RMTTRAIL <remote_trail_1>

-- Allow mapping, filtering, conversion or pass data through as-is.

[PASSTHRU | NOPASSTHRU]

-- Specify tables to be captured:

TABLE <owner>.<table>;

         注意:要使用PASSTHRU模式,源对象和目标对象的名称必须相同。 如果无法在参数文件中指定列映射,过滤,SQLEXEC函数,转换或其他需要数据操作的              函数。 通过将PASSTHRU和NOPASSTHRU与不同的TABLE语句配对,可以将常规处理与传递处理结合起来

Second system in the cascade

To configure the Manager process on the second system

9. On the second system, configure the Manager process according to the instructions in Chapter 3.

10. In the Manager parameter file, use the PURGEOLDEXTRACTS parameter to control the purging of files from the trail.

To configure the Replicat group on the second system

11. Create a Replicat checkpoint table. For instructions, see “Creating a checkpoint table” on page 183.

12. On the second system, use the ADD REPLICAT command to create a Replicat group. For 

documentation purposes, this group is called rep_1.

ADD REPLICAT <rep_1>, EXTTRAIL <remote_trail_1>, BEGIN <time>

❍ Use the EXTTRAIL option to link the rep_1 group to the remote trail remote_trail_1

that is on the local system.

13. On the second system, use the EDIT PARAMS command to create a parameter file for the 

Replicat group. Include the following parameters plus any others that apply to your 

database environment.

-- Identify the Replicat group:

REPLICAT <rep_1>

-- State whether or not source and target definitions are identical:

SOURCEDEFS <full_pathname> | ASSUMETARGETDEFS

-- Specify database login information as needed for the database:

[TARGETDB <dsn_2>][, USERID <user>][, PASSWORD <pw> 

[<encryption options>]]

-- Specify decryption if input trail is encrypted:

DECRYPTTRAIL <encryption options>

-- Specify error handling rules:

REPERROR (<error>, <response>)

-- Specify tables for delivery:

MAP <owner>.<table>, TARGET <owner>.<table> [, DEF <template name>];


To configure an Extract group on the second system

14. On the second system, use the ADD EXTRACT command to create a local Extract group. 

For documentation purposes, this group is called ext_2.

ADD EXTRACT <ext_2>, {TRANLOG | INTEGRATED TRANLOG}, BEGIN <time>

[, THREADS <n>]

❍ For TRANLOG and INTEGRATED TRANLOG, see the Oracle GoldenGate Windows and 

UNIX Reference Guide. INTEGRATED TRANLOG enabled integrated capture for an 

Oracle database.

15. On the second system, use the ADD RMTTRAIL command to specify a remote trail that will 

be created on the third system.

ADD EXTTRAIL <local_trail_2>, EXTRACT <ext_2>

❍ Use the EXTRACT argument to link this local trail to the ext_2 Extract group.

16. On the second system, use the EDIT PARAMS command to create a parameter file for the 

ext_2 Extract group. Include the following parameters plus any others that apply to 

your database environment.

-- Identify the Extract group:

EXTRACT <ext_2>

-- Specify database login information as needed for the database:

[SOURCEDB <dsn_2>][, USERID <user>][, PASSWORD <pw> 

[<encryption options>]]

-- Specify the local trail that this Extract writes to

-- and encryption options:

ENCRYPTTRAIL <encryption options>

EXTTRAIL <local_trail_2>

-- Ignore local DML, capture Replicat DML:

IGNOREAPPLOPS, GETREPLICATES

-- Specify tables to be captured:

TABLE <owner>.<table>;


                  注意   如果要复制DDL操作,IGNOREAPPLOPS,GETREPLICATES功能则由DDLOPTIONS参数控制。

To configure the data pump on the second system

17. On the second system, use the ADD EXTRACT command to create a data pump group. For documentation purposes, this group is called pump_2.

ADD EXTRACT <pump_2>, EXTTRAILSOURCE <local_trail_2>, BEGIN <time>

❍ Use EXTTRAILSOURCE as the data source option, and specify the name of the local trail.

18. On the second system, use the ADD RMTTRAIL command to specify a remote trail that will 

be created on the third system in the cascade.

ADD RMTTRAIL <remote_trail_2>, EXTRACT <pump_2>

❍ Use the EXTRACT argument to link the remote trail to the pump_2 data pump group. 

The linked data pump writes to this trail.

19. On the second system, use the EDIT PARAMS command to create a parameter file for the 

pump_2 data pump. Include the following parameters plus any others that apply to your database environment.

-- Identify the data pump group:

EXTRACT <pump_2>

-- Specify database login information if using NOPASSTHRU:

[SOURCEDB <dsn_2>][, USERID <user>][, PASSWORD <pw> 

[<encryption options>]]

-- Specify decryption if input trail is encrypted:

DECRYPTTRAIL <encryption options>

-- Specify the name or IP address of third system in cascade

-- and optional encryption of data over TCP/IP:

RMTHOST <target_2>, MGRPORT <portnumber>, ENCRYPT <encryption options>

-- Specify the remote trail and encryption options on the third system:

ENCRYPTTRAIL <encryption options>

RMTTRAIL <remote_trail_2>

-- Allow mapping, filtering, conversion or pass data through as-is:

[PASSTHRU | NOPASSTHRU]

-- Specify tables to be captured:

TABLE <owner>.<table>;


Third system in the cascade

To configure the Manager process

20. On the third system, configure the Manager process according to the instructions in Chapter 3.

21. In the Manager parameter file, use the PURGEOLDEXTRACTS parameter to control the purging of files from the trail.

To configure the Replicat group

22. On the third system, create a Replicat checkpoint table. For instructions, see “Creating a checkpoint table” on page 183.

23. On the third system, use the ADD REPLICAT command to create a Replicat group. For 

documentation purposes, this group is called rep_2.

ADD REPLICAT <rep_2>, EXTTRAIL <remote_trail_2>, BEGIN <time>

❍ Use the EXTTRAIL option to link the rep_2 group to the remote_trail_2 trail.

24. On the third system, use the EDIT PARAMS command to create a parameter file for the 

Replicat group. Include the following parameters plus any others that apply to your database environment.

-- Identify the Replicat group:

REPLICAT <rep_2>

-- State whether or not source and target definitions are identical:

SOURCEDEFS <full_pathname> | ASSUMETARGETDEFS

-- Specify database login information as needed for the database:

[TARGETDB <dsn_3>][, USERID <user>][, PASSWORD <pw> 

[<encryption options>]]

-- Specify decryption if input trail is encrypted:

DECRYPTTRAIL <encryption options>

-- Specify error handling rules:

REPERROR (<error>, <response>)

-- Specify tables for delivery:

MAP <owner>.<table>, TARGET <owner>.<table>[, DEF <template name>];



来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25846553/viewspace-2690207/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
吕生龙,现就职于IBM,db2 dba,oracle 10G OCP

注册时间:2020-04-07

  • 博文量
    64
  • 访问量
    66984