Previous Page

Implementing Database Replication

You can implement database replication by using:

 Microsoft Access menu commands.

 Briefcase replication in Windows 95.

 Microsoft Replication Manager.

 Data Access Objects (DAO) programming.

The first three replication tools provide an easy-to-use visual interface. You can use DAO to build replication directly into your application's code.

Note   If some users of your database need to continue using it in its original form, make a copy of your database before you implement database replication.

Replication Menu Commands

Microsoft Access provides replication menu commands that you can use while working in your databases. By using the Replication command on the Tools menu, you can:

 Create a replica.

 Synchronize your replica with another member of the replica set.

 Resolve synchronization conflicts by using the Conflict Resolver.

 Recover the replica set's Design Master, if necessary.

One of the easiest ways to become familiar with the concepts and procedures associated with database replication is to experiment with the Microsoft Access replication commands. To convert a database to a Design Master and create a replica, open the existing database, click the Tools menu, point to Replication, and then click Create Replica. You can then explore the changes made to the design of your database and the similarities between the replica and the Design Master. Next, make a change to the data in the replica and a change to a table design in the Design Master, and then click Synchronize Now (Tools menu, Replication submenu). You can then open the replica and the Design Master to confirm that the changes appear in the other member of the replica set.

See Also   For more information on the changes that are made to the design of your database when you convert it to a Design Master, see "Changes to Your Database" later in this chapter.

Briefcase Replication

Microsoft Windows 95 Briefcase replication is a convenient way to implement replication on a laptop computer. To use Briefcase replication, drag the Microsoft Access database (.mdb) file from a shared folder on the corporate network to the My Briefcase icon on your laptop computer's desktop. This converts the database to a Design Master and creates a replica in your Briefcase. You can disconnect your laptop from the network and make changes to the data in the replica. When you are finished working on the files on the laptop computer, reconnect to the corporate network. You can then synchronize the changes between the replica on your laptop and the Design Master on the network by double-clicking the My Briefcase icon and clicking Update All on the Briefcase menu.

During the conversion process, Briefcase gives you the opportunity to make a backup copy of the original database file. The backup copy has the same file name as the original, except that it has a .bak file name extension instead of an .mdb file name extension. It is kept in the same folder as the original database file. Save the backup copy and use it only in the event that you can't use a replica to re-create the replica set.

See Also   For more information on re-creating a replica set, see "Using Replicas Instead of Backups" later in this chapter.

Replication Manager

Replication Manager provides a visual interface for converting databases, making additional replicas, viewing the relationships between replicas, and setting the properties of replicas. Replication Manager is provided in Microsoft Office 97, Developer Edition. You can use Replication Manager to:

 Manage a large number of replicas.

 Synchronize data over the Internet or an internal Web (intranet).

 Support laptop users who aren't always connected to a network. Laptop users can specify a network file location where synchronization information is deposited for later processing.

 Create replicas of more than one database.

 Set schedules for synchronizing replicas. You can schedule synchronizations ahead of time so that they can occur unattended at anticipated times. You can also synchronize replicas at any time with a single menu command.

 Configure synchronizations to send data, receive data, or send and receive data.

 Access additional tools for troubleshooting.

See Also   For more information on Replication Manager, search the Help index for "Replication Manager."

Replication with DAO

The DAO programming interface provides methods and properties that you can use to implement several Briefcase replication features in your Visual Basic code. You can use DAO to:

 Convert a database to a Design Master.

 Create and populate additional replicas.

 Create and populate partial replicas.

 Synchronize replicas.

 Get and set specific properties of a replicated database.

 Resolve conflicts and errors.

Although DAO requires programming, it gives you the ability to customize your replication system. Generally, you use DAO under the following circumstances:

 When you need to synchronize replicas when certain events occur. For example, you may want to trigger synchronization whenever a replica receives updated product pricing information from headquarters. You can use DAO to provide event-based replication.

 When you need to distribute your replicated database to users who have minimal computer expertise. In this case, you can use DAO to design a simplified replication interface or to make replication completely transparent to users.

 When you need to create a replica that contains only part of the data, you can create a partial replica. For example, you may want to create a replica that only contains a subset of a large amount of data to minimize the disk space you use and to maximize performance.

Note   If you use DAO to convert your database to a Design Master and then create an additional replica, be sure to open the Design Master first and synchronize the replicas before you open the second replica.

© 1996 Microsoft Corporation. All rights reserved.

Next Page


Casa de Bender