|Oracle® Streams Advanced Queuing User's Guide and Reference
Part Number B10785-01
This chapter describes how to troubleshoot Oracle Streams Advanced Queuing (AQ).
The chapter contains these topics:
The following tips should help with debugging propagation problems. This discussion assumes that you have created queue tables and queues in source and target databases and defined a database link for the destination database. The notation assumes that you supply the actual name of the entity (without the brackets).
See Also:"Optimizing Propagation"
To begin debugging, do the following:
Check that the propagation schedule has been created and that a job queue process has been assigned.
Look for the entry in
aq$_schedules. Check that it has a '
aq$_schedules, and that there is an entry in
job$ with that jobno. Make sure that the status of the schedule is enabled:
SCHEDULE_DISABLED must be set to '
To check if propagation is occurring, monitor the view
dba_propagation_schedules for the number of messages propagated (
If propagation is not occurring, check the view for any errors (
last_error_message). Also check the
dba_propagation_schedules to see if propagation is scheduled for a later time, perhaps due to errors or the way it is set up.
Check if the database link to the destination database has been set up properly. Make sure that the queue owner can use the database link.
You can do this by doing
select count(*) f
Make sure that at least two job queue processes are running.
Check for messages in the source queue with:
select count (*) from AQ$<source_queue_table> where q_name = 'source_queue_name';
Check for messages in the destination queue with:
select count (*) from AQ$<destination_queue_table> where q_name = 'destination_queue_name';
Check to see who is using job queue processes.
Check which jobs are being run by querying
dba_jobs_running. It is possible that other jobs are starving the propagation jobs.
Check to see that the queue table
instno exists in
dba_queue_tables. The queue
instno must also exist in
dba_queues and must be enabled for enqueue and dequeue.
In case of RAC, this queue table and queue pair must exist for each RAC node in the system. They are used for communication between job queue processes and are automatically created.
For 8.1-compatible queues, you can do the following:
select consumer_name, deq_txn_id, deq_time, deq_user_id, propagated_msgid from aq$<destination_queue_table> where queue = 'queue_name';
For 8.0-style queues, you can obtain the same information from the history column of the queue table:
select h.consumer, h.transaction_id, h.deq_time, h.deq_user, h.propagated_msgid from aq$<destination_queue_table> t, table(t.history) h where t.q_name = 'queue_name';
Turn on propagation tracing at the highest level using event 24040, level 10.
Debugging information is logged to job queue trace files as propagation takes place. You can check the trace file for errors and for statements indicating that messages have been sent.
This error is raised if a message is enqueued to a multiconsumer queue with no recipient and the queue has no subscribers (or rule-based subscribers that match this message). This is a warning that the message will be discarded because there are no recipients or subscribers to whom it can be delivered.
When using the Oracle Streams AQ navigation option, you must reset the dequeue position by using the
FIRST_MESSAGE option if you want to continue dequeuing between services (such as
xa_end boundaries). This is because XA cancels the cursor fetch state after an
xa_end. If you do not reset, then you get an error message stating that the navigation is used out of sequence.