For server-initiated synchronization, you can issue push requests by populating the PushRequest table directly, or making a change in the Dealer table. In the latter case, the Notifier begin_poll script detects the change in the Dealer table and populate the PushRequest table. In either case, the PushRequest table supplies rows to the Notifier request_cursor script, which determines how remote devices receive messages.
Prerequisites
This lesson assumes you have completed all preceding lessons. See Lesson 1: Setting up the consolidated database.
This lesson assumes that you have the roles and privileges listed in the Privileges section at the start of this tutorial: Tutorial: Configuring server-initiated synchronization using gateways.
Connect to your consolidated database in Interactive SQL if you are not already connected.
Run the following command:
dbisql -c "dsn=sis_cons" |
Execute the following SQL statements:
INSERT INTO PushRequest(mluser, subject, content) VALUES ('sis_user1', 'sync', 'not used'); COMMIT; |
Wait a few seconds for the synchronization to occur.
When populated, the PushRequest table supplies rows to the Notifier's request_cursor script. The request_cursor script determines what information is sent in the message, and which remote devices receive the information.
Execute the following SQL statements to make a change in the Dealer table on the consolidated database, prompting server-initiated synchronization:
UPDATE Dealer SET RATING = 'B' WHERE name = 'Geo'; COMMIT; |
Wait a few seconds for the synchronization to occur.
In this case, the Notifier begin_poll script detects changes in the dealer table and populates the PushRequest table appropriately. As before, once the PushRequest table is populated, the Notifier request_cursor script determines what information is sent in the message, and which remote devices receive the information.
Confirm that the Dealer table on the remote database was updated.
Execute the following SQL statement:
SELECT * FROM Dealer |
The rating for Geo should now be B.
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0 |