Replication Server

Replication Server keeps data up to date in multiple databases so that clients can access local data instead of remote, centralized databases. Compared to a centralized data system, a replication system provides improved system performance and data availability and reduces communication overhead. Replication Server provides a cost-effective, fault-tolerant system for replicating data.

Because it transfers transactions rather than rows, Replication Server maintains the integrity of replicated data across the system, while also increasing data availability. Replication Server also allows you to replicate stored procedure invocations, further enhancing performance.

Replication Server works to distribute data over a network by:

Because Replication Server replicates transactions—incremental changes instead of data copies—and stored procedure invocations, rather than the operations that result from execution of the stored procedures, it enables a high-performance distributed data environment while maintaining data integrity.

How Replication Server works

A Replication Server at each primary or replicate site coordinates the data replication activities for the local data servers and exchanges data with Replication Servers at other sites.

A Replication Server:

Replication Server system tables store the information needed to accomplish these tasks. The system tables include descriptions of the replicated data and replication objects, such as replication definitions and subscriptions, security records for Replication Server users, routing information for other sites, access methods for local databases, and other administrative information.

Replication Server system tables are stored in a database called the Replication Server System Database (RSSD).

You use Replication Command Language (RCL) or the Replication Server Manager (RSM) component of Sybase Central to manage information in Replication Server. RCL commands, which resemble SQL commands, can be executed on Replication Server using isql, the Sybase interactive SQL utility. The Replication Server Reference Manual is the complete reference for RCL. You can find information about Replication Server Manager in the Replication Server Administration Guide and in Replication Server online help.

Publish-and-subscribe model

Transactions that occur in a primary database are detected by a Replication Agent and transferred to the local Replication Server, which distributes the information across a network to Replication Servers at destination sites. These Replication Servers in turn update the replicate database according to the requirements of the remote client.

The primary data is the source of the data that Replication Server replicates in other databases. You publish data at primary sites, to which Replication Servers at other (replicate) sites subscribe. You first create a replication definition to designate the location of the primary data. The replication definition describes the structure of the table and names the database that contains the primary copy of the table. For easier management, you can collect replication definitions into publications.

Creating a replication definition or publication does not, by itself, cause Replication Server to replicate data. You must also create a subscription against the replication definition (or the publication) to instruct Replication Server to replicate the data in another database. A subscription resembles a SQL select statement. It can include a where clause to specify which rows of a table you want to replicate in the local database, allowing you to replicate only the necessary data.

You can have multiple replication definitions for a primary table. Replicate tables can subscribe to different replication definitions to obtain different views of the data.

Once you have created subscriptions to replication definitions or publications, Replication Server replicates transactions to databases with subscriptions for the data.

Replicated functions

With some data servers, Replication Server lets you replicate stored procedure invocations asynchronously between databases. This can improve performance over normal data replication by encapsulating many changes in a single replicated function. Because they are not associated with table replication definitions, replicated functions can execute stored procedures that may or may not modify data directly.

NoteReplication Server does not support stored procedure replication on all types of data servers. For more information about replicating stored procedures on a particular data server, refer to the appropriate Replication Agent documentation.

You can replicate stored procedure invocations from a primary database to a replicate database, or from a replicate database to a primary database.

With replicated functions, you can execute a stored procedure in another database. A replicated function allows you to:

Replication Server supports both applied functions and request functions:

Transaction management

Replication Server depends on data servers to provide the transaction processing services needed to protect their stored data. To guarantee the integrity of distributed data, data servers must comply with such transaction-processing conventions as atomicity and consistency.

data servers that store primary data provide most of the concurrency control needed for the distributed database system. If a transaction fails to update a table with primary data, Replication Server does not distribute the transaction to other sites. When a transaction does update primary data, Replication Server distributes the changes and, unless a failure occurs, the update succeeds at all sites that have subscribed to the data.