Oracle英文版培训课件之Implement Streams:les10_第1页
Oracle英文版培训课件之Implement Streams:les10_第2页
Oracle英文版培训课件之Implement Streams:les10_第3页
Oracle英文版培训课件之Implement Streams:les10_第4页
Oracle英文版培训课件之Implement Streams:les10_第5页
已阅读5页,还剩26页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

PropagationConceptsandConfigurationObjectivesAftercompletingthislesson,youshouldbeabletodothefollowing:DescribehoweventsarepropagatedSchedulepropagationbetweentwoqueuesPropagatecapturedeventsVerifythepropagationconfigurationWhatIsPropagation?Streamsusesqueuestostageeventsforpropagationorconsumption.Eventspropagatefromasourcequeuetoadestinationqueue.Stagingareascanreceiveeventsfromaqueue:InthesamedatabaseInaremotedatabasePropagationisperformedbyapropagationjob.DirectedNetworksYoucanrouteeventsthroughaseriesofstagingareasbeforetheyreachthedestinationqueue.Youdonothavetoapplyordequeueeventsattheintermediatestagingqueues.Theintermediatedatabasemaypropagateeventsbyusingqueueforwardingorapplyforwarding.QueueForwardingTheintermediatedatabaseforwardstheeventtowarditsdestination.Aneventthatisbeingforwardedbytheintermediatedatabasemayormaynotbeappliedattheintermediatedatabase.Thesourcedatabaseisthedatabasewheretheeventoriginated.APApplyForwardingEventsareappliedandrecapturedatanintermediatesitebeforebeingsenttothedestinationsite.Theintermediatedatabasebecomesthesourcedatabasefortheappliedevents.Eventsmaybemodifiedintransitasaresultofconflictresolution,applyhandlers,ortransformations.HowDoesPropagationWork?Asinglesourcequeuemaypropagatetomultipledestinationqueues.Asingledestinationqueuemayreceiveeventsfrommultiplesourcequeues.Bydefault,onlyonepropagationjobis

usedtosendeventsfroma

sourcequeuetoalldestination

queuesataparticulardatabase.Queue-to-QueuePropagationUsesanexclusivepropagationjobtopropagatemessagesfromthesourcequeuetothedestinationqueueCanusethesamedatabaselinkasotherqueue-to-queuepropagationsEnablesyoutoenable,disable,orconfigurethepropagationscheduleforeachqueue-to-queuepropagationseparately,withoutimpactingotherpropagationsGuaranteedEventDeliveryThedestinationqueuenotifiesthesourcequeuethataneventhasbeenreceived.Theeventremainsinthesourcequeueuntilithasbeenpropagatedtoalldestinationsites.Acapturedeventispropagatedsuccessfullytoadestinationwhentheeventhas:BeenprocessedbyallrelevantapplyprocessesatthedestinationPropagatedsuccessfullyfromthedestinationqueuetoallofitsrelevantdestinationqueuesPropagationJobApropagationjobisusedtoimplementpropagation.Apropagationschedulespecifieshowoftenapropagationjobpropagateseventsfromasourcequeuetoadestinationqueue.Topropagatetoremotedatabases,youmust:ConfigurenetworkcommunicationEnablejobqueueprocessesCreateadatabaselinkGrantthedatabaselinkaccess

tothepropagationjobownerPropagationRulesYoucandefinerulesforthepropagationtospecify:WhicheventsarepropagatedWhicheventsareexcludedfrompropagationBothLCRandnon-LCReventscanbepropagatedwiththesamepropagationjob.Youcancreatepropagationrulesusing:DBMS_STREAMS_ADMDBMS_RULE_ADMPropagationRulesApropagationrulecanbepositiveornegative.Thepropagationrulesetisindependentofthecaptureruleset.Capturedobjectsarenotautomaticallypropagated.CapturerulesPropagationrulesHR.

EMPLOYEESHR.

COUNTRIESOE.ORDER_ITEMSHR.JOBSOE.

ORDERSIX.USER_

MSGPropagationSchedulingApropagationschedule:SpecifieshowoftenajobpropagateseventsfromthesourcequeuetothedestinationqueueUsesdefaultvalueswhencreatedthroughtheDBMS_STREAMS_ADMpackageCanbemodifiedwiththeALTER_PROPAGATION_SCHEDULE

