Oracle 视图 ALL_QUEUES 官方解释,作用,如何使用详细说明

本站中文解释

ALL_QUEUES 视图返回在当前用户的模式中的所有队列定义的信息。ALL_QUEUES 视图是使用 Data Control Language (DCL) 语句创建或管理数据库对象的一个有用工具。

使用 ALL_QUEUES 视图的方法如下:

1.查询所有的队列定义:
SELECT * FROM all_queues;

2.检查给定的队列是否存在:
SELECT * FROM all_queues
WHERE name = ‘QUEUE_NAME’;

3.检查给定名称的队列是否与给定注释一致:
SELECT * FROM all_queues
WHERE name = ‘QUEUE_NAME’
AND COMMENTS = ‘QUEUE COMMENT’;

4.检索队列拥有哪些属性:
SELECT name, max_retries, retention
FROM all_queues
WHERE name = ‘QUEUE_NAME’;

官方英文解释

ALL_QUEUES describes all queues on which the current user has enqueue or dequeue privileges. If the user has any Advanced Queuing system privileges, like MANAGE ANY QUEUE, ENQUEUE ANY QUEUE or DEQUEUE ANY QUEUE, then this view describes all queues in the database.

Related Views

  • DBA_QUEUES describes all queues in the database.

  • USER_QUEUES describes the operational characteristics of every queue owned by the current user. This view does not display the OWNER column.

Column Datatype NULL Description

OWNER

VARCHAR2(128)

NOT NULL

Owner of the queue

NAME

VARCHAR2(128)

NOT NULL

Name of the queue

QUEUE_TABLE

VARCHAR2(128)

NOT NULL

Name of the table the queue data resides in

QID

NUMBER

NOT NULL

Object number of the queue

QUEUE_TYPE

VARCHAR2(20)

Type of the queue. Possible values:

  • EXCEPTION_QUEUE

  • NON_PERSISTENT_QUEUE

  • NORMAL_QUEUE

MAX_RETRIES

NUMBER

Maximum number of retries allowed when dequeuing from the queue

RETRY_DELAY

NUMBER

Time interval between retries

ENQUEUE_ENABLED

VARCHAR2(7)

Indicates whether the queue is enabled for enqueue (YES) or not (NO)

DEQUEUE_ENABLED

VARCHAR2(7)

Indicates whether the queue is enabled for dequeue (YES) or not (NO)

RETENTION

VARCHAR2(40)

Time interval (in seconds) processed messages are retained in the queue, or FOREVER

USER_COMMENT

VARCHAR2(50)

User specified comment

NETWORK_NAME

VARCHAR2(512)

Network name

SHARDED

VARCHAR2(5)

TRUE if queue is sharded, FALSE otherwise

QUEUE_CATEGORYFoot 1

VARCHAR2(25)

 

Queue category. Possible values:

  • Classic Queue
  • Sharded Queue
  • Transactional Event Queue

RECIPIENTSFoot 1

VARCHAR2(8)

  SINGLE or MULTIPLE recipients

Footnote 1 This column is available starting with Oracle Database 21c.

See Also:

  • “DBA_QUEUES”

  • “USER_QUEUES”

  • Oracle Database Advanced
    Queuing User’s Guide
    for more information Advanced Queuing


数据运维技术 » Oracle 视图 ALL_QUEUES 官方解释,作用,如何使用详细说明