版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
System-CreatedRulesObjectivesAftercompletingthislesson,youshouldbeabletodothefollowing:Identifythedifferenttypesofsystem-createdrulesUseanegativerulesettopreventaStreamsclientfromperformingitstaskonanindividualobjectUsesubsetrulestorestrictthedatathatflowsthroughthestreamCustomizesystem-createdrulesQuerythedatadictionaryforinformationabout
system-createdrulesUsingRulesinOracleStreamsThefollowingStreamsclientsuserulesandrulesets:CaptureprocessPropagationjobApplyprocessMessagingclientThesamerulesetcanbeusedbymultipleStreamsclientsinthesamedatabase.MultiplerulesinarulesetarecombinedwiththeORoperator.UsingRulesinOracleStreamsYoucanuserulestodefinethegranularityatwhichacaptureprocess,propagationjob,orapplyprocessreplicatesdata.Levelsofgranularity:DatabaseSchemaTableSubsetofrowsinatableDMLoperationsonlyDDLoperationsonlySubsetofoperationsthatareperformedagainstatableGeneratingSystem-CreatedRulesYouuseproceduresintheDBMS_STREAMS_ADMpackagetogeneratesystem-createdrules.Foraspecificcomponent:ADD_TABLE_RULESADD_SCHEMA_RULESADD_GLOBAL_RULESADD_SUBSET_RULES
ADD_*_PROPAGATION_RULESFormultiplecomponents:MAINTAIN_SIMPLE_TTS,MAINTAIN_TTSMAINTAIN_GLOBALMAINTAIN_SCHEMASMAINTAIN_TABLESGeneratingSystem-CreatedRulesTheproceduresintheDBMS_STREAMS_ADMpackagethatgeneratesystem-createdrulesalsoperformthefollowingactions:Createacaptureprocess,propagationjob,orapplyprocessifthespecifiedprocessorjobdoesnotalreadyexistCreatearulesetforthespecifiedcaptureprocess,propagationjob,orapplyprocessifarulesetdoesnotalreadyexistfortheprocessorjobCreatezeroormorerulesandaddtherulestotherulesetfortheprocessorjobSystem-CreatedRule:ExampleSystem-createdruleconditionforthetable-levelrule:EXECUTEDBMS_STREAMS_ADM.ADD_TABLE_RULES(-table_name=>'hr.employees',-streams_type=>'apply',-streams_name=>'apply_site1_lcrs',-queue_name=>'streams_queue',-source_database=>'');:dml.get_object_owner()='HR'and:dml.get_object_name()='EMPLOYEES'AND:dml.is_null_tag()='Y'AND:dml.get_source_database_name()='SITE1.NET'System-CreatedRuleComponentsUseabuilt-inevaluationcontextMayhaveoneormoreassociatedactioncontextsCapture
rulesetEvaluationcontextEvaluationcontextActioncontextTableruleEvaluationcontextSchemaruleUsingSubsetRuleswithOracleStreamsSubsetrulescanbecreatedforcapture,propagation,andapplywiththeDBMS_STREAMS_ADMpackage.Site1CaptureSite2PropApplyCreatingSubsetRulesBEGINDBMS_STREAMS_ADM.ADD_SUBSET_RULES(table_name=>'hr.regions',dml_condition=>'region_id=2',streams_type=>'capture',streams_name=>'hr_capture', queue_name=>'hr_queue');END;/RowSubsettingdml_condition=>'order_status<5'online04-JUN-0423890direct05-MAY-0424567direct14-DEC-04245194ORDER_STATUSonline18-NOV-042390ORDER_MODEORDER_DATEORDER_ID0direct04-OCT-0424535direct 31-OCT-042457CustomizingSystem-CreatedRules(:ddl.get_object_owner()='HR')and(:ddl.get_object_type()!='INDEX')BEGINDBMS_STREAMS_ADM.ADD_SCHEMA_RULES(schema_name=>'hr',streams_type=>'apply',streams_name=>'apply_site1_lcrs',queue_name=>'strmadmin.streams_queue',include_dml=>FALSE,include_ddl=>TRUE,and_condition=>':lcr.get_object_type()!=''INDEX'''
);END;/NegativeRuleSetsCapturePositive
rulesetNegative
rulesetRuleEvaluationwithRuleSetsPositive
rulesetNegative
ruleset1Positive
rulesetNegative
ruleset234TRUETRUEFALSEFALSECaptureruleset_posHRschemaHR.JOB_HISTORYruleset_negNegativeRuleSets:ExampleCreatingNegativeRulesBEGINDBMS_STREAMS_ADM.ADD_TABLE_RULES(table_name=>'hr.locations',streams_type=>'capture',streams_name=>'capture1',queue_name=>'strmadmin.streams_queue',inclusion_rule=>FALSE);END;/MonitoringSystem-CreatedRulesStreamsclientrules:[ALL|DBA]_STREAMS_RULES[ALL|DBA]_STREAMS_GLOBAL_RULES[ALL|DBA]_STREAMS_SCHEMA_RULES[ALL|DBA]_STREAMS_TABLE_RULESStreamsclientrulesets:[ALL|DBA]_CAPTURE[ALL|DBA]_PROPAGATION[ALL|DBA]_APPLYMessagerulesandrulesets:[ALL|DBA]_STREAMS_MESSAGE_RULES[ALL|DBA]_STREAMS_MESSAGE_CONSUMERSMonitoringNegativeRuleSetsPROPAGATION_NAME--------------------------------------NEGATIVE_RULE_SET_OWNER---------------------------NEGATIVE_RULE_SET_NAME----------------------------------------PROP_TO_SITE2STRMADMINRULESET$_31SQL>SELECTPROPAGATION_NAME,
2>NEGATIVE_RULE_SET_OWNER,
3>NEGATIVE_RULE_SET_NAME4>FROMDBA_PROPAGATION;SummaryInthislesson,youshouldhavelearnedhowto:Identifythedifferenttypesofsystem-createdrulesUseanegativerulesettopreventaStreamsclientfromperformingitstaskonanindividualobjectUsesubsetrulestorestrictthedatathatflowsthroughthestreamCustomizesystem-createdrul
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 基坑支护课程设计感想
- c语言课程设计教务管理系统
- 健身球分拣课程设计
- 垫片模具课程设计书
- 2023年体外诊断器械资金申请报告
- Python第五课-数字拆拆乐(教学设计)
- (核心素养目标)2.4 自由落体运动 教学设计
- 7忧与悠的诗意人生:《短歌行》归园田居(其一)比较阅读-高一语文教案(统编版必修上册)
- 《群文阅读之古诗中的夸张手法》(教案)-2024-2025学年统编版语文六年级上册
- 《6、7的认识和加、减法》(教学设计)-2024-2025学年一年级上册数学北京版
- 三一重工旋挖钻机电控系统
- 常用急救仪器与设备操作规程
- 机械设计基础 间歇运动机构
- (完整版)社会支持评定量表SSRS
- 散客订房确认单中英文对照
- (三)有机化学基本反应
- 义务教育《化学》课程标准(2022年版)
- ac-13沥青砼上面层试验段施工总结
- 河北科技师范学院研究生课程教学管理工作流程
- 《全国建筑设计行业收费标准》(2022年编制)的通知
- 中国美国欧洲药典比较
评论
0/150
提交评论