Advanced Queuing performance estimate ?
Does anyone have any performance experience with using AQ on Unix. How many messages can be enqueued/dequeued per second ? This is of course very configuration/hardware dependent. But if anyone have any examples i would be very greatful.
Thanks
/Christian
null
ODP.NET does not support AQ but we will evaluate it in a later release.
Similar Messages
-
Nested Tables and Advanced Queues- Please Help.
How do i work with NestedTable type and Advanced Queue.
I have done the following
I have Oracle 8.1.7 enterprise edition.
create type myType as TABLE OF varchar(32);
create type myObject as OBJECT (
id int,
myt myType);
DECLARE
BEGIN
dbms_aqadm.create_queue_table(
queue_table => 'my_queue_table',
multiple_consumers => TRUE,
queue_payload_type => 'myObject',
compatible => '8.1.3'
END;
The Nested Table and Object are created successfully.
but the queue is not created.
I get the following message.
DECLARE
ERROR at line 1:
ORA-22913: must specify table name for nested table column or
attribute
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 2012
ORA-06512: at "SYS.DBMS_AQADM", line 55
ORA-06512: at line 3
I know how to specify the nested table storage clause for
create table statement, but there is no provision for
it in the create_queue_table procedure.
Any help will be greately appriciated.
i have already created and tested aqs with simple data types,
also i have created simple tables with nested table type
elements.
but the combo of Nested tables and AQ is not working.
thanks in advance.Hi Francois. Thank you very much for your reply, but it seems that i still get errors. So let me tell what i have done.
As you suggested me: i have done a block based on a sub-query for the nested-table:
'select courses from department where name= :department.name'.
In the master block(department) i have the when-new-record-instance trigger:
Declare
LC$Req varchar2(256);
Begin
LC$Req := '(select ns.courses from table
( select courses from department where name = ''' || :DEPARTMENT.name || ''' ) ns )';
Go_block('block11');
Clear_Block ;
Set_Block_Property( 'block11', QUERY_DATA_SOURCE_NAME, LC$Req ) ;
Execute_query ;
End ;
Now the errors i receive, this time in the runtime mode are:
- FRM-41380: Cannot set the blocks query data source
-FRM-41003: This function cannot be performed here.
Since it seems that you know how to work with the nested table i would really appreaciate your help. I am new in the nested table and if you could give an ex with my tables it would be great.
Thank you in advance. -
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 -
Advanced Queues Snapshot too old error
I am using the advanced queues to submit work for parallel processes running through the Oracle Job Queue.
I have attempted running anywhere from 1 to 5 simultaneous processes (in addition the the process which submits them to the Oracle job queue and populates the advanced queues) and I am getting sporadic Snapshot too old errors when the other processes are attempting to dequeue. The Advanced queues are populated before the other processes are submitted to the job queue, so I don't see that there could be conflicts between one process enqueuing while another is dequeuing.
The reason I am attempting this is to try and gain some performance by running processes in parallel.
Has anyone else had problems like this? Is this a bug in Oracle 8.1.6? Is there a parameter setting I need to adjust? Are there any suggestions for getting around this problem?I don't know what version of the database you are running? I'm only using 8.1.7.4. But where I come from, you add datafiles to the tablespace, not the rollback segment.
alter tablespace rollback
add datafile '<blah, blah>'
size 147m
autoextend on next 100m maxsize 2047m;
Make sure that you have a suitable number of rollback segments that are well-sized extents. But mostly, listen the Tom Best, and try and introduce some best practices (no pun intended) to reduce the likelihood of this situation arising. -
Advanced Queuing between 2 databases
Hi,
We want to use Oracle Advance Queuing to send a message from a source Database (transactional) to a Reporting database
On a particular event on a record in the source database, we want to enqueue the record's code on a Queue in the target database, where the dequeuing will happen and some processing will take place for each code retrieved.
Do we need to set up the Advanced Queuing software on both DBs?
- Can we just have 1 queue on the target DB and get the source Database to enqueue records to it? How will the source DB will be given access to the queue?
- Or do I really need to have a queue on each Database and use propagation?
Thanks in advance for your help.
RgdsTony,
thanks very much for your precious advice.
I like your suggestion of having one queue, it keeps the infrastruture simple.
Have I got the option of having this single queue either at the source or the target DB?
Maybe let me summarise more precisely what I am trying to achieve: we want to copy a complex data structure on the Source DB to a simplified/flatter data structure on the reporting DB.
An event on a row on the main table on the source DB triggers the copy.
We are thinking of enqueing of the record's id to the queue (So app on the source DB will have to enqueue)
and when dequeuing each message , a stored procedure will read the data structure for this record id and child tables and insert the relevant data to the report data structure on the target DB.
So with one queue, it seems that there are 3 options, not sure which is best. The idea is to have minimum impact on the source DB
1. Queue at the target DB. Source DB enqueues message remotely (is this possible? can't find any documentation about this?). Message is dequeued at the target and the proc (at target) reads from the source with DB link and writes the new data to the target
2. Queue at the source DB. Source DB enqueues message locally, an application on the target DB dequeues the message and the procedure (at target) reads from the source with DB link and writes the new data to the target DB.
3.Queue at the source DB. Source DB enqueues message locally, an application on the source DB dequeues the message and the procedure (at source) reads data from the source and writes the new data to the target using a DB link
3. seems having the most impact on performance of the source db?
In all case I don't think I can avoid a DB link in the sored proc (one way or the other) as the data structures are a too complex to be passed through the queue....
What do you think?
Thanks
Philippe -
JPA + Oracle Advanced Queues
Hi,
Has anyone managed to share a transaction between the toplink JPA implementation and the Oracle Advanced Queues interface (which uses jdbc; java.sql.connection) in a J2SE environment?
Running both in a J2EE environment is working fine, as both of them are using the JTA provided by OC4J.
I've been trying to use JOTM as a lightweight JTA provider, but without any success at this point. JPA is using the datasource created by jotm (that includes the jotm transactionmanager), but it seems like JTA transactions are being ignored by the EntityMaanger at this point...
regards,
BertHi! I'm not a dev, but I know for sure ODP.NET does not support AQ. You might wanna have a look at Oracle Object for OLE (OO4O). It supports AQ and can be used in both VB.NET and C# through COM Interop. Of course, the performances will not be as good as ODP.NET tho.
Have a nice one.
Mathieu Gauthier
Development Team
JCMB Technology Inc -
Advanced queue taking a lot of CPU time
hi ,
My application has a workflow which dequeues messages from an advanced queue.The message is simple text message. But i am facing CPU time problems. when the workflow( one of the steps is to dequeue) runs it uses 100% of a particular CPU.
can somebody throw some light on the things to implement to reduce CPU time and why i am having this problem.
also , i am using the TOP command on UNIX to trace the process.Does it give us the correct CPU usage measure?suggest some more specific measures , if any.
Thanks in AdvanceHi,
I came across tip for speeding up OpenLdap a while ago, I have never tested it as I have never found the need to but here it is :-
Stop the OpenLdap service
Open slapd.conf which is under SharedServices\openLDAP\
Locate
*# Indices to maintain*
index objectClass eq
index cn,ou,cssIdentity,member,cssRoleDN,cssProductCode,cssVersion eq
index cssDisplayNameDefault eq,sub
and add
index uniqueMember eq
Save/Close
run slapindex.exe -f c:\<location to slapd.conf>\slapd.conf
Start up OpenLdap service again.
Though this doesn't explain the reason why you are suddenly getting performance issues, do you have a large amount of native users/groups ?
If you are on 9.3.1 have you tried Sync Native Directory from Shared Services.
Cheers
John
http://john-goodwin.blogspot.com/ -
Suggestion required in implementing Advanced Queues
I am using Oracle 11g Database in Linux Platform .
The scenario is like this ...
I am selecting rows from a table(say "A") doing some operations using PLSQL API's and finally dumping the results into other table(say "B") . Now the results populated are being used by the Java Worker , so the Java Worker continously spawns table "B" looking for the result which degrades the performance .
Is there anyway wherein I can create a event which can intimate the java worker at the time result gets populated so that the java worker can carry on with some other work instead of spawning for the result continously .
Is this possible by advanced queues so that a event occurs and may be the Java worker is called during that event ?Hello,
Two thoughts come to mind. You could have a Java Message Listener listening on a queue for an event and then do whatever you need to do after it has received that event.
The other option is to use the external procedure mechanism to invoke a bit of c code to start you Java code. A bit convoluted compared to the first option.
Thanks
Peter -
How to stop listening on advanced queue
hi,
i created a java application that listens to an oracle advanced queue then automatically dequeues a messsage after listening. I've set my listen time-out to be the maximum integer value because i don't know when exactly when other applications will enqueue messages.
the problem is when i attempt to shutdown the server, my application is still listening to the advanced queue.
i want to find a way to for the LISTEN to stop whenever i perform a certain event, for example, i want shutdown my server. does oracle advance queue have that kind of functionality? stopping the LISTEN?
Thanks very much
ChescaHi Chesca,
we recently experienced the same problem.
Instead of "resolve" it, we tried to "avoid" it.
Our solution is based on 2 legs:
1) a "not-infinite" wait time, let's say 300 secs (5 mins)
2) an (outer) "infinite-loop" that relaunch the (inner) LISTEN method, catching the appropriate exceptions, and testing for the "state" of the queue
Hope this could help you.
Bye
Paolo -
Hi,
I would like to know, how can I create Oracle Advanced Queues using Oracle 10g Enterprise Manager console/s.
Thanks.Hi! I'm not a dev, but I know for sure ODP.NET does not support AQ. You might wanna have a look at Oracle Object for OLE (OO4O). It supports AQ and can be used in both VB.NET and C# through COM Interop. Of course, the performances will not be as good as ODP.NET tho.
Have a nice one.
Mathieu Gauthier
Development Team
JCMB Technology Inc -
Advanced queuing ...regarding
Hi...
I have to work on project which deals with advanced queuing...
I gone through the docs ...but i couldn't understand fully...can anyone help in this aspect my questions are
what i have to configure in my system?(software)
how i have to move?
please help me with an example..
thanxs in advance.Oracle AQ is used as a means of asynchronous communication between two (or more) Oracle databases.
Instead of communicating directly to the remote DB within your online application, you post a message into a local AQ queue (which would already have been setup for queue propagation) and Oracle takes care of making sure that it is made available at the destination (remote) AQ queue (it handles remote server not available and other transient errors automatically).
Once the message appears at the remote queue, it could be read and appropriate action performed (as indicated by message contents). -
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
-
** Queue Performance in BPM scenarios
Hi friends,
How about the Queue performance when processing lot of messages at the same time ? For example, if 100 files are picked up and processed by BPM (at the same time), all files processed by the queue XBQO$PE_<Task> Ex: XBQO$PE_WS90000041and the result are delivered thru transaction queues ex: XBTOY0_<4 digit queue> .
My doubt is a) Will this slow performance when processing lot of files like 200,300 b) Is it required to increase any queue parameter ?
Kindly clarify, friends.
Kind Regards,
Jeg P.Hey,
refer to the link for the performance issues.
/people/swen.conrad/blog/2006/12/22/xi-ccbpm-performance-under-perform-or-out-perform
If you think the performance is slow then you can go for multiple Queues.
refer to this link for the configuration of multiple Queues.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0ff0006-3901-2a10-9e97-a71b423da545
reward points if useful.
regards,
Milan -
Java advanced queue MDB class usage
Hello,
Loads of questions about JMS AQ and MDB.
I have not found anything that tells you how to use the oracle.jms classes within a MDB's directly. Do I just cast the message to a AQMessage and retrieve from there?
I have found plenty of documentation about using the oracle.jms classes. Ive found a lot of information about using advanced queues and enqueing and dequeuing to them in Java. I have found information about MDBs and how to use them as a regular service ie: using TextMessage
Is there a simple document describing MDB oracle AQ classes? I have looked through umpteen million Oracle documents to no avail.
Is there an interface for MDB in the Oracle AQ classes which has an onMessage() method which I can implement taking in oracle.jms classes?
When processing a message that I would like to put on another queue do I call the AQ classes to enqueue a message and set its attributes that way or do I use the JMS classes and their methods to do that?http://download-west.oracle.com/docs/cd/A97688_12/generic.903/a97677/mdb.htm#1013265 should get me most of the way there.
-
Does the advanced queue support setting the pay load type as array/table?
Does the advanced queue support setting the pay load type as array/table?
if yes, how to write the enqueue script, I tried to write the following the script to enqueue, but failed, pls help to review it . Thanks...
------Create payload type
create or replace TYPE "SIMPLEARRAY" AS VARRAY(99) OF VARCHAR(20);
------Create queue table
BEGIN DBMS_AQADM.CREATE_QUEUE_TABLE(
Queue_table => 'LUWEIQIN.SIMPLEQUEUE',
Queue_payload_type => 'LUWEIQIN.SIMPLEARRAY',
storage_clause => 'PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 TABLESPACE USERS',
Sort_list => 'ENQ_TIME',
Compatible => '8.1.3');
END;
------Create queue
BEGIN DBMS_AQADM.CREATE_QUEUE(
Queue_name => 'LUWEIQIN.SIMPLEQUEUE',
Queue_table => 'LUWEIQIN.SIMPLEQUEUE',
Queue_type => 0,
Max_retries => 5,
Retry_delay => 0,
dependency_tracking => FALSE);
END;
-------Start queue
BEGIN
dbms_aqadm.start_queue(queue_name => 'LUWEIQIN.SIMPLEQUEUE', dequeue => TRUE, enqueue => TRUE);
END;
-------Enqueue
DECLARE
v_enqueueoptions dbms_aq.enqueue_options_t;
v_messageproperties dbms_aq.message_properties_t;
p_queue_name VARCHAR2(40);
Priority INTEGER;
Delay INTEGER;
Expiration INTEGER;
Correlation VARCHAR2(100);
Recipientlist dbms_aq.aq$_recipient_list_t;
Exceptionqueue VARCHAR2(100);
p_queue_name VARCHAR2(40);
p_msg VARCHAR2(40);
p_payload LUWEIQIN.SIMPLEARRAY;
BEGIN
p_payload(1) := 'aa';
p_payload(2) := 'bb';
SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
END;
------Get error
Error starting at line 1 in command:
DECLARE
v_enqueueoptions dbms_aq.enqueue_options_t;
v_messageproperties dbms_aq.message_properties_t;
p_queue_name VARCHAR2(40);
Priority INTEGER;
Delay INTEGER;
Expiration INTEGER;
Correlation VARCHAR2(100);
Recipientlist dbms_aq.aq$_recipient_list_t;
Exceptionqueue VARCHAR2(100);
p_queue_name VARCHAR2(40);
p_msg VARCHAR2(40);
p_payload LUWEIQIN.SIMPLEARRAY;
BEGIN
p_payload(1) := 'aa';
p_payload(2) := 'bb';
SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
END;
Error report:
ORA-06550: line 17, column 3:
PLS-00306: wrong number or types of arguments in call to 'ENQUEUE'
ORA-06550: line 17, column 3:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:but when I use the following script to enqueue get error. Pls help to review. Thanks...
DECLARE
v_enqueueoptions dbms_aq.enqueue_options_t;
v_messageproperties dbms_aq.message_properties_t;
p_queue_name VARCHAR2(40);
Priority INTEGER;
Delay INTEGER;
Expiration INTEGER;
Correlation VARCHAR2(100);
Recipientlist dbms_aq.aq$_recipient_list_t;
Exceptionqueue VARCHAR2(100);
p_queue_name VARCHAR2(40);
p_msg VARCHAR2(40);
p_payload LUWEIQIN.SIMPLEARRAY;
BEGIN
p_payload(1) := 'aa';
p_payload(2) := 'bb';
SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
END;
------Get error
Error starting at line 1 in command:
DECLARE
v_enqueueoptions dbms_aq.enqueue_options_t;
v_messageproperties dbms_aq.message_properties_t;
p_queue_name VARCHAR2(40);
Priority INTEGER;
Delay INTEGER;
Expiration INTEGER;
Correlation VARCHAR2(100);
Recipientlist dbms_aq.aq$_recipient_list_t;
Exceptionqueue VARCHAR2(100);
p_queue_name VARCHAR2(40);
p_msg VARCHAR2(40);
p_payload LUWEIQIN.SIMPLEARRAY;
BEGIN
p_payload(1) := 'aa';
p_payload(2) := 'bb';
SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
END;
Error report:
ORA-06550: line 17, column 3:
PLS-00306: wrong number or types of arguments in call to 'ENQUEUE'
ORA-06550: line 17, column 3:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
Maybe you are looking for
-
I am running Snow Leopard and have a Mobile Me account. My Mobile Me account expires at the end of June. I have been told that I will need to buy the Lion upgrade to run icloud on my imac, but I am aware that Lion is due to be replaced by Mountain
-
TreeSet, TreeMap or Comparable?
I'm simply tackling this problem concerning a list of employee's and their division # within a company... Misino, John 8 Nguyen, Viet 14 Punchenko, Eric 6 Dunn, Michael 6 Deusenbery, Amanda
-
Remove Trogan "Win7 anti-virus 2012"
I am working on a Desktop Hp Pavalion p6710f Windows7 Home Premium 64 Edition I have a trogan "Win7 anti-virus 2012" virus. Anyone know how to remove it? Can't get on the internet..to download anything to remove. Tried safe mode and used "last know g
-
Release notes for Smartforms 4.7
Dear Friends, If anybody can provide release notes on Smartforms for SAP 4.7 Thanks in Advance......... Message was edited by: Ashish Kansara
-
Manually Running Timer Job "Content Type Subscriber" on SP Online
I need to run the "Content Type Subscriber" timer job on my SP Online instance because the default setting is hourly. This makes it difficult to build out and deploy content types quickly because depending on when you make the content type change yo