Copyright: Microsoft Jet Database Replication Version 3.0


conflict table

A table that is generated when a synchronization conflict occurs between two replicas. The conflict table appears only in the replica whose changed record was not accepted during the reconciliation process.


database replication

The process of reproducing a database so that two or more copies (replicas) of the same database can stay synchronized. Changes to the data in a replicated table at one replica are sent and applied to the other replicas and Design Master in the replica set. Changes made to the design of the database at the Design Master are sent and applied to all replicas in the set.


default partner

A Transporter that is used to automatically synchronize a replica with other replicas in the set. When a replica is created, the Transporter managing the source replica becomes the default partner for the new replica.


default schedule

The schedule used by a Transporter to synchronize replica sets that do not have an explicitly defined schedule. The user can change the default schedule for individual replica sets.


Design Master

A database to which system tables, system fields, and replication properties have been added. A Design Master is the first member in a replica set and is used in the creation of the first replica in a replica set. You can make changes to the database structure only with the Design Master. Replicas in the same replica set can take turns being the Design Master, but there can be only one Design Master at a time in each replica set.


globally unique identifier (GUID)

A 16-byte field used to establish a unique identifier for replication. GUIDs are used extensively to identify replicas, replica sets, tables, records, and other objects.

Note   In Microsoft Access, GUIDs are referred to as Replication IDs.


local object

A table, query, form, report, macro, or module that remains in the replica or Design Master where it was created. Neither the object nor changes to the object are copied to other members in the replica set.


managed folder

The folder that contains replicas managed by the Transporter. The Transporter sends and receives data for replicas in managed folders, as well as synchronizing all replicas in the same replica set under its management. Subfolders of managed folders are not automatically managed.


managed replicas

A replica with an assigned Transporter that delivers changes to and receives changes from other replicas in the set.


Microsoft Jet database engine

A database management system that retrieves data from and stores data in user and system databases.  The Jet database engine can be thought of as a data manager component upon which other data access systems, such as Microsoft Access and Visual Basic, are built.


Microsoft Replication Manager

An application  that manages the location, synchronization schedule, and relationship of one or more replicas with the other replicas in the set. The Replication Manager manages the Transporter settings that govern replication, while the Transporter performs the actual synchronization activities. The Replication Manager is part of the Microsoft Access Developer's Toolkit.


object replication

The process of reproducing an object (table, query, report, form, macro, or module) so that two or more copies of the same object are synchronized. Changes made to the design of the object at the Design Master are sent and applied to all replicas in the set.


on-demand synchronization

The exchange of data between two replicas that occurs at the explicit request of the user.


private Transporter

A Transporter that is unavailable to other Transporters as a destination for synchronization. Private Transporters only initiate synchronization, unlike public Transporters, which both receive and send changes.


public Transporter

A Transporter that is available to any other Transporter for scheduled and on-demand synchronization and appears on the Replication Manager's map of the replica set.


replica

A copy of a database, including its tables, queries, forms, reports, macros, and modules. A replica is a member of a replica set and can be synchronized with other replicas in the set. Changes to the data in a replicated table at one replica are sent and applied to the other replicas and Design Master.


replica set

The Design Master and all replicas that share the same database design and unique replica set identifier.


replica set topology

The order in which changes are propagated from replica to replica. Topology is important because it determines how quickly changes in another replica appear in your replica.


replicable database

A database to which additional tables, fields, and properties have been added to record information about changes to data. Once a database is replicable, additional replicas can be made from it.


replicate

Produce a replica, or copy, of something — for example, a database.


replicated object

A table, query, form, report, macro, or module that is in all replicas in the replica set. Changes to the replicated object are propagated to other replicas in the replica set.


replication

The process of creating and synchronizing replicas in separate locations. Replication adds system fields and tables to a database so that changes made to the data in or design of a database are sent and applied to all the members of the replica set.


replication errors

Failures that cause replica contents to diverge across replicas.


