Oracle 11g - Advanced Queue
I have created an queue in oracle 11g with multiple subscribers. I have registered the subscribers with following script
DECLARE
aSubscriber SYS.AQ$_AGENT;
BEGIN
aSubscriber := sys.AQ$_AGENT ('CUST_SUBSCRIBER', null, null);
DBMS_AQADM.add_subscriber (queue_name => 'RT_REP.QUEUE_SBCUSTOMER',
subscriber => aSubscriber);
DBMS_AQ.REGISTER (
SYS.AQ$_REG_INFO_LIST(SYS.AQ$_REG_INFO (
'QUEUE_SBCUSTOMER:CUST_SUBSCRIBER',
DBMS_AQ.NAMESPACE_AQ,
'plsql://SPIN_D.dequeue_messages.dequeuecust',
HEXTORAW ('FF'))),
1);
END;
But it seems the dequeue is not working. All the grants / permissions are fine but still not dequeue.
Any pointers please.
Regards,
Nilesh
Not sure this is the [only] reason, but you didn't specify the payload type for the PL/SQL callback. Your callback specification should be either 'plsql://SPIN_D.dequeue_messages.dequeuecust?PR=0' for raw payload or 'plsql://SPIN_D.dequeue_messages.dequeuecust?PR=1' for ADT payload encoded in XML. Also, your AQ$_REG_INFO.NAME attribute is missing queue schema name.
Regards,
Vladimir
Similar Messages
-
Problems with Oracle JMS Advanced Queuing
Hello,
We have build an application using Advanced Queuing (database version 10.2.0.1.0). Everything works fine using PL/SQL. But when we try to send in messages through the Oracle JMS interface messages with less then 4000 bytes are stored in the queu table but the content of the message is not stored in one of the user data attributes.
Messages larger then 4000 bytes result in the following error:
oracle.jms.AQjmsException: JMS-204: Er is een fout opgetreden in de AQ JNI-laag.
at oracle.jms.AQjmsError.throwEx(AQjmsError.java:311)
at oracle.jms.AQjmsProducer.enqueue(AQjmsProducer.java:1323)
at oracle.jms.AQjmsProducer.send(AQjmsProducer.java:692)
at oracle.jms.AQjmsProducer.send(AQjmsProducer.java:465)
at nl.detailresult.aqadapter.test.OracleQueueSendTextMsgTest.testOracleQueuePlus4000(OracleQueueSendTextMsgTest.java:125)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
[Linked-exception]
oracle.jms.AQjmsException: ORA-00942: table or view does not exist
As far as I can see we have done everything according to the books but does anyone have a clue what we might have missed?Hi,
Have you found a solution to this? I am running into similar issue with SOA Suite using OJMS queues.
Regards,
Rajesh -
Oracle 11g Advanced PL/SQL 1Z0-146
Dears,
Good Day
I spent a lot of time to search on Material Guides to prepare to (Oracle 11g Advanced PL/SQL 1Z0-146) Exam.
Please anyone have free Materials or free useful sites tell me about it.
Waiting your kind response.
Thank you&
Best RegardsOracle certification related questions are better answered at {forum:id=459}
-
1Z1-146 Oracle 11g: Advanced PL/SQL
Hi All,
have planned to take up 1Z1-146 Oracle Database 11g: Advanced PL/SQL Beta exam by next month.
I don't find ample study materials or sample questions online. Can you suggest some resources of study? Did anyone completed the above certification exam before? If so, please let me know ..
ThanksHi Rose18
Have you consulted the following link ?
http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=41&p_org_id=&lang=&p_exam_id=1Z0_146
Oracle Recommended Training and Preparation is Oracle Database 11g: Advanced PL/SQL
It seems that no book and/or samples questions are available at the moment for that exam.
Hope this help you. -
Oracle Advanced Queuing - Propagation problem - 11g
Hi,
I have a problem when propagation messages between queues. When the message is propagated, it stays on the source queue with READY state.
I have created two queues on 11g with a propagation rule that any message from queue A are sent to queue B. My problem is that the message from the source queue stays in the source queue even after propagation, which isn't what I was expecting. The problem doesn't occur if the queues are on a different database. This problem only happens if the queues are on the same database.
the script I use is this:
For USERB (which has the destination queue)
create type EVENT_MESSAGE as object (
eventsource VARCHAR2(30),
eventname VARCHAR2(255),
eventid NUMBER(19,0),
message CLOB
DECLARE
an_agent sys.aq$_agent;
BEGIN
-- create the publish/subscribe queue table
dbms_aqadm.create_queue_table(
queue_table => 'DESTINATION_QUEUE_TABLE',
queue_payload_type=>'EVENT_MESSAGE',
sort_list => 'ENQ_TIME',
message_grouping => DBMS_AQADM.NONE,
multiple_consumers=>true
-- create the queue
dbms_aqadm.create_queue(
queue_name => 'DESTINATION',
queue_table => 'DESTINATION_QUEUE_TABLE',
queue_type => DBMS_AQADM.NORMAL_QUEUE,
max_retries => 5
dbms_aqadm.create_aq_agent(agent_name =>'DEQUEUE_AGENT');
an_agent := sys.aq$_agent('DEQUEUE_AGENT', null, null);
dbms_aqadm.enable_db_access(
agent_name => 'DEQUEUE_AGENT',
db_username => 'USERB'
dbms_aqadm.add_subscriber(
queue_name => 'DESTINATION',
subscriber => an_agent,
queue_to_queue => FALSE,
delivery_mode => DBMS_AQADM.PERSISTENT
-- start the queues
dbms_aqadm.start_queue('DESTINATION');
END;
For USERA
create type EVENT_MESSAGE as object (
eventsource VARCHAR2(30),
eventname VARCHAR2(255),
eventid NUMBER(19,0),
message CLOB
BEGIN
-- create the publish/subscribe queue table
dbms_aqadm.create_queue_table(
queue_table => 'SOURCE_QUEUE_TABLE',
queue_payload_type=>'EVENT_MESSAGE',
sort_list => 'ENQ_TIME',
message_grouping => DBMS_AQADM.NONE,
multiple_consumers=>true
-- create the queue
dbms_aqadm.create_queue(
queue_name => 'SOURCE',
queue_table => 'SOURCE_QUEUE_TABLE',
queue_type => DBMS_AQADM.NORMAL_QUEUE,
max_retries => 5
-- start the queues
dbms_aqadm.start_queue('SOURCE');
-- create the propagation
dbms_aqadm.add_subscriber(queue_name => 'SOURCE',
subscriber => sys.aq$_agent('DEQUEUE_AGENT','USERB.DESTINATION',null),
queue_to_queue => true);
dbms_aqadm.schedule_propagation(queue_name => 'SOURCE',
start_time => sysdate,
latency => 25,
destination_queue => 'USERB.DESTINATION');
END;
When I enqueue a message to the source on USERA with this:
declare
rc binary_integer;
nq_opt dbms_aq.enqueue_options_t;
nq_pro dbms_aq.message_properties_t;
datas EVENT_MESSAGE;
msgid raw(16);
begin
nq_pro.expiration := dbms_aq.never;
nq_pro.sender_id := sys.aq$_agent('ENQUEUE_AGENT', null, null);
datas := AGEAS_EVENT_MESSAGE('message','eventname',1,null);
dbms_aq.enqueue('SOURCE',nq_opt,nq_pro,datas,msgid);
end;
The message is propagated to the destination queue, no problem, but the message state on the source queue is kept as ready. I would have expected it to be marked as processed and disappear from the queue table.
When I look at the AQ$_SOURCE_QUEUE_TABLE_S the I see these records:
QUEUE_NAME NAME ADDRESS PROTOCOL SUBSCRIBER TYPE
SOURCE (null) "USERB"."DESTINATION"@AQ$_LOCAL 0 1736
SOURCE DEQUEUE_AGENT "USERB"."DESTINATION" 0 577
Can anyone help?I was talking about following oracle documentations:
Oracle Database 11g: Advanced Queuing (Technical Whitepaper)
Streams Advanced Queuing: Best Practices (Technical Whitepaper)
Oracle Streams Advanced Queuing and Real Application Clusters: Scalability and Performance Guidelines (Technical Whitepaper)
They are available at.. http://www.oracle.com/technetwork/database/features/data-integration/default-159085.html -
Hi,
I'm an OCA Oracle 9i PL/SQL and OCP Oracle 9i DBA. I wish to earn Oracle 11g OCP in PL/SQL now. Can anyone update me on how can I do that directly (bypassing exams for 10g).
On http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=155 I found following information which show I needs to pass only Oracle 11g Advanced PL/SQL 1Z0-146 to become OCP 11g PL/SQL as I'm already an OCA PL/SQL.
Am I correct?
PRIOR CERTIFICATION
Oracle PL/SQL Developer Certified Associate
|
|
EXAM
Oracle 11g Advanced PL/SQL
1Z0-146
|
|
Oracle Advanced PL/SQL Developer Certified Professional
--RobI found something on http://blogs.oracle.com/certification/oracle_certification_program_n/
Read
July 25, 2008
Developer Track Revealed – Alternative OCP Path for PL/SQL Developer OCAs
By Paul Sorensen on July 25, 2008 5:08 AM
--Rob -
Advanced queues Vs normal queues ?
Hi, Can anyone let me know if there is any other queuing mechanism in Oracle besides "Advanced" queues ? I am trying to find out if there are any standard/normal queues besides "Advanced" queues ?
ThanksNope - they are all 'advanced'.
Indeed, in some ways Advanced Queueing is simply the marketing name, to distinguish from IBM's MQ or Microsoft's MSMQ.
However, since the Queue can be kept in a persistent Oracle table, some pretty advanced capabilities can be derived that are not traditionally part of Message Queueing. Things like queue restart and queue content based reporting. (As describen in the AQ manual at http://tahiti.oracle.com) -
Oracle advanced queue 11G 11.2.0.x
Hi
Do we need extra license for using advanced queuing on Oracle 11G EE
http://en.wikipedia.org/wiki/Oracle_Advanced_Queuing
ThanksThere are various limitations in oracle express edition for licensing you can refer to below url
http://docs.oracle.com/cd/E17781_01/license.112/e18068.pdf -
Advanced Queuing in Oracle Forms
Hello! I'm trying to use the Advanced Queuing in Oracle Forms. I do it, that's for this manual:
http://st-curriculum.oracle.com/obe/forms/11g/formschataq/formschataq.htm
All objects created in the database successfully! However, in the section "Building the Forms Application to Interact with AQ", My form does not catch the event. Trigger WHEN-EVENT-RAISED in "Event" not called. The same thing happens when testing forms for chat.
Who have successfully used the "Advanced Queuing", tell me please, this example is correct? If no, can give a correct example? If yes, Maybe I did not set any settings?
I use Forms 1.1.2
Thank you!Michael Ferrante (Oracle) wrote:
Enable at least level 2 tracing in the console. You should see an exchange occur every 2 seconds (2000ms). If you do not see this then your MAX_WAIT is not being read. To enable trace level 2, open the console and left click in the text area of it. Then press the number 2 on the keyboard just above the letters Q and W. Do not use the number pad, as this will not work.If enable Level 2 in JavaConsole, nothing is written there. However, when the level 3, then every 2 seconds is displayed in the console this line:
network: Connecting http://localhost:7001/forms/lservlet;jsessionid=LvhyQ0QNg5KkJ17vnch3pQSMT6Z00B16yVr7m64npFKTKp1pBBjv!656070063 with proxy=DIRECTI changed the file formsfeb.cfg, set MaxEventWait = 5000. All restart, And a similar message is displayed every 5 seconds in the console.
network: Connecting http://localhost:7001/forms/lservlet;jsessionid=r31zQ0TLpHxK3kjBqMBk0tvYf9hn6wn6sGpKRppTvSX1f70pv0GS!571608984 with proxy=DIRECT
network: Connecting http://localhost:7001/ with proxy=DIRECT -
Error when connect to Advanced Queuing Oracle
Dear sir,
I'm using intellij IDE write one a class java to connect Advanced Queuing, my code follow :
queueConnectionFactory = AQjmsFactory.getQueueConnectionFactory("host", "sid", 1521, "thin");
queueConnection = queueConnectionFactory.createQueueConnection("usernamer", "password");
but program have error : "Exception in thread "main" oracle.jms.AQjmsException: ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region not found".
I try connect this schema by "sql developer", i receive same error. i change file sqldeveloper.conf, put line - AddVMOption -Duser.timezone="+07:00" then sql developer work fine.
I download tzupdater-1.3.40-2011h and run "java -jar tzupdater.jar -u" and "java -jar tzupdater.jar -f" but app not run.
can you have me. i need complete this app.Post the stack trace
-
Propagation between queues in Oracle Advanced Queuing
We would like to connect two queues that reside in different database schemas/instances.
We try to use the propagation feature of Oracle to achieve this.
The queue-type is the same for both queues.
Enqueuing is done with a recipient list in order to set multiple local subscribers for the messages that are put onto the queue.
We would like to propagate between queues without changing the applications that write to originating queue and the other applications that read from the target queue.
During our research we only found ways where we need to change the application that writes onto the queue, which is not acceptable for us. Also the list of subscribers needs to be different based on the message.
Therefore I have the following question:
- is there a way to set up propagation between queues in a way where we don't need to modify the sending application?
- if not, is there a different way to connect two queues via a subscriber/consumer?Oracle8i for Linux does have AQ, although I haven't evaluated it
yet. If you're still having trouble with the install, make sure
you get the patch. A quicker and easier way to get Oracle8i up
cheaply for evaluation is to download the NT version. I'm
evaluating Oracle8i for both Linux and NT and the NT version is
more stable.
I would really appreciate hearing about your experiences with AQ
on Oracle8 (8.0.4.3). I have several projects that we have been
considering using AQ with. Please send me an email and tell me
what problems / work-arounds you found.
Christian Schroeder (guest) wrote:
: Hello,
: I still haven't managed to install 8i completely
: (files with zero-length, wrong permissions, wrong JVM, ...),
: anyway... -))
: We are using Oracle Advanced Queuing under 8.0.4.3 on AIX in
: a project at my company and I wondered if AQ is in 8i for
Linux?
: I really would like to evaluate it at home, since the AIX
: AQ version has some bugs and restrictions which I really need
to
: get around.
: My idea is to get 8i for AIX, but I wouldn't buy it if the
: queuing is still unstable.
: The 8.0.4 documentation states that one will get AQ in the
: Enterprise Edition with message-type 'RAW' and the Objects
Option
: will add full functionality if also purchased. I didn't find
: any comments on AQ in the installation guide.
: Regards,
: Christian
null -
Is it possible to perform network data encryption between Oracle 11g databases without the advance security option?
We are not licensed for the Oracle Advanced Security Option and I have been tasked to use Oracle Network Data Encryption in order to encryption network traffic between Oracle instances that reside on remote servers. From what I have read and my prior understanding this is not possible without ASO. Can someone confirm or disprove my research, thanks.Hi, Srini Chavali-Oracle
As for http://www.oracle.com/technetwork/database/options/advanced-security/advanced-security-ds-12c-1898873.pdf?ssSourceSiteId… ASO is mentioned as TDE and Redacting Sensitive Data to Display. Network encryption is excluded.
As for Network Encryption - Oracle FAQ (of course this is not Oracle official) "Since June 2013, Net Encryption is now licensed with Oracle Enterprise Edition and doesn't require Oracle Advanced Security Option." Could you clarify this? Thanks. -
Integration Oracle Advance Queue with OSB
We are doing integration for Oracle Advance Queue with OSB.
I created an AQ adapter in Jdev and generate the WSDL and XSD.
I imported both WSDL and XSD in OSB Project.
When i am configuring the business service and selecting the WSDl i am not able to select Binding and ports, is it due to any issue in WSDL?
Please help.
Thanks,
Mihir PandaHi again,
I made some adjustments to your wsdl. I added the binding part and its reference to the appropriate port.
Now I reckon, you should be able to do your thing:
<wsdl:definitions
name="enq"
targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/aq/Applicatio90/Project4/enq"
xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/aq/Applicatio90/Project4/enq"
xmlns:opaque="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
xmlns:obj1="http://xmlns.oracle.com/xdb/APPS"
xmlns:ph="http://xmlns.oracle.com/pcbpel/adapter/aq/headers/payloadheaders/"
xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>
<plt:partnerLinkType name="Enqueue_plt" >
<plt:role name="Enqueue_role" >
<plt:portType name="tns:Enqueue_ptt" />
</plt:role>
</plt:partnerLinkType>
<wsdl:types>
<!-- Define AQ Headers = Payload Headers -->
<schema attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/aq/headers/payloadheaders/"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:obj1="http://xmlns.oracle.com/xdb/APPS" >
<import namespace="http://xmlns.oracle.com/xdb/APPS" schemaLocation="xsd/APPS_WF_EVENT_T.xsd"/>
<complexType name="enqHeaderCType" >
<sequence>
<!-- payload header -->
<element name="PayloadHeader" type="xs:string" />
</sequence>
</complexType>
<element name="enqHeader" type="ph:enqHeaderCType" />
</schema>
<schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
xmlns="http://www.w3.org/2001/XMLSchema" >
<element name="opaqueElement" type="base64Binary" />
</schema>
</wsdl:types>
<wsdl:message name="Enqueue_msg">
<wsdl:part name="opaque" element="opaque:opaqueElement"/>
</wsdl:message>
<wsdl:message name="Header_msg">
<wsdl:part name="Header" element="ph:enqHeader"/>
</wsdl:message>
<wsdl:portType name="Enqueue_ptt">
<wsdl:operation name="Enqueue">
<wsdl:input message="tns:Enqueue_msg"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="Enqueue_Binding" type="tns:Enqueue_ptt">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="Enqueue">
<soap:operation soapAction="put_your_own_URI_here"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="EnqueueService">
<wsdl:port name="Enqueue_ptt" binding="tns:Enqueue_Binding">
<soap:address location="No Target Adress"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Good luck.
Regards,
Ronald -
Sample Message Driven Bean using Oracle Advance Queuing
Hi,
Can someone please provide me with sample MDB using Oracle Advance Queuing to Enqueue & Dequeue messages?
ThanksWrite your email Id .....I have got a test case which basically enqueus and dequeues the messages using Oracle9i AQ..
--Venky -
Documentation for Oracle Advance Queue
Any pointer to Documentation for Oracle Advance Queue?
Thanks In Advance
priyadarshi.hello,
here it is
http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96587/qintro.htm
http://www.oracle.com/technology/sample_code/tech/dataint/index.html
both will be useful
thanks and regards
VD
Maybe you are looking for
-
PO got created with item blank
Hi, The Purchase Order got created with item blank. first user created PR, by taking the reference of that PR they created PO. after saving only header details are there in PO and line items are missing. This issue in Production so we cant create PO.
-
Start Workflow for Smartform report
Hi My ABAP program creates a Smartform report that I am able to send to the SAP Business Workplace inbox documents folder. In development, I'm sending it to myself, but in production the report will be sent to a particular user. I need to send the r
-
My addon bar is not showing up in the new Aurora update.
Firefox Aurora force updated last night and the addon bar is missing. It doesn't come up with Ctrl+/, it's not on the customize page, it's not listed under toolbars.
-
Enqueue purchase requisition with worklfow
Hello, i have a workflow for pur. req.. It works fine. Now I have to enqueue the pur. req. at start of the workflow and to dequeue it at the end. Therefore i created two methods (enqueue and dequeue) for the subtype of bus2105. The methods are callin
-
Hi, I am new to BSP. I want to know about BSP programing and how can i run the BSP programs? To run BSP program how can configure the internet services? Plese give the complete solution. Thanks & Regards, Dhanunjaya Reddy.