Example for Starting a Microsoft SQL Server Alerter

To start an alerter on a Microsoft SQL Server database, you have to run the commit_and_notify_table stored procedure.

The following example shows how to run the stored procedure on a Microsoft SQL Server database. It is assumed that the rvpub.tra configuration has its data source name, user account name (demo) and password defined in the repository.

Prerequisites

A Publication Service service with the TIBCO Rendezvous transport type has been configured with the alerter method selected.

Procedure

  1. Start the adapter configuration by typing the following command:
    adbagent --propFile rvpub.tra
  2. Insert a message and then run the commit_and_notify_table stored procedure with the publishing table monitored by the adapter.
    For example, if the adapter is monitoring the PUB_ORDER table, run the stored procedure as follows:
    isql -Udemo -Pdemo
    SQL> insert into ORDER_TABLE values(111,'Oak Table',499.95);
    SQL> execute commit_and_notify_table ’PUB_ORDER’;
    The procedure puts a message in the Service Broker queue, which is picked up by the adapter. The publisher endpoint then reads its publishing table and sends a message containing the changed data on its configured subject.

Result

This example shows how to notify an adapter configuration to poll a single table, that is, PUB_ORDER, for changes. You can use the commit_and_notify stored procedure to poll all publishing tables for changes.