retention period

The number of days a replica can remain unsynchronized with other replicas in the set before it's permanently dropped from the set.


schedule

The times when the Transporter will initiate synchronization with other replicas. The minimum increment of time between scheduled synchronizations is 15 minutes.


scheduled synchronization

An exchange of data between two replicas that occurs at a predetermined time.


synchronization

The process of updating a pair of replicas or a replica with a Design Master in which all updated records and objects are exchanged. The exchange of data between two replicas can be one-way or two-way and may be handled by a Transporter.


synchronization conflict

A situation in which users of two replicas have changed the same record. One of the updated records is selected as the "winner," and the other updated record is placed in a conflict table at the losing replica.


synchronization error

A problem that occurs during synchronization that prevents changes to a record from being completed successfully. This is more serious than a conflict and should be resolved as soon as possible.


Transporter

A service that monitors changes to a replica and handles the actual exchange of data between replicas. The Transporter has no user interface and operates in the background. Its status is reported on the Replication Manager's topology map of the replica set.


Create a replica of your database

You can use replication to make special copies — called replicas — of a Microsoft Access database so that users at different locations can all work on their own copies at the same time. Replication is different from making simple copies of database files because replicas can be synchronized with one another. When you replicate a database, your original database becomes the Design Master for the replica set.

Which application do you want to use to create a replica of your database?

Microsoft Access for Windows 95

Windows 95 Briefcase

If you have the Microsoft Access Developer's Toolkit, you can also use Microsoft Replication Manager to create replicas. For more information on the Microsoft Access Developer's Toolkit, click  [image]. For more information on Replication Manager, click  [image].


Using Microsoft Replication Manager

If you have the Microsoft Access Developer's Toolkit, you can use Microsoft Replication Manager to:

•	Manage a large number of replicas.

•	Support laptop users who aren't always connected to a network.

•	Easily create replicas of more than one database.

•	Set schedules for synchronizing members of the replica set.

•	Troubleshoot errors.

Replication Manager provides a visual interface for converting databases, creating replicas, viewing the relationships between members of a replica set, and setting the properties for replicas. For more information on the Microsoft Access Developer's Toolkit, click  [image].


Use Microsoft Access to create a replica

1	Open the database you want to replicate. If you are working in a multiuser environment, make sure that all other users have closed the database.

Important   Before replicating your database, you should read about the changes that are made to a database when it's replicated. To read about these changes, click  [image].

2	If your database is protected by a database password, remove the password.

How?

3	On the Tools menu, point to Replication, and then click Create Replica.

4	Click Yes when you are asked if you want to close the database.

5	Click either Yes or No when you are asked if you want to make a backup of the database (this happens only when the first replica is created).

6	In the Location Of New Replica dialog box, select the location where you want to place the new replica.

7	Click OK.


Use Briefcase to create a replica

1	Make sure that Briefcase is installed on your computer. If Briefcase is installed, you will see a My Briefcase icon on the Windows desktop.

If Briefcase isn't installed, you must do both of the following two steps:

•	Click the Windows Start button, point to Settings, click Control Panel, click Add/Remove Programs, click the Windows Setup tab, and then double-click Accessories. Then follow the instructions on the screen.

•	To install Briefcase replication, run the Microsoft Access Setup program, and click the Custom option.

2	Click the Windows Start button, point to Programs, and then click Windows Explorer.

3	If your database is protected by a database password, remove the password.

How?

4	Select the folder where the Microsoft Access for Windows 95 database file is located.

5	Drag the database file to the My Briefcase icon on the Windows desktop.

Important   Before replicating your database, you should read about the changes that are made to a database when it's replicated. To read about these changes, click  [image].


Synchronize a replica or Design Master with another member in the replica set

Synchronization is the process of updating two members of a replica set by exchanging all updated records and objects in each member. Two members are synchronized when the changes in each member have been applied to the other member.

