les08_prop
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
8 - 17
Copyright © 2008, Oracle. All rights reserved.
Propagation Job
To propagate to remote databases, you must: • Configure network communication • Enable job queue processes • Create a database link • Grant the database link access to the propagation job owner Propagation created by:
8-4
Copyright © 2008, Oracle. All rights reserved.
Queue Forwarding
• The intermediate database forwards the message toward its destination. • A message that is being forwarded by the intermediate database may or may not be applied at the intermediate database. • The source database is the database where the message originates.
8-8
Copyright © 2008, Oracle. All rights reserved.
Guaranteed Message Delivery
• The destination queue notifies the source queue that a message has been received. • The message remains in the source queue until it has been propagated to all destination sites. • A captured message is propagated successfully to a destination when the message has:
8 - 16
Copyright © 2008, Oracle. All rights reserved.
Propagation Jobs
• Propagation uses the Scheduler interface. • A propagation job is used to implement propagation. • A propagation schedule specifies how often a propagation job propagates messages from a source queue to a destination queue. • Scheduled jobs are owned by the SYS user. • Scheduler procedures can be used to manage propagation scheduling.
– Been processed by all relevant apply processes at the destination – Propagated successfully from the source queue to all its relevant destination queues
8-6
Copyright © 2008, Oracle. All rights reserved.
How Does Propagation Work?
• A single source queue may propagate to multiple destination queues. • A single destination queue may receive messages from multiple source queues. • By default, only one propagation job is used to send messages from a Destination source queue to all destination queues queues at a particular database.
8-2
Copyright © 2008, Oracle. All rights reserved.
What Is Propagation?
• Streams uses queues to stage messages for propagation or consumption. • Messages propagate from a source queue to a destination queue. • Staging areas can receive messages from a queue:
Queue forwarding
Source queue
8-7 Copyright © 2008, Oracle. All rights reserved.
Queue-to-Queue Propagation
• Uses an exclusive propagation job to propagate messages from the source queue to the destination queue • Can use the same database link as other queue-to-queue propagations • Enables you to enable, disable, or configure the propagation schedule for each queue-to-queue propagation separately, without impacting other propagations
– In the same database – In a remote database
• Propagation is performed by a propagation job.
8-3
Copyright © 2008, Oracle. All rights reserved.
Directed Networks
Queue–to– DB link Failover
CAP1 Instance1 Node1
Server
8 - 14 Copyright © 2008, Oracle. All rights reserved.
Manually Creating a Propagation
BEGIN DBMS_PROPAGATION_ADM.CREATE_PROPAGATION ( propagation_name => 'prop_to_site2', source_queue => 'strmadmin.streams_queue', destination_queue=>'strmadmin.streams_queue', destination_dblink => 'site2.net', rule_set_name=>'strmadmin.stream1_rs', queue_to_queue => TRUE); END; /
Propagation Concepts and Configuration
Copyright © 2008, Oracle. All rights reserved.
Objectives
After completing this lesson, you should be able to: • Describe how messages are propagated • Schedule propagation between two queues • Propagate captured messages • Verify the propagation configuration
AP
8-5
Copyright © 2008, Oracle. All rights reserved.
Apply Forwarding
Messages are applied and recaptured at an intermediate site before being sent to the destination site. • The intermediate database then becomes the source database for the applied messages. • Messages may be modified in transit as a result of conflict resolution, apply handlers, or transformations.
8 - 12 Copyright © 2008, Oracle. All rights reserved.
Queue-to-Queue Propagation and Real Application Clusters
Job AP3 Instance2 Node2 RAC_DB Service Queue-to-queue AP3 Instance3 Node3
• You can route messages through a series of staging areas before they reach the destination queue. • You do not have to apply or dequeue messages at the intermediate staging queues. • The intermediate database may propagate messages by using queue forwarding or apply forwarding.
• Starting a propagation: Creation of propagation job
Propagation
8 - 11
Copyright © 2008, Oracle. All rights reserved.
Creating a Propagation: Example
BEGIN DBMS_STREAMS_ADM.ADD_SCHEMA_PROPAGATION_RULES( schema_name => 'HR', streams_name => 'prop_to_site3', source_queue_name=>'strmadmin.hr_queue', destination_queue_name => 'ix.streams_queue@site3.net', include_dml => true, include_ddl => true, include_tagged_lcr => false, source_database => 'site1.net', inclusion_rule => TRUE, queue_to_queue => FALSE); END; /
8 - 10
Copyright © 2008, Oracle. All rights reserved.
Creating a Propagation
• Automatically by using procedures in the DBMS_STREAMS_ADM package • Manually by using the CRபைடு நூலகம்ATE_PROPAGATION procedure of the DBMS_PROPAGATION_ADM package • On creation: Status ENABLED