再看那柔弱的柳树吧,在寒冬余威尚盛时节,就早早苏醒过来,望着冰冻的河面,迎着凛冽的寒风,它微微察觉出一丝春意,于是,不顾一切地率先吐翠,淡淡地披起娇黄嫩绿的新装。沿河望去,枝梢间烟纱雾彀,一片生机,这情景仿佛一首动人的歌,一首热烈向往春天的歌,一首报告春的信息的歌,一首表达美好信念的歌。我在想:既然迎春花被人称作报春花,那么,柳树可不可以叫作报春树呢春来了,万千柳枝在春风中袅袅舞动。柳树是热爱春天的,春天也是热爱柳树的。
Oracle高级队列(Advanced Queue)简单实例
最简单的高级队列的练习,基本上都使用了默认参数。
-- Create Type create or replace type note as Object( subject varchar2(100), Content varchar2(2000),CreateTime date ); -- Create queue table begin sys.dbms_aqadm.create_queue_table( queue_table => 'NOTETAB', queue_payload_type => 'TEST.NOTE' end; --create queue begin sys.dbms_aqadm.create_queue( queue_name => 'NOTEQ', queue_table => 'NOTETAB', queue_type => sys.dbms_aqadm.normal_queue, max_retries => 5, retry_delay => 0, retention_time => 0); end; --enqueue declare v_Message note; v_MsgId RAW(16); v_options DBMS_AQ.ENQUEUE_OPTIONS_T; v_properties DBMS_AQ.MESSAGE_PROPERTIES_T; v_Recipients DBMS_AQ.AQ$_RECIPIENT_LIST_T; begin v_Message:=note(subject => 'note3',Content => 'content3',createTime => sysdate); -- v_Recipients(0) := sys.aq$_agent('NOTE','MTQ',0); -- v_properties.recipient_list := v_Recipients; v_options.visibility :=DBMS_AQ.IMMEDIATE; dbms_aq.enqueue(queue_name => 'noteq',enqueue_options => v_options,message_properties => v_properties,payload => v_Message,msgid => v_MsgId); dbms_output.put_line('encode success,msgid is '||v_MsgId); end; --dequeue declare v_Message note; v_MsgId RAW(16); v_options DBMS_AQ.DEQUEUE_OPTIONS_T; v_properties DBMS_AQ.MESSAGE_PROPERTIES_T; v_Recipients DBMS_AQ.AQ$_RECIPIENT_LIST_T; begin -- v_Recipients(0) := sys.aq$_agent('NOTE','MTQ',0); -- v_properties.recipient_list := v_Recipients; v_options.visibility :=DBMS_AQ.IMMEDIATE; dbms_aq.dequeue(queue_name => 'noteq',dequeue_options => v_options,message_properties => v_properties,payload => v_Message,msgid => v_MsgId); dbms_output.put_line('decode success,msgid is '||v_MsgId); dbms_output.put_line('subject is '||v_Message.subject); dbms_output.put_line('Content is '||v_Message.Content); dbms_output.put_line('createTime is '||to_char(v_Message.createTime,'yyyy-mm-dd hh24:mi:ss')); end;
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
到此这篇关于Oracle高级队列(AdvancedQueue)简单实例就介绍到这了。成功等于百分之一的灵感加上百分之九十九的汗水。更多相关Oracle高级队列(AdvancedQueue)简单实例内容请查看相关栏目,小编编辑不易,再次感谢大家的支持!