Synchronizer

For database replication to be useful, it is not enough that there just be multiple replicas of the same database. The replicas must communicate with one another in order to remain synchronized. As mentioned earlier, synchronization is the act or process of making the replicas identical, both in terms of the data they contain and how they are designed; changes made to the existing records in one replica are communicated to each of the other replicas that have that same record. Similarly, records added to or deleted from one member of the replica set are communicated to each of the other members of the set.

If you use Briefcase or Microsoft Access to synchronize your replicas, Microsoft Jet handles the direct exchange of information between members.

If you use Replication Manager, a separate utility called the Synchronizer (formerly known as the Transporter) monitors the changes to a replica and handles the actual exchange of data between replicas.

Note Although you can have more than one Synchronizer assigned to the same replica, this approach is not recommended because it can cause undesirable side effects.

The Synchronizer performs either direct or indirect synchronizations between two members of a replica set. Direct synchronization occurs when the two members can be opened simultaneously by either the Synchronizer or the Briefcase reconciler. If both members are on the same computer or are available over a common network, the Synchronizer can apply the changes to one member directly to the other member. Indirect synchronization occurs when the target replica set member is not in a shared folder, the other computer is temporarily disconnected from the network, the network itself is down, or there is another situation that prevents a direct connection.

When the Synchronizer is instructed to initiate a synchronization, it first attempts a direct connection with the target member of the replica set. If it can’t establish a direct connection, the Synchronizer for the source replica leaves a message for the Synchronizer of the target replica in a dropbox folder on the network. The shared folder serves as a dropbox location for the target replica and stores all the messages sent by all other Synchronizers in the replica set while the target member is unavailable.

Direct synchronizations on a local area network (LAN) are usually processed faster than indirect synchronizations because direct synchronizations allow the first Synchronizer to bypass the second Synchronizer completely. In indirect synchronizations, the return message to the first Synchronizer might take a few minutes, hours, or days, depending upon how often the second member connects to the network. Indirect synchronization over a WAN or dial-up connection can be significantly faster than a direct synchronization. When you are using a WAN topology, you can force indirect synchronization by making sure your replicas are not in a shared folder that would permit a direct synchronization. For more information about synchronizing over WANs, see the “Synchronizing Data in Wide Area Networks” section later in this chapter.

Because a replica set member’s availability can change over time, the Synchronizer might complete a direct synchronization one time and an indirect synchronization the next time. To determine whether a synchronization was direct or indirect, click Synchronization History on the View menu in Replication Manager and then click the Details button in the resulting dialog box, or look at the exchange details in the MSysExchangeLog system table.

Note The Synchronizer can run only on a computer that is running either Windows 95 or Windows NT Server or Workstation 3.51 or later. If a member of the replica set is stored on a non-Windows-based server, such as a Novell network, the Synchronizer must be located on a different computer.

You configure the Synchronizer through the Replication Manager user interface. When Replication Manager is first configured on a computer running Windows 95 or Windows NT Server or Workstation 3.51 or later, you are asked for the network folders to be used by the Synchronizer and whether the Synchronizer should be started automatically each time the computer is started. If you select automatic startup, a shortcut to the Synchronizer program is placed in the Windows 95 Start menu or the Windows NT Startup group. To change the Synchronizer startup to manual mode, you should move the Synchronizer icon to the Microsoft Access folder or program group. The file names for the Synchronizer are MSTran35.exe and MSTrani35.exe (used when synchronizing over the Internet or an intranet).

See Also For information about restarting the Synchronizer if it stops, see the Microsoft Replication Manager Help file.

The status of the Synchronizer is reported through the Replication Manager user interface. In the status bar in the Replication Manager window, there is an image of two computers with a connection. The connection between the computers changes as the status of the Synchronizer changes. A legend explains the status of the Synchronizer.

Note You cannot schedule synchronization over the Internet or an intranet by using Replication Manager because Replication Manager can’t control the communication link to your Internet service provider. To work around this problem, you can write VBA code to link to your Internet service provider, execute synchronization, and then drop the communications link.