09.12.2012 Views

Advanced Queuing - Oracle

Advanced Queuing - Oracle

Advanced Queuing - Oracle

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Propagation Features<br />

PL/SQL (DBMS_AQADM Package): Example Code<br />

CONNECT OE/OE;<br />

/* get averages<br />

select avg_time, avg_number, avg_size from user_queue_schedules;<br />

/* get totals<br />

select total_time, total_number, total_bytes from user_queue_schedules;<br />

/* get maximums for a window<br />

select max_number, max_bytes from user_queue_schedules;<br />

/* get current status information of schedule<br />

select process_name, session_id, instance, schedule_disabled<br />

from user_queue_schedules;<br />

/* get information about last and next execution<br />

select last_run_date, last_run_time, next_run_date, next_run_time<br />

from user_queue_schedules;<br />

/* get last error information if any<br />

select failures, last_error_msg, last_error_date, last_error_time<br />

from user_queue_schedules;<br />

Visual Basic (OO4O): Example Code<br />

This functionality is currently not available.<br />

Java (JDBC): Example Code<br />

No example is provided with this release.<br />

Exception Handling During Propagation<br />

When system errors such as a network failure occur, <strong>Advanced</strong> <strong>Queuing</strong> continues<br />

to attempt to propagate messages using an exponential backoff algorithm. In some<br />

situations that indicate application errors, AQ will mark messages as<br />

UNDELIVERABLE if there is an error in propagating the message.<br />

Examples of such errors are when the remote queue does not exist or when there is<br />

a type mismatch between the source queue and the remote queue. In such situations<br />

users must query the DBA_SCHEDULES view to determine the last error that<br />

occurred during propagation to a particular destination. The trace files in the<br />

$ORACLE_HOME/log directory can provide additional information about the error.<br />

8-116 <strong>Oracle</strong>9i Application Developer’s Guide - <strong>Advanced</strong> <strong>Queuing</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!