如何在Oracle AQ中清除队列 [英] How to clear a queue in Oracle AQ

查看:850
本文介绍了如何在Oracle AQ中清除队列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经第一次测试Oracle AQ.我已经设法在创建的队列中创建了2000行测试插入.

I've been testing Oracle AQ for the first time. I have managed to create 2000 rows of test inserts into the queue I created.

现在,我想清除这些内容.在自学时,我将到期时间设置为一个月.我等不了那么久.而且我不认为应该从队列表中删除它们.

Now, I'd like to clear those out. As I was teaching myself, I set the expiry time to be a month. I can't wait that long. And I don't think I should just delete them from the queue table.

做到这一点的最佳方法是什么?

What's the best way to do this?

推荐答案

您可以使用DBMS_aqadm.purge_queue_table过程.

解决方案

SQL看起来像这样:

The SQL looks something like this :

-- purge queue
DECLARE
 po_t dbms_aqadm.aq$_purge_options_t;
BEGIN
  dbms_aqadm.purge_queue_table('MY_QUEUE_TABLE', NULL, po_t);
END;

这篇关于如何在Oracle AQ中清除队列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