Using the Replication Progress and Log Viewers

Using the Replication Progress and Log Viewers
A Brief Look at the Replication Progress and Log Viewers
Pervasive DataExchange allows you to configure replication sessions, initiate replication, monitor it, and log it. The tools with which you perform these actions are the Replication Progress and Log Viewers. Their window is accessed from Pervasive Control Center (PCC).
This chapter covers the following topics:
*
*
*
 
Checking the Replication Engine and Service
*
1
From Pervasive Control Center (PCC), right-click the Replication - Connected node and select View Engine and Service State.
2
The Engine and Service State dialog box, similar to the following, displays:
The information displayed in this dialog is informational only and cannot be edited.
*
1
If the database has been activated, the following dialog appears:
All of the fields on the dialog are ready-only.
The types of states include the following:
*
DNA. This indicates that the database is the replication system database: Database Network Analysis (DNA). This database has a data source name like PD00000x and is created when you install Pervasive DataExchange.
Caution Do not delete this database. Pervasive DataExchange will not function if you do.
*
Pure. This indicates that the database does not contain replication control tables. That is, the database has not been activated nor is it a template.
*
Template. This indicates that the database is a replication template.
2
Click Close when you’re done.
Initiating Replication from the Progress and Log Viewers
You can manually initiate a replication session. The Initiate Replication dialog box lets you select a database to replicate, the type of replication, and the sites to include. This section covers the following topics:
*
*
Initiating a Replication Session
*
1
In PCC, right-click the Replication - Connected node in Pervasive PSQL Explorer, then do one of the following:
*
Select Initiate Replication.
*
Select Statistics and Log Views to open the Replication Progress and Log Viewers and then in the toolbar, click the Initiate replication icon .
The Initiate Replication dialog appears.
2
Select the Source Database you want from the Source Database drop-down list.
3
a.
This option replicates data between the source database and the selected sites. This is the default and causes the Replication Engine to replicate the data among the machines specified, resolving any data conflicts. Either the default conflict handling is used (most recent change wins) or an event handler callback DLL is used if you specified one at activation time.
b.
This option deletes and replaces all data on the selected sites with data from the source database. This deletes all data on the sites you check mark in the list of sites to replicate with. The data from the source database replaces the data. The source database can be used to delete/replace data on one or more sites. Conflict resolution is not performed.
c.
This option deletes and replaces all data on the local site (the source database) with data from the selected site. This deletes all data in the source database and replaces it with the data from the selected site. You can designate only one selected site (a one-to-one situation). Conflict resolution is not performed.
4
5
Click Replicate.
Note The list of sites to replicate with may seem inconsistent depending on how you activated your Partner Sites.
Reading the Initiate Replication Dialog Box
The list of sites to replicate with may seem inconsistent depending on how you activated your Partner Sites.
Here's an example of how the list may appear inconsistent. You create Partner Site PS1 and perform an initial replication with the First Site (the default behavior). You create Partner Site PS2 but do not perform an initial replication with the First Site.
In the Initiate Replication dialog, if you select as the source database the First Site or PS1, neither shows PS2 as a site to replicate with. This may lead you to question, "what became of my second Partner Site? Why isn't PS2 in the list?"
It is not in the list because the information about the replication network, such as the sites on it, is also replicated. If you select PS2 as the source database, the choice First Replication Site shows as a site to replicate with. After you replicate with the First Site, then PS2 appears in the list for the First Site and PS1.
The easiest way to ensure consistency in the list is to perform an initial replication with the First Site when you activate each Partner Site. A Partner Site cannot replicate with other sites until it replicates with the First Site.
Recording and Monitoring Replication Activity
This section covers the following topics:
*
*
Setting Log Options
*
1
In PCC, right-click Replication - Connected and select Statistics and Log Views.
2
A drop-down menu displays log commands and settings.
3
DRE Log File
The Replication Engine records its operation in the file DRE.log. You can use this log file to monitor replication activities.
Where appropriate, the messages in the DRE.log include the user-supplied names for the database, replication project, replication network, and replication release. The local database is referred to by its data source name (DSN). Remote sites are referred to by their display name and a site number. Remote sites typically have the same database name as the local site.
Each site in every replication network is numbered, beginning at 1,000,000 for the First Site, and incrementing by one for each site thereafter. These numbers appear as base 36 numbers. The DRE log is the only log that uses the base 36 site numbers.
The type of message in DRE.log is indicated by a letter in the first column of the message, as follows:
*
*
*
*
The following table describes each available Logging Level option and provides a sample log entry for that option.
 
Errors are indicated by an E in the first column:
Warnings are indicated by a W in the first column:
This option applies only to Debug. (The Debug option must also be checked.) Verbose outputs the source program name and the line number within the program. For example, the following example shows that program drelutil is creating an update list record at line 306 of the source code.
Tip Typically, use Verbose only for troubleshooting and not as a general setting for DRE.log.
Some of the programs listed in verbose mode may not exist as a separate file on physical storage. Verbose mode shows the programs that are part of a compiled executable or dynamic link library.
For instructions on setting logging options, refer to Checking the Replication Engine and Service.