Oracle DBMS_ALERT 等待延迟
我有一份工作,它将提交 n 个其他工作。我已经设置了我的 pl/sql 过程来使用 dbms_alert.register 注册 n 个作业。每个作业都会发送 dbms_alert.signal。我在信号发出后立即发出了提交。
问题是,当我的程序到达 dbms_alert.waitany 时,不会返回信号 5 秒(几乎每次都如此)。该过程将提交另外 n 个作业,并且 waitany 将在大约 5 秒内再次接收不到任何信号。
我已经完成了研究,发现 dbms_alert.waitany 的默认轮询间隔是 5 秒。这可以通过使用 dbms_alert.set_defaults 过程来更改。我已经这样做了,但没有效果。我在代码中乱扔了 dbms_alert.set_defaults(1) (也尝试了 600),试图在 5 秒内获得信号,但没有任何效果。
谁能帮助我吗?
谢谢
I have a job, which will submit n other jobs. I have setup my pl/sql procedure to register for the n jobs using dbms_alert.register. Each of these jobs will send a dbms_alert.signal. I have issued a commit immediatly after the signal.
Here is the problem, when my program gets to the dbms_alert.waitany, not signal will be returned for 5 seconds (almost excactly every time). The procedure will submit another n jobs, and once again waitany will not recieve any signals for about 5 seconds.
I have done my research and have seen that the default polling interval for dbms_alert.waitany is 5 seconds. This can be changed by using the dbms_alert.set_defaults procedure. I have done that with no effect. I have littered my code with dbms_alert.set_defaults(1) (also tried 600 as well), trying to get the signals less than 5 seconds, but nothing works.
Can anyone help me?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在寻找的是已弃用的初始化参数 _job_queue_interval。仍然可以通过
alter system set "_job_queue_interval"=5scope=spfile;
进行设置...并重新启动数据库。
DBMS_ALERT.SET_DEFAULTS 过程设置轮询间隔以防需要轮询循环(这种情况非常罕见)。有关轮询时间的信息,请参阅 Oracle 10g 文档发生(这种情况非常罕见)。
What you're looking for is the deprecated initialization parameter _job_queue_interval. It can still be set with
alter system set "_job_queue_interval"=5 scope=spfile;
...and restarting the database.
The DBMS_ALERT.SET_DEFAULTS procedure sets the polling interval in case a polling loop is required (which is very rare). Refer to the Oracle 10g docs about when polling occurs (which is very rare).