procedureintheDBMS_AQADMpackagePropagationSchedulingDefaultsThedefaultpropagationschedulehasthefollowingproperties:start_timeisSYSDATE().durationisNULL.next_timeisNULL.latencyisfiveseconds.CreatingaPropagationYoucancreateapropagation:AutomaticallybyusingproceduresintheDBMS_STREAMS_ADMpackageManuallybyusingtheCREATE_PROPAGATIONprocedureofDBMS_PROPAGATION_ADMApropagationjobiscreatedautomaticallywhenapropagationisdefined.Allpropagationjobsareenableduponcreation.CreatingaPropagation:ExampleBEGINDBMS_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@',include_dml=>true,include_ddl=>true,include_tagged_lcr=>false,source_database=>'',inclusion_rule=>TRUE,queue_to_queue=>FALSE);END;/Queue-to-QueuePropagationand

RealApplicationClusters

Node1Instance1Node3Instance3CAP1JobAP3Node2Instance2Secondary

instancePrimary

instanceAP3FailoverRAC_DBServiceServerQueue-to

DBlinkQueue-to-queueManuallyCreatingaPropagationBEGINDBMS_PROPAGATION_ADM.CREATE_PROPAGATION(propagation_name=>'prop_to_site2',source_queue=>'strmadmin.streams_queue',destination_queue=>'strmadmin.streams_queue',destination_dblink=>'',rule_set_name=>'strmadmin.stream1_rs',queue_to_queue=>TRUE);END;/ManagingPropagationRulesTospecifyorremovearulesetforapropagation,usetheALTER_PROPAGATIONprocedureofDBMS_PROPAGATION_ADM.Toaddrulestothepositiveornegativerulesetofapropagation,useoneoftheproceduresinDBMS_STREAMS_ADM.Toremovearulefromapropagation

ruleset,usetheREMOVE_RULE

procedureofDBMS_STREAMS_ADM.ManagingPropagationRules:ExampleToaddaruletoapropagation:BEGINDBMS_STREAMS_ADM.ADD_TABLE_PROPAGATION_RULES(table_name=>'hr.employees',streams_name=>'prop_to_site3',source_queue_name=>'hr_queue',destination_queue_name=>'ix.streams_queue@',include_dml=>true,include_ddl=>true,include_tagged_lcr=>false,source_database=>'',inclusion_rule=>FALSE);END;/ManagingPropagationRules:ExampleToremovearulefromarulesetforanexistingpropagation:BEGINDBMS_STREAMS_ADM.REMOVE_RULE(rule_name

=>'STRMADMIN.DEPARTMENTS3',streams_type=>'propagation',streams_name

=>'prop_to_site3',drop_unused_rule

=>TRUE,inclusion_rule=>FALSE);END;/MonitoringPropagationALL_PROPAGATION,DBA_PROPAGATIONDBA_QUEUE_SCHEDULES,USER_QUEUE_SCHEDULESV$PROPAGATION_RECEIVERV$PROPAGATION_SENDERV$BUFFERED_SUBSCRIBERS10-27.gifMonitoringPropagationwithOEMTroubleshootingPropagationConfigurationChecklist:Haspropagationbeenspecifiedbetweenthecorrectsitesandqueues?Ispropagationscheduledandrunningbetweenthesites?Arethereanytracefilesoralertlogmessages?Dorulesexistforthepropagation?Arethereanyerrormessages?Doesthepropagationjobhaveanyfailures?CheckingthePropagationConfigurationCheckthepropagationname,sourcename,anddestinationqueuename.Checkthenegativerulesetname,ifoneexists.SELECTpropagation_name,source_queue_owner,source_queue_name,destination_queue_owner,destination_queue_name,destination_dblink,queue_to_queue,negative_rule_set_name,statusFROMALL_PROPAGATION;CheckingthePropagationScheduleSELECTdestination,schedule_disabled,process_name,session_id,last_run_date,next_run_date,avg_number,total_number,

failures,last_error_date,last_error_msgFROMDBA_QUEUE_SCHEDULES;

DESTINATIONSPROCESS_NAMESESSION_ID

------------------------------------------

LAST_RUNNEXT_RUNAVG_NUMBERTOTALNUMBER

-----------------------------------------

FAILURESLAST_ERRLAST_ERROR_MSG

------------------------------------------

SITE3.NETNJ000

23:57:2123:57:2766

0ManagingPropagationUseproceduresintheDBMS_PROPAGATION_ADMpackage:ALTER_PROPAGATIONCREATE_PROPAGATION,DROP_PROPAGATIONSTART_PROPAGATION,DROP_PROPAGATIONFornonfunctioningpropagationjobs,trystoppingandrestartingthepropagation.EXECDBMS_PROPAGATION_ADM.STOP_PROPAGATION(-propagation_name=>'p_to_site3',-force=>TRUE);EXECDBMS_PROPAGATION_ADM.START_PROPAGATION(-propagation_name=>'p_to_site3');CheckingforPropagationTraceFilesFilenameformat:sid_xxxx_iiiii.trcsidisthesystemidenti

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论