Friday, August 06, 2010

DBA_QUEUES and the little mistery of the blanks

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

I just found out that columns ENQUEUE_ENABLED and DEQUEUE_ENABLED in views DBA_QUEUES, ALL_QUEUES and USER_QUEUES, return a couple of (unnecessary?) leading and trailing blank characters.

select name, queue_type, translate(dequeue_enabled, ' ', '.') dequeue
from dba_queues;

NAME QUEUE_TYPE DEQUEUE
-------------- --------------- -------
AQ$_ALERT_QT_E EXCEPTION_QUEUE ..NO..
ALERT_QUE NORMAL_QUEUE ..YES..
...

I wonder if this is a whim of Oracle XE for linux only or if it is some "backward compatibility" feature that occurs also on other versions.

It's not a big deal, but it's something odd enough to cause a trivial query with a WHERE clause on these columns to fail until you realize that Oracle is returning such unusual values for some reason.

1 comment:

Neil said...

It is also annoyingly true for Oracle 10.2.0.3 on AIX.

By the way, I like the style of your blog.

cheers

Neil

yes you can!

Two great ways to help us out with a minimal effort. Click on the Google Plus +1 button above or...
We appreciate your support!

latest articles