Oracle10g stream : :dml.get_command_type and lcr.get_command_type

tolywang發表於2010-03-15

Oracle10g   10.2.0.4  , RAC , Linux AS 5.3 


being
DBMS_RULE_ADM.CREATE_RULE(
rule_name=>'fbtest_rule_x',
condition=>'(:dml.get_command_type() = ''INSERT''
OR :dml.get_command_type() = ''DELETE'')
AND :dml.get_object_owner() = ''RT01''
AND :dml.get_object_name() = ''ORDERPDO_ORDER'' ');
end;
/

 


begin
dbms_streams_adm.add_table_rules(
  table_name         =>'server7.bizdoc',
  streams_type       =>'capture',
  streams_name       =>'capture_prod',
  queue_name         =>'strmadmin.prod_queue',
  include_dml         =>true,
  include_ddl          =>true,
  include_tagged_lcr   =>false,
  source_database      =>null,
  inclusion_rule       =>true,
  and_condition        =>':lcr.get_command_type() in (''INSERT'',''UPDATE'')');  

end;
/

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-630428/,如需轉載,請註明出處,否則將追究法律責任。