ITPub博客

首页 > Linux操作系统 > Linux操作系统 > StreamsAdvancedQueuing

StreamsAdvancedQueuing

原创 Linux操作系统 作者:redhouser 时间:2012-02-20 14:14:48 0 删除 编辑

Streams Advanced Queuing是Oracle自带的特性,支持数据库内、系统间、甚至与其他消息中间件进行可靠消息转递。

1,背景
支持接口包括Java,PL/SQL,C/C++.在Oracle10GR2中,Advanced Queuing重命名为Streams Advanced Queuing。
在PL/SQL中,通过DBMS_AQ.ENQUEUE,DBMS_AQ.DEQUEUE实现消息消息发送和接收.

2,Streams复制技术
Streams基于LogMiner与Advanced Queuing实现,用于替代基于触发器实现的Advanced Replication。
Oracle购买的GoldenGate以及LogicalStandby,也是基于日志挖掘的数据复制技术.

Oracle11G中,各类数据复制使用场合如下:
PhysicalStandby:高可用性,利用Active特性,可以分担部分负载.
GoldenGate:逻辑复制,全库或指定表,优于LogicalStandby
Streams Advanced Queuing:灵活的逻辑复制,指定表,优于Advanced Replication

3,适用场合:
(1)实现交易状态流转
(2)利用plsqlcallback功能实现异步处理,避免下一个处理主体根据状态查找需要处理的对象.

4,相关组件
4.1 DBMS_AQ
这个包主要定义了enqueue/dequeue等过程,如下所示:
- ENQUEUE procedure
- ENQUEUE_ARRAY function
- DEQUEUE procedure
- DEQUEUE_ARRAY function
- REGISTER Procedure (Register for message notifications)
- UNREGISTER procedure (Unregister a subscription which turns off notification)
- LISTEN procedures  ( Listen to one or more queues on behalf of a list of agents)
- POST procedures (Posts to an anonymous subscription which allows all clients who are registered for the subscription to get notifications)

4.2 DBMS_AQADM
这个包提供了用来管理AQ的接口。主要包括以下一些接口:
- CREATE_QUEUE_TABLE procedure
- CREATE_QUEUE procedure
- DROP_QUEUE procedure
- DROP_QUEUE_TABLE procedure
- PURGE_QUEUE_TABLE procedure
- START_QUEUE procedure
- STOP_QUEUE procedure
- ADD_SUBSCRIBER procedure
- REMOVE_SUBSCRIBER procedure

4.3相关视图
-DBA_QUEUE_TABLES: All Queue Tables in Database
-ALL_QUEUE_TABLES: User Queue Tables
-DBA_QUEUES: All Queues in Database
-DBA_QUEUE_SCHEDULES: All Propagation Schedules
-ALL_QUEUES: Queues for Which User Has Any Privilege
-QUEUE_PRIVILEGES: Queues for Which User Has Queue Privilege
-AQ$Queue_Table_Name: Messages in Queue Table
-USER_QUEUE_TABLES: Queue Tables in User Schema
-USER_QUEUES: Queues In User Schema
-USER_QUEUE_SCHEDULES: Propagation Schedules in User Schema
-AQ$Queue_Table_Name_S: Queue Subscribers
-AQ$Queue_Table_Name_R: Queue Subscribers and Their Rules
-DBA_QUEUE_SUBSCRIBERS: All Queue Subscribers in Database
-USER_QUEUE_SUBSCRIBERS: Queue Subscribers in User Schema
-ALL_QUEUE_SUBSCRIBERS: Subscribers for Queues Where User Has Queue Privileges
-V$AQ: Number of Messages in Different States for Specific Instances


 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/18922393/viewspace-716797/,如需转载,请注明出处,否则将追究法律责任。

上一篇: dbms_system
请登录后发表评论 登录
全部评论

注册时间:2011-05-26

  • 博文量
    211
  • 访问量
    804295