JMS+Oracle Advanced Queue(AQ)Ó÷¨Êµ¼ù
×÷Õß:Ñî´óÓÑ,Óà´¨ ²âÊÔÔ±:Íõ½¡
¿ª·¢¹¤¾ß:Oracle Jdeveloper 10131
ÈíÓ²¼þ»·¾³:
²Ù×÷ϵͳlinux redhat 3.0 Êý¾Ý¿âΪOracle 10G 10.0.2
Ó¦Ó÷þÎñÆ÷ΪSOA Application Server 10131
¿ª·¢ÓïÑÔ:java
¹ØÓÚÌåϵ½á¹¹,˵¶àÁËÒ²ÈÃÈ˾õµÃÔÎ.ÎÒÖ±½ÓʾÀýÒ»¸ö×ö·¨,ÖÁÓÚÀí½â,¾ÍÂýÂý¿´Êé°É!
²½Öè:
1.
´´½¨Oracle AQ
Ê×ÏÈÒÔ³¬¼¶Óû§µÇ½Êý¾Ý¿â,Ð޸ıØÒª²ÎÊý,½¨Á¢AQÓû§,²¢¸øÈ¨ÏÞ.ÎÒÊÇʹÓÃsqlplus
Conn sys/******@SID as sysdba
Alter system set AQ_TM_PROCESSES=6
Alter system set JOB_QUEUE_PROCESSES=10
Create user aq identified by aq1234 default tablespace users
temporary tablespace temp quota unlimited on users;
Grant connect,resource to aq;
Grant aq_administrator_role to aq;
Grant execute on dbms_aqadm to aq;
Grant execute on dbms_aq to aq;
Grant create any table to aq;
Grant enqueue any queue,dequeue any queue to aq;
ÔÚÕâ²åÒ»¾ä,ÕâÑù´´½¨Ö»ÊÇΪÁ˱ãÓÚ²Ù×÷,´ó¼ÒÔÚÍâÃæÊ¹ÓÃÓ¦¸ÃÔÙ´´½¨Óû§,Ö»ÐèÒªÊÚÓèconnect,resource,²Ù×÷dbms_aqadmºÍ
dbms_aqµÄȨÏÞ¾Í×ã¹»ÁË.Èç¹ûÄãÏëÓÃÒ»¸öÓû§²Ù×÷ÁíÍâÒ»¸öÓû§µÄqueue(±ÈÈçaq1²Ù×÷aq´´½¨µÄqueue),ÄÇôֻÐèÒªÖ´ÐÐÏÂÃæµÄÃüÁî:
Conn aq/aq1234@sid
Execute
dbms_aqadm.grant_queue_privilege(‘enqueue’,’aq_queue’,’aq1’,false);
½âÊÍ:µÚÒ»¸ö²ÎÊýÊÇȨÏÞ,¿ÉÒÔÓÐÈý¸öÖµ,enqueue,dequeue,all(all¾ÍÊÇÇ°ÃæÁ½¸ö¶¼ÓÐ).µÚ¶þ¸ö²ÎÊýÊÇqueueµÄÃû×Ö,µÚÈý¸ö²ÎÊýµÄ°ÑȨÏÞ¸øÄĸöÈË,µÚËĸöµÄÒâ˼,Ôݲ»Ã÷°×,¾Í²»Ëµ.
ÏÂÃæ¾ÍÊǽ¨Á¢queue
tablesºÍqueueµÄʱ¼äÁË.ÓÃoemÀ´´´½¨ÊÇ×î¼òµ¥µÄ,´ó¼Ò×Ô¼º¿´Ò»ÏÂ,ÎÒ°ÑÓÃÃüÁî´´½¨µÄ¹ý³Ì˵ÏÂ:
Conn aq/aq1234@sid
--create a queue table.
BEGIN
dbms_aqadm.create_queue_table(
queue_table=>'JMSTEST_QT',
queue_payload_type=>'SYS.AQ$_JMS
_MESSAGE',
multiple_consumers =>
false,
comment => 'Queue Table For Resource Provider');
END;
/
--create a queue
BEGIN &
Ïà¹ØÎĵµ£º
ѧϰOracle DBAÒ²°ë¸ö¶àѧÆÚÁË£¬½ñÌìÃÍÈ»²Å·¢ÏÖ£¬ÔÀ´ÎÒµÄÊ黹ÊǺÜеģ¬ÉϿβÙ×÷ʱºòÒ²Ö»ÊÇÖªµÀ´ó¸ÅÔõô×ö£¬µ«ÊÇÒªÕæµÄÈ«²¿×Ô¼º×ö£¬¶ø²»È¥·Ê黹ÊÇÓÐÒ»¶¨µÄÄѶȵģ¬ËùÒÔÄØ£¬½ñÌ쿪ʼ½«DBA´ÓÍ·¸´Ï°Ò»±é£¬Í¬Ê±ÔÙ²Ù×÷Ò»±é¡£
µÚÒ»Õ£¬Ñ§µÄÊÇOracleµÄÌåϵ½á¹¹£ ......
³¬¼¶ºÃÓõÄoracle ÉÁ»Ø¹¦ÄÜÖ®--»Ö¸´´æ´¢¹ý³Ìƪ
©³©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©·
©Ä¡ù©§Ãû³Æ£ºoracle ÉÁ»Ø¹¦ÄÜÖ®--»Ö¸´´æ´¢¹ý³Ìƪ
©Ä¡ù©§ËµÃ÷£º½«´æ´¢¹ý³Ì»Ö¸´µ½Ä³Ò»Ö¸¶¨Ê±¼ä¶Î¡£
©Ä¡ù©§×÷Õߣºzlj113
©Ä¡ù©§Ê±¼ä£º20091225
©»©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥ ......
Õâ¸öÎÊÌâÒÔǰÀ§ÈŹýÎÒ£¬Á½Õߺó׺Ãû¶¼ÊÇ.DBF¡£¼ÇµÃµ±Ê±ºÃÏñÈ¥ÂÛ̳ÉÏ·¢Á˸öÌû×ÓÎÊ£¬²»¹ýºÃ¼¸ÌìûÈ˽â´ð£¬ÎÞÄÎÖ®ÏÂÎҾͰÑÌû×Ó¸ø½áÁË¡£
½ñÌìÕýºÃÔÚÒ»±¾ÊéÖп´µ½Óн²Á½ÕßÇø±ðµÄ£¬ÓÖÈ¥ÍøÉÏËÑÁËËÑ£¬Ð¡×ܽáһϣ¬¼ÇÏÂÀ´¡£
±¾µØ¹ÜÀíµÄÁÙʱ±í¿Õ¼äÊÇ»ùÓÚÁÙʱÎļþµÄ£¬ÕâЩÎļþÓëÆÕͨµÄÊý¾ÝÎļþ·Ç³£ÏàËÆ£¬µ«ËüÃÇ»¹¾ßÓÐÈçÏÂÌØÐÔ£º
ÁÙʱ ......
ORA-00604 error occurred at recursive SQL level string
Cause:An error occurred while processing a recursive SQL statement (a statement applying to internal dictionary tables).
Action:If the situation described in the next error on the stack can be corrected, do so; otherwise contact Oracle Custome ......
http://www.haoxiai.net/shujuku/Oracle/111145.html
Ò»¡¢Êý¾Ý¿âÃû
ʲôÊÇÊý¾Ý¿âÃû
Êý¾Ý¿âÃû¾ÍÊÇÒ»¸öÊý¾Ý¿âµÄ±êʶ£¬¾ÍÏñÈ˵ÄÉí·ÝÖ¤ºÅÒ»Ñù¡£ËûÓòÎÊýDB_NAME±íʾ£¬Èç¹ûһ̨»úÆ÷ÉÏ×°Á˶àÈ«Êý¾Ý¿â£¬ÄÇôÿһ¸öÊý¾Ý¿â¶¼ÓÐÒ»¸öÊý¾Ý¿âÃû¡£ÔÚÊý¾Ý¿â°²×°»ò´´½¨Íê³ÉÖ®ºó£¬²ÎÊýDB_NAME±»Ð´Èë²ÎÊýÎļþÖ®ÖС£¸ñʽÈçÏ£º
DB_NAME=m ......