Synchronizing data over a message system
Creatingsubscr iptions Asubscription is created at a consolidated Adaptive Server Enterprise
databaseusing the sp_subscription procedure with a first argument of
create.
Creatinga subscription defines the data to be received. Itdoes not
synchronizea subscription (provide an initial copy of the data) or start
(exchangemessages) a subscription.
Synchronizing
subscriptions Synchronizing a subscription causes the Message Agent to send a copyof all
rowsin the subscription to the subscriber. It assumes that an appropriate
databaseschema is in place. At an AdaptiveServer Anywhere consolidated
database,subscriptions are synchronized using the SYNCHRONIZE
SUBSCRIPTIONstatement. At an AdaptiveServer Enterprise consolidated
database,subscriptions are synchronized using the sp_subscription
procedurewith a first argument of synchronize.
Whensynchronization messages are received at a subscriber database, the
MessageAgent replaces the current contents of the database with the new
copy.Any data at the subscriber that is part of the subscription, and which
hasnot been replicated to the consolidated database, is lost. Once
synchronizationis complete, the subscription is started by the Message
Agentusing the START SUBSCRIPTION statement or sp_subscription
procedurewith a first argument of start.
Largevolume of messages may result
Synchronizingdatabases over a message system may lead to large volumes
ofmessages. In many cases, it is preferable to use the extraction process to
synchronize a database locally without placing this burdenon the message
system.
Synchronizing
subscriptions during
operation
Ifa remote database becomes out of step with the consolidated database, and
cannotbe brought back in step using the SQL passthrough capabilities of
SQLRemote, synchronizing the subscription forces the remote database into
stepwith the consolidated database by copying the rows of the subscription
fromthe consolidated database over the contents at the remote database.
Dataloss on synchronization
Any data in the remote database that is part of the subscription, butwhich
has not been replicated to the consolidated database, is lost when the
subscription is synchronized. You may wish to unload or back up the
remote database using Sybase Central or, for AdaptiveServer Anywhere,
the

dbunload

utilitybefore synchronizing the database.
198