Which application do you want to use to synchronize your replica or Design Master with another member in the replica set?

Microsoft Access for Windows 95

Windows 95 Briefcase

If you have the Microsoft Access Developer's Toolkit, you can also use Microsoft Replication Manager to create replicas. For more information on the Microsoft Access Developer's Toolkit, click  [image]. For more information on Replication Manager, click  [image].


Use Microsoft Access to synchronize a replica or Design Master with another member in the replica set

1	Open the replica or Design Master you want to synchronize.

2	On the Tools menu, point to Replication, and then click Synchronize Now.

3	Type the path and filename of the replica set member you want to synchronize with.

4	If your database is the Design Master and you want to make the replica the Design Master, select the Make 'Filename' The Design Master check box.

5	Click OK.

6	When asked if you want to close and reopen the database, click Yes. (If you click No, you won't see the updated records.)


Use Briefcase to synchronize a replica or Design Master with another member in the replica set

1	Open the Briefcase window, and then click the database file.

2	On the Briefcase menu, click Update Selection.

3	Click Update to have Briefcase merge the changes.


Recover the Design Master

1	Make sure that there is no active Design Master already in the replica set.

2	Open the replica that you want to make the new Design Master.

3	On the Tools menu, point to Replication, and then click Synchronize Now.

4	Click a replica in the list, and then click OK.

5	Repeat steps 2 through 4 as many times as necessary to synchronize with each remaining replica in the replica set.

Important   Make sure that you synchronize with all other replicas in the replica set.

6	On the Tools menu, point to Replication, and then click Recover Design Master.

7	Click Yes.


Resolve synchronization conflicts between replica set members

1	Open the database that you want to check for conflicts.

2	When Microsoft Access asks if you want to resolve conflicts, click Yes.

3	Select the table with conflicts, and then click Resolve Conflicts.

4	For each record conflict, click Copy Field, Copy All Fields, or Delete Conflict Record to resolve the conflict.


Make a replica the new Design Master

1	Open the replica that you want to make the new Design Master.

2	On the Microsoft Access Tools menu, point to Replication, and then click Synchronize Now.

3	Select the current Design Master as the member to synchronize with.

4	Select the Make 'Filename' The Design Master check box.

5	Click OK.

If you have the Microsoft Access Developer's Toolkit, you can also use Microsoft Replication Manager to create replicas. For more information on the Microsoft Access Developer's Toolkit, click  [image]. For more information on Replication Manager, click  [image].


Make your database nonreplicable

Once you've converted a database into a replicable database, you can't convert it back to its former status as a nonreplicable database. However, if you no longer want to use replication and want to decrease the size of a replicated database, you can create a new, nonreplicable database that contains all of the objects and data in your replicated database without the additional system fields, tables, and properties associated with replication.

1	Create a new database, and open it.

2	On the File menu, point to Get External Data, and then click Import.

3	Click the replica that contains the objects that you want in the nonreplicable database, and then click Import.

4	Click the objects — except tables — that you want to import into the new database.

5	Click OK to import these objects.

6	In the new database, create a query for each table in the replica that takes all the data in the old table and puts it a new table.

How?

7	For each table in the new database, create the same index used in the replica table.

How?

8	For each table in the new database, create the relationships that existed for the replica table.

How?

9	Save your new database.


Securing a replicated database

To secure a replicated database, you can set user permissions on replicated database objects. These permissions will not interfere with synchronization of the database. However, you can't use a password to protect your replicated database. A password-protected database can't be made replicable, nor can a password be assigned to a replicated database.


Remove a replica from the replica set

1	Use Windows Explorer to find the replica you want to delete.

2	Click the replica that you want to delete, and press the DELETE key.

Warning   Do not delete the Design Master for the replica set unless the Design Master is no longer functioning. Deleting the Design Master prevents you from changing the design of the database until you click Recover Design Master on the Microsoft Access Tools menu.


Suggestions when changing the design of a replicated database

•	Synchronize all replicas in the set before making design changes.

•	Check all replicas to make sure that the name you are selecting for a new field or object isn't already being used as the name of a local object.

•	Don't create relationships between replicated and nonreplicated tables.

•	Make sure that the number of bytes you add to a field or the number of fields you add to a record doesn't exceed the maximum size for a replicated database. For more information on the size limitations of a replicated database, click  [image].

•	If you use linked tables, keep in mind that linked tables aren't automatically replicated. If you create a linked table in the Design Master, it's created as a local object and remains local until you make it replicable. When you make the table replicable, the link and the table are sent to all the replicas in the set. After the table appears in each replica, you can change the link in an individual replica or in the Design Master without affecting the other members of the replica set. To refresh the link in all members of the replica set, change the replicable linked table to a local table (in the Design Master), refresh the link, and change the table back to a replicable table.


Changes made to your database when you use replication

When you replicate a database, the Microsoft Jet database engine makes a number of changes to your database.

What changes do you want to read about?

Fields that are added to each existing table in the database

New tables that are added to the database

New properties that are added to the database

Changes to the behavior of AutoNumber fields

Changes to the size of the database file


Fields that are added to your tables when you replicate a database

When you replicate a database, Microsoft Access adds the following new system fields to each table in the replicated database:

Field	Description
s_GUID	A globally unique identifier for each record.
s_Lineage	A binary field that contains information about the history of changes to each record.
s_Generation	A field that stores information regarding groups of changes.
Notes

•	Additional fields (named Gen_Fieldname) are added for every Memo or OLE Object field in a table.

•	The s_GUID, s_Lineage, and s_Generation system fields are system objects that may or may not be visible in your tables. To determine whether these fields are visible in your tables, click Options on the Tools menu, click the View tab, and then select or clear the System Objects check box.

•	You can't change the information stored in the system fields in a replicated table.


Properties that are added to your database when you replicate it

When you replicate a database, Microsoft Access adds the following new properties to the Properties collection of objects:

Property	Description
Replicable	A database or object property. When the property is set to "T", it indicates that the database or the table, query, form, report, macro, or module is now replicable. For more information about the Replicable property, click  [image].
KeepLocal	A property appended to a table, query, form, report, macro, or module. When the property is set to "T", it indicates that the object should not be replicated when the database is replicated. An object that is already replicated can't have its KeepLocal property set. For more information about the KeepLocal property, click  [image].
ReplicaID	A property that provides each member of the replica set with unique identification. This property is read-only and is stored in the MSysReplicas system table. For more information about the ReplicaID property, click  [image].
DesignMasterID	The GUID of the Design Master. This GUID is stored in the MSysRepInfo system table as SchemaMaster. For more information about the DesignMasterID property, click  [image].
Replication ConflictFunction	The function used to replace the Microsoft Access Conflict Resolver with a customized procedure that assists users in resolving synchronization conflicts. For more information about the ReplicationConflictFunction property, click  [image].


Tables that are added to your database when you replicate it

When you replicate a database, Microsoft Access adds the following new system tables to the database:

Table	Description
MSysSidetables	This table exists only if a conflict has occurred between the user's replica and another replica in the set. This table isn't replicated. It's supplied for information only, and its contents may be modified or deleted by custom conflict-resolution routines or by the user. All side tables are named xxxx_conflict, where xxxx is the original name of the table.
MSysErrors	This table identifies where and why errors occurred during data synchronization. It identifies the table involved, the record that encountered the errors, the replica or replicas where the error was detected, the replica that last changed the row, the type of operation that failed, and the reason it failed. This table is replicated and appears in all replicas.
MSysSchemaProb	This table is present only when an error has occurred while updating the design of a replica. It provides additional details about the cause of the error. This is a local table and isn't replicated.
MSysExchangeLog	This table stores information about replica synchronizations that have taken place. This is a local table and isn't replicated.
Notes

•	These tables are visible when system objects are visible. To determine whether these tables are visible, click Options on the Tools menu, click the View tab, and then select or clear the System Objects check box.

•	You can't change the information stored in the MSysErrors, MSysSchemaProb, or MSysExchangeLog system tables in a replicated database.


Changes to the behavior of AutoNumber fields when you replicate a database

When you replicate a database, any incremental AutoNumber fields in your tables change to random numbering. All existing AutoNumber fields retain their values, but new values for inserted records are random numbers. Random AutoNumber fields aren't meaningful because they aren't in any particular order and the record inserted last doesn't necessarily have the highest value.

Before you replicate a database, determine if any of your applications or users rely on the AutoNumber field's incremental numbering. If so, you can use an additional Date/Time field to provide sequential ordering information.


Additional size limitations on a replicated database

The addition of three new fields (s_GUID, s_Lineage, and s_Generation) imposes two limitations on your tables:

•	The Microsoft Jet database engine allows a maximum of 2048 bytes (not counting Memo or OLE Object fields) in a record. Replication uses a minimum of 54 bytes to store unique identifiers, indexes, and information about changes to the record. If the record contains either Memo or OLE Object fields, replication uses an additional 4 bytes for each of those fields. The total number of bytes available in a record in a replicated table can be calculated as follows:

2048 bytes
- 54 bytes for replication overhead
- (4 bytes * the number of Memo fields)
- (4 bytes * the number of OLE Object fields)
= the maximum number of bytes available

•	The Jet database engine allows a maximum of 255 fields in a table, of which at least three fields are used by replication. The total number of fields available in a replicated table can be calculated as follows:

255 fields
- 3 system fields
- the number of Memo and OLE Object fields
= the number of fields available

Few well-designed applications use all the available fields in a table or all the bytes in a record. However, if you have a large number of Memo or OLE Object fields in your table, you may run into constraints.

Note   In addition to setting limits on the available number of characters and fields, the Jet database engine also limits the number of nested transactions allowed. You can have a maximum of seven nested transactions in a nonreplicated database, but a replicated database can have a maximum of six nested transactions.

The addition of several new system tables also adds to the size of your database. Most of these new tables contain only a few records, but some of the new tables can grow significantly, depending upon the frequency of synchronization between replicas.

The size of your database file is significant for two reasons:

•	The Jet database engine supports files up to a maximum of 1 gigabyte in size, but many users have limited space available on their hard disks. A replicated database that is larger than the original database file might use up a significant portion of the available disk space.

•	If you choose to make a backup copy of the nonreplicable form of your database, you must have sufficient space on your hard disk for both the replicated database and the backup copy.


Troubleshoot replication problems

What do you want help with?

When I change data in one member of the replica set, it doesn't change in another member.

When I change the design of an object in the Design Master, it doesn't change in any of the replicas.

I can't find the Design Master.

I can't open the Design Master.

I can't make my replica the Design Master.

There are two Design Masters in the replica set.

I want to use a different program for resolving synchronization conflicts.

I don't want to use replication when I drag a database file into My Briefcase. How do I stop Briefcase replication?


Using replication with earlier versions of Microsoft Access

Previous versions of Microsoft Access can't replicate databases. Therefore, versions prior to Microsoft Access for Windows 95 (Microsoft Jet database engine version 3.0) can't use replicated databases.

Microsoft Access for Windows 95 can use databases created with earlier versions of Microsoft Access, but it can't replicate them in that form. Version 1.x and 2.0 databases must be converted to Microsoft Access for Windows 95 format before they can be replicated. Replicas can't be read by Microsoft Access versions 1.x or 2.0.

For information on converting a version 1.x or 2.0 database to Microsoft Access for Windows 95, click  [image].


I can't find the Design Master.

The Design Master may have been moved from its original location or may be corrupted. To find the new location:

1	Open a replica in the replica set.

2	On the Tools menu, point to Replication, and then click Synchronize Now.

3	Click Browse to locate other members of the replica set on your computer or network.

4	Select a member of the replica set. If the Make 'Filename' The Design Master check box appears, the member you are synchronizing with is the Design Master.


I can't open the Design Master.

The Design Master may be corrupted. Make a replica the new Design Master. For information about making a replica the new Design Master, click  [image].


I can't make my replica the Design Master.

Your replica may be in use by another operation or application and can't be opened exclusively. Wait a few minutes, and try again.

If you still can't make your replica the Design Master and haven't received another error message, your replica may be corrupted. Delete the replica and create a new one. For information about deleting a replica, click [image].


There are two Design Masters in the replica set.

Having more than one Design Master in a replica set prevents the members of the set from synchronizing correctly. If this occurs, do the following:

1	Determine which Design Master is the original and whether it should continue to be the Design Master.

2	Delete the Design Master that should not exist.

3	Delete all replicas that had their most recent synchronization with the deleted Design Master.

How?

4	Create new replicas from the remaining Design Master to replace the replica or replicas you deleted.


When I change data in one member of the replica set, it doesn't change in another member.

1	Open the replica set member you want to synchronize.

2	On the Tools menu, point to Replication, and then click Synchronize Now.

3	Type the path and filename of the replica set member that you want to synchronize with.

4	Click OK.

5	Close and reopen the database to view the updated records.

6	If your data still doesn't appear, there may have been a conflict with another member. For information on resolving conflicts, click  [image].


When I change the design of an object in the Design Master, it doesn't change in any of the replicas.

1	Open the Design Master.

2	On the Microsoft Access View menu, click Properties.

3	On the General tab, select the Replicated check box, and then click OK.

4	On the Tools menu, point to Replication, and then click Synchronize Now.


I want to use a different program for resolving synchronization conflicts.

1	Open the Design Master for the replica set.

2	On the File menu, click Database Properties.

3	Click the Custom tab.

4	In the Name box, type ReplicationConflictFunction.

5	In the Type box, click Text.

6	In the Value box, type the name of the custom function followed by ( ). For example, if the name of the custom function is MyResolver, type MyResolver( ).

For more information about the ReplicationConflictFunction property, click  [image].


I don't want to use replication when I drag a database file into My Briefcase. How do I stop Briefcase replication?

Briefcase replicates any Microsoft Access for Windows 95 file that has an .mdb extension when you drag that file into the Briefcase. If you don't want to replicate the database file, change the .mdb extension to another extension.


Convert a database

The database file you selected isn't a replicable Microsoft Access database. To make a replica of your database, it must first be converted to a Design Master. Converting your database increases the size of your file because new, hidden system fields and tables are added to your database. For information on these system fields, click [image]. For information on these system tables, click [image].

Before you convert your database, remove the database password. Setting user permissions to access the database doesn't interfere with synchronization.

For more information on Briefcase replication for databases, click [image].


Make a backup copy

The backup copy is to be used only in emergency cases. Any replica created from the backup copy of the database will not be able to synchronize with the existing members in the replica set.


Designate the Design Master

If you want to be able to change the design of your Microsoft Access database while working on the Briefcase copy of the database, make the Briefcase copy the Design Master. It is important to remember, however, that no one will be able to make changes to the design of the replica remaining on the desktop.


Synchronize Now

In the list box, select the replica set member with which you want to synchronize. The default filename that appears in the list box is either the replica set member from which the member was created or the last member of the replica set with which you synchronized. If the member you want to synchronize with isn't listed, click Browse to view additional files on your computer, or type the path and filename of the member. You can synchronize only with another member in the same replica set.

The Make 'Filename' The Design Master check box appears only if the replica set member you have open is the Design Master or if you are synchronizing with the Design Master. If you want to make the replica the new Design Master and make the current Design Master a replica, select this check box. If you do not want to change the Design Master, leave the check box unselected.


What is Briefcase Replication?