Data Replication with SQL Remote
PART 5. Appendix
APPENDIX A. Enterprise and Anywhere: Differences
There are some features of SQL Remote that must be approached in a different manner in SRE and SRA.
Partitioning tables that do not contain the subscription expression In SRA, publications can contain subqueries, and these allow tables that do not contain a partition expression to nevertheless be distributed properly among subscribers. In SRE, an additional column must be added to such tables, containing a list of subscribers, and triggers must be written to maintain the column. This column can have a maximum size of 255.
For descriptions, see the section entitled "Partitioning tables that do not contain the subscription expression", in the chapters "SQL Remote Design for Adaptive Server Anywhere", and "SQL Remote Design for Adaptive Server Enterprise", of the book Data Replication with SQL Remote.
Conflict resolution In SRA, conflict resolution is carried out using a special trigger syntax. In SRE, stored procedures must be written to carry out this task.
For descriptions, see the section entitled "Managing conflicts", in the chapters "SQL Remote Design for Adaptive Server Anywhere", and "SQL Remote Design for Adaptive Server Enterprise", of the book Data Replication with SQL Remote.
Storing messages before sending In SRE, a separate table named the stable queue is used to hold changes before replication. In SRA, there is no stable queue; instead, the messages are retrieved from current and old transaction log files.
Commands Whereas SQL Remote tasks such as creating publications are carried out using SQL statements in SRA, they are carried out using system stored procedures in SRE.
The Sybase Central administration tool hides many of these stylistic differences by providing a common look and feel to the administration of each version of SQL Remote.
In SQL Remote for Adaptive Server Anywhere, SQL statements are used to carry out the tasks that these stored procedures carry out in Adaptive Server Enterprise. The following table lists the SQL Remote procedures, and how they correspond to SQL statements in Adaptive Server Anywhere:
Adaptive Server Enterprise procedure |
Corresponding Adaptive Server Anywhere statement |
---|---|
sp_remote_type |
CREATE REMOTE MESSAGE TYPE |
sp_remote_type |
ALTER REMOTE MESSAGE TYPE |
sp_drop_remote_type |
DROP REMOTE MESSAGE TYPE |
sp_grant_remote |
GRANT REMOTE |
sp_revoke_remote |
REVOKE REMOTE |
sp_publisher |
GRANT PUBLISH |
sp_publisher |
REVOKE PUBLISH |
sp_create_publication sp_add_article sp_add_article_col |
CREATE PUBLICATION |
sp_add_article sp_remove_article sp_add_article_col sp_remove_article_col |
ALTER PUBLICATION |
sp_drop_publication |
DROP PUBLICATION |
sp_subscription 'create' |
CREATE SUBSCRIPTION |
sp_subscription 'drop' |
DROP SUBSCRIPTION |
sp_subscription 'start' |
START SUBSCRIPTION |
sp_subscription 'stop' |
STOP SUBSCRIPTION |
sp_subscription 'synchronize' |
SYNCHRONIZE SUBSCRIPTION |
sp_passthrough_user |
PASSTHROUGH FOR USERID |
sp_passthrough_subscription |
PASSTHROUGH FOR SUBSCRIPTION |
sp_passthrough_stop |
PASSTHROUGH STOP |