您可以在您的环境中创建(或添加)并配置并行复制。新的并行复制进程然后在所有内部阶段并行处理信息,从开始到结束。还解释了组件,如映射器、主程序和应用程序。
Topics:
并行副本是副本的一种新变体,它并行地应用事务以提高性能。
它考虑事务之间的依赖关系,类似于集成副本。依赖项计算、映射和应用的并行性是在数据库之外执行的,因此可以卸载到另一个服务器。在此过程中维护事务完整性。此外,parallel replicat通过将大型事务分割成多个块并并行地应用它们,从而支持大型事务的并行应用。
并行副本支持使用非集成选项的所有数据库。Parallel Replicat只支持使用完整的元数据复制来自trail的数据,这要求使用传统的trail格式。
The components of parallel Replicat are:
映射器可以并行地读取轨迹、映射轨迹记录、将映射记录转换为集成的Replicat LCR格式,并将LCRs发送到合并处进行进一步处理。一个映射器映射一组事务,下一个映射器映射下一组事务。跟踪信息是分割的,而跟踪文件是不变的,因为它按顺序排列跟踪信息。
主进程有两个线程,排序器和调度器。Collater从映射器接收映射的事务,并将它们放回trail order中进行相关性计算。调度器计算事务之间的依赖关系,将事务分组为独立的批,并将批发送给应用程序以应用于目标数据库。
Appliers在批处理中重新排序记录以执行数组。它将批处理应用到目标数据库并执行错误处理。它还跟踪检查点表中应用的事务。
The following table lists the features supported by the respective Replicats.
Feature | Classic Replicat | Coordinated Replicat | Integrated Replicat | Parallel Replicat |
---|---|---|---|---|
Batch Processing |
Yes |
Yes |
Yes |
Yes |
Barrier Transactions |
No |
Yes |
Yes |
Yes |
Dependency Computation |
No |
No |
Yes |
Yes |
Auto-parallelism |
No |
No |
Yes |
Yes |
DML Handler |
No |
No |
Yes |
YesFoot 1 |
Procedural Replication |
No |
No |
Yes |
YesFoot 2 |
Auto CDR |
No |
No |
Yes |
YesFoot 3 |
Dependency-aware Transaction Split |
No |
No |
No |
Yes |
Cross-RAC-node Processing |
No |
Yes |
No |
Yes |
Footnote 1 Integrated mode
Footnote 2 used for integrated Parallel Replicat (iPR)
Footnote 3 used by iPR only
Parent topic: Using Parallel Replicat
并行复制进程利用了在集成模式下Oracle数据库中可用的应用处理功能。
在单个副本配置中,多个入站服务器子进程(称为应用服务器)并行应用事务,同时保持原始事务原子性。
体系结构图描述了从跟踪文件到目标数据库的并行复制的各个过程中的更改记录流
Description of the illustration para_rep_arch.jpg
The Mappers read the trail file and map records, forward the mapped records to the Master. The batches are sent to the Appliers where they are applied to the target database.
The Master process consists of two separate threads, Collater and Scheduler. The Collater is responsible for managing and communicating with the Mappers, along with receiving the mapped transactions and reordering them into a single in-order stream. The Scheduler is responsible for managing and communicating with the Appliers, along with reading transactions from the Collater, batching them, and scheduling them to Appliers.
The Scheduler controller communicates with the Scheduler to gather any necessary information (such as, the current low watermark position). The Scheduler controller is required for CDB mode for Oracle Database because it is responsible for aggregating information pertaining to the different target PDBs and reporting a unified picture. The Scheduler controller is created for simplicity and uniformity of implementation, even when not in CDB mode. Every process reads the parameter file and shares a single checkpoint file.
Parent topic: Using Parallel Replicat
下表列出了基本的并行副本参数及其描述。
Parameter | Description |
---|---|
MAP_PARALLELISM |
配置映射器的数量。这控制用于读取跟踪文件的线程数。最小值是1,最大值是100,默认值是2。 |
APPLY_PARALLELISM |
配置应用程序的数量。它控制用于应用更改的目标数据库中的连接数。默认值是4。 |
MIN_APPLY_PARALLELISM
|
应用并行性是自动调整的。您可以设置最小值和最大值,以定义副本自动调整其并行性的范围。没有默认值。不要同时使用APPLY_PARALLELISM. |
SPLIT_TRANS_REC |
指定应该将大型事务分解为具有指定大小的块并并行应用。块之间的依赖关系仍然得到尊重。默认情况下禁用。 |
COMMIT_SERIALIZATION |
启用提交全序列化模式,这将强制按试运行顺序提交事务。 |
Advanced Parameters |
|
LOOK_AHEAD_TRANSACTIONS |
控制批处理事务时调度器的进度。默认值是10000。 |
CHUNK_SIZE |
控制一个事务必须有多大,以使并行副本认为它是大的。当并行副本遇到大于这个大小的事务时,它将序列化它,从而导致性能下降。但是,增加这个值也会增加并行副本所消耗的内存量。 |
Example Parameter File
replicat repA
userid ggadmin, password ***
MAP_PARALLELISM 3
MIN_APPLY_PARALLELISM 2
MAX_APPLY_PARALLELISM 10
SPLIT_TRANS_RECS 1000
map *.*, target *.*;
Parent topic: Using Parallel Replicat
You can create a parallel replication using the graphical user interface or the command line interfaces GGSCI and the Admin Client.
A parallel Replicat requires a checkpoint table so both the Administration Server UI and Admin Client issue an error when the parallel Replicat does not include a checkpoint table.
Note:
Parallel replication does not support COMMIT_SERIALIZATION
in Integrated Mode. To use this apply process, use Integrated Replicat.
Creating a Non-Integrated Parallel Replication with the Administration Server
Open a browser and connect to the Service Manager that you created with the Configuration Assistant:
https://server_name:service_manger_port/
For Example, https://localhost:9000/. In an non secured environment, use http instead of https.
The Oracle GoldenGate Service Manager is displayed.
Enter the username and password you created and click Sign In.
In the Service Manager, you can see servers that are running.
In the Services section, click Administration Server, and then log in.
Click the Application Navigation icon to the left of the page title to expand the navigation panel.
Create the checkpoint table by clicking Configuration in the right navigation panel.
Ensure that you have a valid credential and log in to the database by clicking the ‘log in database’ icon under Action.
Click the + sign to add a checkpoint table.
Enter the schema.name
of the checkpoint table that you would like to create, and then click Submit.
Validate that the table was created correctly by logging out of the Credential Alias using the log out database icon, and then log back in.
Once the log in is complete, your new checkpoint table is listed.
Click Overview to return to the main Administration Server page.
Click the + sign next to Replicats.
Select Nonintegrated Replicat then click Next.
Enter the required information making sure that you complete the Credential Domain and Credential Alias fields before completing the Checkpoint Table field, and then select your newly created Checkpoint Table from the list.
Click Next, and then click Create and Run to complete the Replicat creation.
Creating a Non-Integrated Parallel Replicat with the Admin Client
Go the bin
directory of your Oracle GoldenGate installation directory.
cd $OGG_HOME/bin
Start the Admin Client.
./adminclient
The Admin Client command prompt is displayed.
OGG (not connected) 12>
Connect to the Service Manager deployment source:
connect http://localhost:9500 deployment Target1 as oggadmin password welcome1
You must use http or https in the connection string; this example is a non-SSL connection.
添加并行副本,这可能需要几分钟来完成:
add replicat R1, parallel, exttrail bb checkpointtable ggadmin.ggcheckpoint
You could use just the two character trail name as part of the ADD REPLICAT
or you can use the full path, such as /u01/oggdeployments/target1/var/lib/data/bb
.
Verify that the Replicat is running:
info replicat R1
Messages similar to the following are displayed:
REPLICAT R1 Initialized 2016-12-20 13:56 Status RUNNING
Parallel
Checkpoint Lag 00:00:00 (updated 00:00:22 ago)
Process ID 30007
Log Read
Checkpoint File ./ra000000000First Record RBA 0
Parent topic: Using Parallel Replicat