Alerter
The alerter method is used to asynchronously notify Publication Service of database changes. The adapter does not poll its publishing table for new rows at every interval. you can use the alerter method only when database changes are infrequent.
Procedures can be executed on the SQL command line or through any supported Application Programming Interfaces (the procedures cannot be invoked successfully from within a trigger). The procedures commit the inserts into the database table and notify the adapter of the commit.
Because an alerter runs with a database instance, not user schema, an adapter configuration cannot poll the publishing table name for just one user schema. For example, if the same publishing table exists for two user schemas and two adapter configurations are monitoring the same publishing table, each adapter configuration with a different user, both adapter configurations check the same publishing table whenever the alerter checks for changes in the publishing table.
Alerter Object Types and Stored Procedures
If the alerter polling method is used, object types and stored procedures are available for committing messages.
The following table lists the available object types and stored procedures.
Name | Type | Description |
---|---|---|
adb_alerter_qtbl (Oracle only) | AQ queue table | Queue table for all alerters. |
adb_alerter_q (Oracle only) | AQ queue | Queue for all alerters. |
adb_alerter_typ | Service Broker Message Type | Object type for all messages. |
adb_alerter_contract
(Microsoft SQL Server 2005 only) |
Service Broker Contract | The contract type used. The contract specifies the message types that can be used. |
instance_Id_q
(Microsoft SQL Server 2005 only) |
Service Broker Queue | Created by the config_alerter stored procedure. |
instance_Id_send_service
(Microsoft SQL Server 2005 only) |
Service Broker Service | Created by the config_alerter stored procedure. |
instance_Id_rcv_service
(Microsoft SQL Server 2005 only) |
Service Broker Service | Created by the config_alerter stored procedure. |
adb_alerter_typ | Object | Object type for the payload message. |
commit_and_notify | Procedure | Sends a change notification to all adapters. |
commit_and_notify_agent
alerter_name |
Procedure | Sends a change notification to the named alerter. |
commit_and_notify_table
table_name |
Procedure | Sends a change notification for a named table. |
stop_alerter | Procedure | Stops all running alerters. |
stop_alerter_agent
alerter_name |
Procedure | Stops the alerter for the named alerter. |
config_alerter | Procedure | Alerter call to register itself as an AQ subscriber. |
cleanup_alerter | Procedure | Alerter call to unregister itself as an AQ subscriber. |
listen_pipe | Procedure | Alerter call to block on alerts. |