Data Synchronization and replication in Sybase (1)

Source: Internet
Author: User
Tags sybase

Sybase replication server (sybase replication server) is used to meet the growing needs of enterprise customers/server computer environments. Since the replication server has been widely used, it has become the basis for enterprise-wide customer/server application models.

A Practical replication system must take into account the following business requirements.

High Data Reliability: The replication system makes the application system more reliable, reducing the impact of computer system failures on business processing.

Consistency of information transmission: Data Consistency is guaranteed in each node of the distribution system.

High system performance: the replication system must allow each node to optimize local data access without increasing the burden on Data Source nodes and effectively using the network.

Convenient centralized data management: the system administrator can easily manage the distribution and data of each node.

Heterogeneous Data Source Access: The replication system can transmit data between data sources provided by different vendors, such as sybase, oracle, ms SQL, and other inter-system data replication and synchronization.

Local autonomy: each node can determine what data it will accept and access and update the data of the current node.

How the replication server works

In this section, we will describe each part of the sybase replication server product and their functions. Data replication can be divided into four parts:

Monitoring of changing data transactions for one or more data sources;

Transfers transactions over the network;

Distribute transactions to various target data sources;

Copy system management.

In the sybase replication server environment, modifications to data in the source database are implemented by a process called log transfer manager (ltm. In the most typical structure, the ltm and the source database are placed on the same hardware platform.

Ltm sends logs to the replication server process. The replication server process can be on another machine. In a replication system, the configurations of several replication servers can be distributed on different LAN. According to the configuration of the replication system, logs of data are transferred from one replication server to other replication servers, at last, These replication servers send data changes to the target database. The complete data replication operation process can be managed and monitored by a gui-based replication server management interface. Because the stable queue is used in the replication system, the data from the source database to the target database can be prevented from any failure in the system. A stable queue is a security mechanism, and the fault tolerance environment fails.

Log transmission management

Part of the sybase replication server product is log transfer manager (ltm). ltm is a low-scheduling process. The most typical configuration method is to run ltm on the same platform as the source database. If the source data of more than one node is modified in the replication system, an ltm is required for each node.

The ltm task is to monitor and capture the transactions associated with the database, and send these transactions to the replication server, so that the replication server can send the transactions to other replication nodes.

Ltm connects to SQL server, reads the transaction logs of the master SQL server, and monitors whether it has changed the data of the master node. Transaction logs are the best source of information used to observe data changes on the master node, because they contain transactions that have been committed to the server and can be used to recover transactions. In, when an application modifies the master node data, the transaction is recorded in the transaction log to ensure data consistency. When committed, the data changes and is written to the disk. The replication process does not interfere with the database function, but ltm is monitoring the transactions in SQL server. When it finds that a transaction should be copied, it is transmitted to the sybase replication server.

The ltm process is an application written by sybase open server/open client and connected to the sybase replication server. This process can reside on a separate machine. It is precisely because the sybase Replication Server process can run on a machine different from the primary data source that minimizes the burden that the replication system imposes on the primary database.

The ltm process can translate transactions independent of the master data source command to the replication server. For example, if "update" is completed in a transaction, ltm will send the transaction to the replication server and give an explanation, and translate it into the update command completed by the master node. The mechanism for translating or ing commands from the source database transaction to the replication server is an important strategy of the sybase replication server technology. The interface from ltm to the replication server is visible to users. That is to say, if you can obtain the transaction of the data source, you can map it to sybase to copy the system environment and copy it. Unlike other competitors, sybase Replication allows you to create applications to replicate heterogeneous data sources.

Data transmission over LAN and wide area networks

Now let's look at what happens when the information is transmitted from the ltm to the associated replication server? If the data and replication data are on different LAN, the replication process will transfer the data from the master database replication server to the Replication Server responsible for copying the node database. Note that if the master node and the replication node are on the same LAN, the second replication server can be saved. In a single LAN replication environment, a replication server can complete two tasks: accepting ltm data and transmitting it to the replication node.

In a multi-LAN environment, routes between different sybase Replication servers can be direct without intermediate nodes. It can also be indirect. There is an intermediate transfer node between the master replication server and the slave replication server. These direct or indirect routes are configured by the system administrator, allowing the system administrator to use the entire system environment effectively according to network restrictions and application data transmission needs. In the direct and indirect configuration status, you can use the replication server management software to monitor the information transmitted on the route.

Data arrives at the replication Node

In the above two headers, we have seen how the ltm process works together with the server process, and sent the transaction from the master node database to the target node over the network. Now let's take a look at the final processing program of the replication process and how the replication server sends data to the target database.

The sybase Replication server is an application based on sybase open server/open client. In the final process of replication, the replication server establishes a connection on the target database to write the data received from the master database to the replication database. Likewise, the replication node can be a non-sybase data system.

The sybase replication server connects to the target database using standard client/server connections. And have sufficient permissions to modify the target database. Next we can see how the replication server knows what transactions are transmitted and where they are transferred. The node that contains the copied data needs to order the data from the replication system. The purchase order information is stored in the sybase replication server data dictionary. Each replication server has a data dictionary. Rssd is used to store information about the replication system.

Because the sybase Replication Server simply transmits transactions to the target data source like its customer program, it can be a non-sybase data source. You can use sybase omni-gateway to connect the replication server to a third-party data source, so that the replication server considers the replication node as sybase. Data transmitted from the replication server to the target data source does not need to be changed in any form.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.