Академический Документы
Профессиональный Документы
Культура Документы
User’s Guide
Guide to Using Pervasive DataExchange
All other company and product names are the trademarks or registered trademarks of their
respective companies.
© Copyright 2008 Pervasive Software Inc. All rights reserved. Reproduction, photocopying, or
transmittal of this publication, or portions of this publication, is prohibited without the express prior
written consent of the publisher.
User’s Guide
July 2008
100-004177-005
Contents
Contents
About This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Who Should Read This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
Manual Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Pervasive DataExchange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Real-Time Backup Edition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Data Synchronization Edition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
DataExchange Tools and Utilities. . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Supplemental Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii
Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Pervasive DataExchange
1 Introducing Pervasive DataExchange . . . . . . . . . . . . . . . . 1-1
Understanding Pervasive DataExchange and Its Capabilities
DataExchange Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
DataExchange Editions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Real-Time Backup Edition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Data Synchronization Edition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
DataExchange Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
DataExchange Utilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
DataExchange Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
iii
Contents
Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Activation and Data Source Names . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Activating First and Partner Sites . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Deactivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
Reactivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
Adding Tables to an Activated Database . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
Before you Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
Determine Event Handler DLL Usage . . . . . . . . . . . . . . . . . . . . . . . . 3-8
Deactivate All Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
Verify the Table Exists in the Pervasive Database. . . . . . . . . . . . . . . . . . 3-9
Add the New Table to the Replication Template . . . . . . . . . . . . . . . . . . 3-10
Stop Replication Service on Partner Sites . . . . . . . . . . . . . . . . . . . . . . 3-11
Copy Files (DDFs, D- and PDC Tables) . . . . . . . . . . . . . . . . . . . . . . . 3-11
Activate First Site and Synchronize Tables . . . . . . . . . . . . . . . . . . . . . 3-12
Start Replication Service on Partner Sites . . . . . . . . . . . . . . . . . . . . . . 3-13
Activate Partner Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13
Initiate Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14
Removing Tables From an Activated Database . . . . . . . . . . . . . . . . . . . . . . 3-15
Before you Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
Deactivate all Sites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
Remove Table From the Replication Template . . . . . . . . . . . . . . . . . . . 3-16
Stop Replication Service on Partner Sites . . . . . . . . . . . . . . . . . . . . . . 3-17
Copy D*.mkd Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17
Start Replication Service on Partner Sites . . . . . . . . . . . . . . . . . . . . . . 3-18
Activate all Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18
Initiate Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19
Adding Dynamic Tables to an Activated Database . . . . . . . . . . . . . . . . . . . . 3-20
Before you Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-21
Include File Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-21
Exclude File Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22
Setting up Nondatabase File Replication . . . . . . . . . . . . . . . . . . . . . . . . . . 3-24
Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-24
Set Log On Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25
Create New Flat File Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25
Execute the SQL Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26
Create the Design Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-27
Copy Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-28
Activate all Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-28
Restart DX Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-29
Redesign Dxevent Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-29
Create Site Shares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-30
Configure Flat File Replication. . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-30
Changing a Table Structure in an Activated Database . . . . . . . . . . . . . . . . . . 3-32
Before you Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-32
Clone PDC Table(s). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33
iv
Contents
v
Contents
vi
Contents
vii
Contents
Supplemental Information
A Basic Troubleshooting. . . . . . . . . . . . . . . . . . . . . . . . . A-1
How to Identify and Solve Common Problems
Troubleshooting Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2
Troubleshooting Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-4
Multiple DataExchange Designers . . . . . . . . . . . . . . . . . . . . . . . . . . A-4
Terminal Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-4
Uninstalling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-5
Network Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-6
How to Start PSA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-6
Documentation for PSA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-6
Database Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-7
Replication Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-8
Log Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-9
Log File Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-9
Log File Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-10
viii
Contents
E Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-1
Replication Terminology
Accelerated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-1
Activated Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-1
Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-1
Change Capture / Change Apply . . . . . . . . . . . . . . . . . . . . . . . . . . . E-1
Control Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-1
ix
Contents
x
Figures
xi
Figures
xii
Tables
xiii
xiv
About This Manual
xv
About This Manual
xvi
Manual Organization
Manual Organization
This manual is divided into the following parts.
xvii
About This Manual
xviii
Conventions
Conventions
Unless otherwise noted, command syntax, code, and examples use
the following conventions:
< > Angle brackets enclose multiple choices for a required item, as
in /D=<5|6|7>.
variable Words appearing in italics are variables that you must replace
with appropriate values, as in file name.
::= The symbol ::= means one item is defined in terms of another.
For example, a::=b means the item a is defined in terms of b.
xix
About This Manual
xx
P ERVASIVE D ATA E XCHANGE
chapter
Introducing Pervasive
DataExchange 1
Understanding Pervasive DataExchange and Its Capabilities
1-1
Introducing Pervasive DataExchange
DataExchange Overview
Pervasive DataExchange reliably moves data between two or more
Pervasive PSQL databases to maintain warm backup systems, drive
data into reporting servers, or synchronize multiple remote
databases.
The DataExchange technology works by capturing and sharing
changes from one Pervasive PSQL database to other databases in a
DataExchange replication network. The Pervasive PSQL Engine is
augmented with DataExchange, which adds two software
components to a Pervasive PSQL database, the Replication Event
Handler and the Replication Engine.
The Replication Event Handler (REH) plugs directly into the
Pervasive PSQL database engine. Specifically, the REH is a set of
DLLs that operate within the database engine, so if the database
is running, the replication event handler is running as well. The
database engine activates the REH when there is a change event
(insert, update, delete). The REH then makes note of the event
in one of its private control tables.
The Replication Engine is a separate process that performs the
actual replication task. It reads the control tables to determine
what records have changed since the last replication session. It
then groups these changes into packets and shares them with the
other replication engines participating in a DataExchange
network. These other engines then apply the updates to their
own databases. The replication process occurs either
continuously, at scheduled intervals, or on demand. The
replication engine does not require constant network
connectivity, so DataExchange is suitable for scenarios with
intermittent connectivity, like remote users with dialup
connections.
Pervasive DataExchange focuses on the two types of data replication:
Providing continuous access to data (Real-Time Backup)
Synchronizing multiple databases (Data Synchronization)
While both capabilities are useful, one typically surfaces as the
primary driver for implementing data replication technology in a
specific environment.
1-2
DataExchange Editions
DataExchange Editions
Pervasive DataExchange is available in two editions—Real-Time
Backup and Data Synchronization.
1-3
Introducing Pervasive DataExchange
DataExchange Components
Pervasive DataExchange consists of the following primary
components:
Replication Engine - used for distributing and applying captured
database changes
Replication Event Handler (REH) - used for recording or
monitoring database change events
DataExchange Agent - used to provide notification in the event
of a replication failure
DataExchange Utilities - used to perform the tasks necessary for
replication, such as design and activation
DataExchange Documentation - provides conceptual and
instructional information for using Pervasive DataExchange
1-4
DataExchange Components
User’s Guide
The Pervasive DataExchange User’s Guide includes both conceptual
and procedural information related to design, activation, and
replication. This manual is intended to help you understand the
tools and processes used in the replication process.
Pervasive DataExchange User’s Guide includes information
applicable to both the Real-Time Backup Edition and the Data
Synchronization Edition. It includes reference-based information
and task-based instructions that show step-by-step procedures on
using the Pervasive DataExchange products.
1-5
Introducing Pervasive DataExchange
1-6
chapter
Pervasive DataExchange
Basics 2
An Overview of DataExchange Basics
This chapter explains the core concepts and routine tasks of using
Pervasive DataExchange. Information on working with the engine,
logins and DSNs related to Pervasive DataExchange is included. This
chapter is divided into the following sections:
“Starting and Stopping Replication” on page 2-2
“Starting and Stopping the DXAgent Service” on page 2-5
“ODBC Basic Concepts” on page 2-7
“Pervasive PSQL Security” on page 2-9
2-1
Pervasive DataExchange Basics
2-2
Starting and Stopping Replication
2-3
Pervasive DataExchange Basics
2-4
Starting and Stopping the DXAgent Service
2-5
Pervasive DataExchange Basics
2-6
ODBC Basic Concepts
Servers and Every Pervasive PSQL server engine or workgroup engine includes a
Clients client installation. So you can use your server machine to connect to
other servers as a client.
Pervasive PSQL clients can connect to remote machines where a
Pervasive PSQL server engine is installed.
Data Source In a client-server architecture, each data set must have a well-known
Names name. A DSN is a well-known name for a data set. There are
generally three ways to create DSNs:
Create an Engine DSN from the server console. Workgroup
engines require only Engine DSNs.
Create an Engine DSN remotely from a client machine.
Create a Client DSN on each client machine.
2-7
Pervasive DataExchange Basics
2-8
Pervasive PSQL Security
2-9
Pervasive DataExchange Basics
Table 2-1 Actions Required to Deploy Demodata Under Database Security or Mixed Security
Replication Database Security Model Mixed Security Model
Site
First Add the Demodata directory (for Add the Demodata directory (for
example, <drive>:\Documents and example, <drive>:\Documents
Settings\All Users\Application and Settings\All Users\Application
Data\Pervasive Data\Pervasive
Software\PSQL\Demodata) to the data Software\PSQL\Demodata) to the
file locations for DefaultDB. data file locations for DefaultDB.
Add the templates directory (for Add the templates directory (for
example, <Installation Directory example, <Installation Directory
>\Replication\Templates to the data file >\Replication\Templates to the
locations for DefaultDB. data file locations for DefaultDB.
Partner Add the Demodata directory (for Add the Demodata directory (for
example, C:\Demodata) to the data file example, C:\Demodata) to the
locations for DefaultDB. data file locations for DefaultDB.
2-10
chapter
Using Pervasive
DataExchange 3
A Guide to Using DataExchange in Daily Operations
3-1
Using Pervasive DataExchange
Activation
Activation is the process of creating a new database for replication, or
enabling an existing one, and establishing the database as belonging
to a site within a replication network so that it can replicate.
3-2
Activation
Activating First The First Site is unique and must be activated before you activate any
and Partner of the Partner Sites. When activating the First Site, Pervasive
Sites DataExchange populates its system tables with information needed
to manage the distributed environment. This information is
subsequently replicated to all other sites in the network as they are
activated.
The First Site is special because it contains information about the
replication network and is the only site where DataExchange
Designer is installed. Once the First Site is activated, you may
activate your Partner Sites in any order.
After activation of the First Site is complete, you can activate the
databases at the Partner Sites. Activate Partner Sites from each site
itself. That is, you execute the Deployment Tool, dxdeploy.exe or
dxact.exe on the Partner Site, not on the First Site.
If possible, the machine should have a network connection through
which it can communicate with the First Site so that the initial
replication session can start immediately. This is not mandatory,
however. You can perform the initial replication at a later time if you
prefer. A Partner Site cannot replicate with other Partner Sites until
it performs an initial replication with the First Site.
Once you’ve successfully performed activation, Pervasive Control
Center displays the database as activated, wit the Replication node
icon showing an A.
Once the initial replication has succeeded, the newly installed site is
fully aware of all administrative data in that workgroup, including all
replication schedules.
3-3
Using Pervasive DataExchange
The /FI option specifies you are activating the First Site, but you
should always run dxact.exe from the site you want to activate—
remote activations are not available in DataExchange. For the
complete list of dxact.exe options available, see “dxact” on page 7-6.
Now that we’ve covered the basics of activation, let’s take a moment
to discuss deactivation and reactivation.
3-4
Deactivation
Deactivation
Deactivation is the disabling of an activated database in a replication
network. Deactivation uses the dxdeact utility as explained in
Chapter 7, “Using the DataExchange Utilities and Services.”
If you deactivate a database on the First Site, Pervasive Control
Center displays the First Site database as a design template, since it
was used to design the database for the replication network. When
the First Site is deactivated, the Replication node icon displays a T.
After the failed replication, the error no longer occurs because all
sites in the replication network have detected the deactivated site.
3-5
Using Pervasive DataExchange
3-6
Adding Tables to an Activated Database
Before you You must make certain that the replication schedule associated with
Begin the replication design you are changing is currently disabled and that
no users are working on the system.
One of the steps you must complete is to deactivate the database, and
it is always a good practice to disable any replication schedules before
deactivation.
The following lists the high level steps needed to successfully add a
table to an already activated database. Each of these high level steps
includes detailed instructions required to complete that phase. The
high level steps are as follows:
Determine Event Handler DLL Usage
Deactivate All Sites
Verify the Table Exists in the Pervasive Database
Add the New Table to the Replication Template
Stop Replication Service on Partner Sites
Copy Files (DDFs, D- and PDC Tables)
Activate First Site and Synchronize Tables
Start Replication Service on Partner Sites
Activate Partner Sites
Initiate Replication
3-7
Using Pervasive DataExchange
Determine First you need to know if an Event Handler DLL is used in your
Event Handler activated database. Knowing this determines whether you need to
DLL Usage use the /DL=<string> option when using dxact.exe.
Deactivate All Before you change your replication design to include the new table,
Sites you must first deactivate all sites.
3-8
Adding Tables to an Activated Database
Verify the Table Before you can add a table to a DataExchange replication database,
Exists in the you must first make sure the table you are adding has been added to
Pervasive the Pervasive PSQL database. The physical file must be present in the
Database data directory of the database. Also, the table must have data
dictionary files (DDFs) defined for it. (If you can see the table in the
PCC list of tables then it has DDFs defined.)
3-9
Using Pervasive DataExchange
Add the New The original replication template has to be redesigned to include the
Table to the newly added table.
Replication
Template ³ To add the new table to the replication template
1 On the First Site, start DataExchange Designer (for example,
open Pervasive Control Center and click DataExchange
Designer).
Designer opens, listing all the templates available to modify.
2 In the list, click the database name that you deactivated in
section “Deactivate All Sites,” then click Finish.
This opens Designer, which lists all the tables being replicated in
the current design.
3-10
Adding Tables to an Activated Database
Tip If you are adding multiple tables, select all the tables you
want to add.
6 Click the Replicated tab and verify the table was added.
7 Click File Save to save the changes.
8 From the menu bar select Tools Create Replication
Template. A dialog displays asking you if you want to Prepare
Database data for replication to other sites.
Stop Because you need to copy files, including ones used for replication,
Replication from the First Site to the each Partner Site, you need to stop the
Service on replication service on the Partner Sites.
Partner Sites Follow the steps listed in “To stop the Replication service,” on page
2-2 or, if using PCC, in “To stop the Replication service,” on page 2-
4.
Copy Files To make certain the correct data is available to the replication
(DDFs, D- and network, you’ll need to identify the files that you will later need to
PDC Tables) synchronize.
3-11
Using Pervasive DataExchange
³ To identify files
1 On the First Site, find where the replication-specific files are
stored and sort the files by date.
For example, locate the files Dtblchg.mkd and Dcnf.mkd, which
are replication-specific files.
Notice, after sorting the files by date, that a number of D*.mkd
tables have been updated, and a new PDC table has been created
for the new table you just added.
2 Select the following set of files:
The D*.mkd files that have been updated based on your
creating DDFs for the new table, or that have been updated
since the time you used Designer to add a new table to the
replication template.
The PDC for the data table you just added
(PDCdatafilename).
The updated DDFs for the replication database (such as
FILE.DDF, FIELD.DDF, and INDEX.DDF).
Note Not all D-tables may have been updated. Copy only the D-
tables that were updated.
Activate First Now that you have copied the new table and the replication-related
Site and files to the Partner Sites, you need to active the First Site and
Synchronize synchronize the files.
Tables
³ To activate the first site and synchronize data
1 Activate the First Site using dxact.exe.
3-12
Adding Tables to an Activated Database
If you are adding multiple tables, repeat this command for each
new table.
Start Now that you have copied files from the First Site to the each Partner
Replication Site, you can start the replication service on the Partner Sites.
Service on Follow the steps listed in “To start the Replication service,” on page
Partner Sites 2-2 or, if using PCC, in “To start the Replication service,” on page 2-
3.
Activate After the First Site is activated and the files synchronized, you can
Partner Sites activate the Partner Sites.
1 Activate each Partner Site using dxact.exe and the
/PA[RTNERADDRESS]=<string> option, to designate the site with
which you will replicate.
Tip The string represents the address of the machine with which
you are going to replicate. If your Partner Site replicates with the
First Site, you will enter the machine address for the First Site.
For example, if the First Site’s address is SiteA, you would enter
a command similar to the following:
3-13
Using Pervasive DataExchange
Initiate You now need to initiate replication to ensure that the new table is
Replication recognized throughout the replication network. Refer to the steps in
“To replicate data from First Site to Partner Site” on page 4-14.
After a successful replication to all Partner Sites, you can resume
your replication schedules and allow your users to return working
on the system.
3-14
Removing Tables From an Activated Database
Before you This section discusses the steps required in order to remove a table
Begin to a database that is already activated. The high level steps included
in this process are as follows:
Deactivate all Sites
Remove Table From the Replication Template
Stop Replication Service on Partner Sites
Copy D*.mkd Tables
Start Replication Service on Partner Sites
Activate all Sites
Initiate Replication
Make sure that the replication schedules are disabled and that no
users are working on the system. The process of removing a table
includes deactivating the replication database, and it is always a good
practice to disable any replication schedules before deactivation. In
addition, no user should be using the system during this process
because any modification to the database will not be captured while
databases are deactivated.
Deactivate all Removing a table from an activated database uses the DataExchange
Sites Designer to remove the table from the replication design. To do this,
you must first deactivate all sites.
3-15
Using Pervasive DataExchange
Tip If you do not see the deactivated database with the T icon in
PCC, check the dxdeact.log to verify that the database was
properly deactivated.
This opens Designer, which lists all the tables being replicated in
the current design.
3 In the Database Design pane, click the Replicated tab , then click
the table(s) that you want to remove.
4 Click Actions Don’t Replicate Table from the menu bar, or
right-click and select Don't Replicate Table. Do this for each
table you want to drop, if there is more than one.
3-16
Removing Tables From an Activated Database
5 Click the Not Replicated tab in the Database Design pane and
verify the tables that you just removed are listed here.
6 Click File Save to save the changes.
7 From the menu bar select Tools Create Replication
Template. A dialog displays asking you if you want to Prepare
Database data for replication to other sites.
Stop Because you need to copy files used for replication from the First Site
Replication to the each Partner Site, you need to stop the replication service on
Service on the Partner Sites.
Partner Sites Follow the steps listed in “To stop the Replication service,” on page
2-2 or, if using PCC, in “To stop the Replication service,” on page 2-
4.
3-17
Using Pervasive DataExchange
2 Select the D*.mkd files that have been updated based on your
redesigning the replication template.
Note Not all D-tables may have been updated. Copy only the D-
tables that were updated.
3 Copy and paste these tables into each of the Partner Sites
replication data directories overwriting the files there with these
new files.
Start Now that you have copied files from the First Site to each Partner
Replication Site, you can start the replication service on the Partner Sites.
Service on Follow the steps listed in “To start the Replication service,” on page
Partner Sites 2-2 or, if using PCC, in “To start the Replication service,” on page 2-
3.
3-18
Removing Tables From an Activated Database
Initiate You now need to initiate replication to ensure that the removed table
Replication is no longer replicated. Refer to the steps in “To replicate data from
First Site to Partner Site” on page 4-14.
After a successful replication to all Partner Sites, you can resume
your replication schedules and allow your users to return working
on the system.
3-19
Using Pervasive DataExchange
3-20
Adding Dynamic Tables to an Activated Database
Before you If you’re unfamiliar with expressions or have had little exposure to
Begin working with them, we strongly recommend you first review “Types
of Expressions” on page 7-18 to gain a basic understanding of how
to work with the different types of expressions.
3-21
Using Pervasive DataExchange
A message should display that lists the name and version of the
dynamic table configuration and test utility, and additional
information such as the following:
INCLUDE pattern is "dir attend*.mkd"
Exclude File Now let’s fine tune our pattern expressions for our example
Patterns database. We’ve included all of the attend*.mkd files, but there is a
cumulative file (attendall.mkd) that gets created too. Since we have
all the individual files that are included in the cumulative one, we
don’t really need that file replicated. So, we’ll exclude it from our
pattern matching.
A message should display that lists the name and version of the
dynamic table configuration and test utility, and additional
information such as the following:
3-22
Adding Dynamic Tables to an Activated Database
3-23
Using Pervasive DataExchange
Before You You should ensure the following items before beginning this
Begin procedure:
You must have administrative rights and DOMAIN
administrative rights on the computers to be configured.
Before performing this process, ensure that no replication
sessions are running and disable any replication schedules.
High level steps include the following:
Set Log On Properties
Create New Flat File Database
Execute the SQL Queries
3-24
Setting up Nondatabase File Replication
Create New Flat Next, you’ll need to create a database to store the replication file
File Database information.
3-25
Using Pervasive DataExchange
SET TRUEBITCREATE = ON #
create table dxEvent (dxEventType char(30) not null,
Command char(128) not null, Wait bit, NeedArgs bit, Ignore
bit) #
create index dxEventTypeIdx on dxEvent(dxEventType) #
insert into dxEvent values ('OnReplicationRequest',
'Example: put command and args here', 0, 0, 1) #
insert into dxEvent values ('PreSessionStart', 'Example:
put command and args here', 0, 0, 1) #
insert into dxEvent values ('PostSessionStart', 'Example:
put command and args here', 0, 0, 1) #
3-26
Setting up Nondatabase File Replication
3-27
Using Pervasive DataExchange
Copy Files Now we need to copy the database that we just designed over to the
Partner Site.
³ To copy files
1 Copy the FlatFileRepl directory to the Partner Site.
2 Once you copy the files to the Partner Site, open PCC on the
Partner Site, and expand the tree to show the machine that you
are on.
3 Create a database here just like we did on the First Site. (See
“Create New Flat File Database,” on page 3-25.)
3 Back on the First Site open the Statistics and Log View window,
and you should see the replication session running between the
two sites.
4 After the two databases have finished replicating, you will need
to close all the windows associated with PCC and close PCC
itself.
3-28
Setting up Nondatabase File Replication
Redesign At this point the databases are activated and running. We now need
Dxevent Table to go into each of the tables that we designed previously and supply
the info to replicate the flat files.
Note You may need to scroll to the right to see that the Ignore
column is set to True so that these do not actually run.
3-29
Using Pervasive DataExchange
The row you enter should look similar to the following in the
Data Manager:
4 Tab through the rest of the columns, do not check any of the
boxes, and close the Pervasive PSQL Data Manager.
Tip To replicate all files in the directory use * not *.* You can
use wild cards, or ?, or supply the exact file names. See the
ffcopy.txt file located in <Installation Directory
>\replication\docs.
3-30
Setting up Nondatabase File Replication
3-31
Using Pervasive DataExchange
Before you It is strongly recommended that you ensure the following items
Begin before beginning this procedure:
Make sure that the replication schedules are currently disabled
and that no users are working on the system. This procedure
includes deactivating the database, and it is always a good
practice to disable any replication schedules before deactivation.
It is critical that the system keys for records in each of the user
tables are accounted for in the user table's corresponding PDC
table. This is the mechanism that replication uses to track which
records need to be sent to the other sites in the network. If there
ever becomes a disconnect between the user and PDC table it
can prevent replication from doing its job.
When you add or remove columns from the table at the First
Site, make certain you remember to make the same changes to
the table on the Partner Site so that the DDFs will reflect the
same structure for the tables.
The procedures in this document assume that all sites in the
replication network were synchronized prior to new schema
changes.
The high level steps needed to complete this procedure are as
follows:
Clone PDC Table(s)
Copy Files and Activate the Partner Site
3-32
Changing a Table Structure in an Activated Database
Clone PDC Although it is not required that a blank copy of the PDC table be
Table(s) used, doing so will:
Reduce the overall size of the PDC table because it will only
contain the new records, thus reducing transmission time to the
other sites.
Speed up the dxsynctables process because dxsynctables will not
have to verify preexisting records in the PDC table.
Activate the 1 Activate the First Site using the dxact.exe command.
First Site and DXACT /FI <Database_DSN>
Synch Tables
For example, if you wanted to active the DEMODATA sample
database, the command is DXACT /FI DEMODATA.
2 For each modified table, run this command from a command
prompt:
DXSYNCTABLES <TableName> <DSN>
3-33
Using Pervasive DataExchange
Note This process may take some time to run, depending on the
number of records contained in the user table. Tests indicate
that in cases where there are several million records or more,
disabling L2 caching can reduce the population times and speed
up this process significantly. Make sure to reenable L2 after the
user is finished with all the tables.
3-34
R EAL -T IME B ACKUP E DITION
chapter
Real-Time Backup
Deployment Models 4
A Look at Alternative Deployment Models for Real-Time Backup
4-1
Real-Time Backup Deployment Models
4-2
Real-Time Backup Configurations
In this scenario, you have one server, Server A, networked with your
backup server. The server runs its own database, dbA. DataExchange
then maintains a copy of the database on the standby backup server
and replicates with the server at the backup location when changes
are applied.
See “Replication Deployment using the Deployment Tool” on page
4-5 for information on starting the DataExchange Deployment
Wizard.
Refer to Chapter 4, “Replication Deployment,”in your Getting
Started with Pervasive DataExchange Real-Time Backup Edition
manual for instructions on implementing Real-Time Backup on a
two machine configuration using DXDeploy.
See “Replication Deployment Using Designer” on page 4-7 for
instructions on implementing Real-Time Backup on a two machine
configuration using Designer and the DataExchange utilities.
4-3
Real-Time Backup Deployment Models
4-4
Replication Deployment using the Deployment Tool
Before You Get Before you start the DataExchange Deployment Tool, we
Started recommend that you review the following deployment attributes. It
is a good idea to make note of these items for the database you are
deploying, as they are needed to complete the Deployment Tool
wizard.
Project Name – this corresponds to a specific database. If your
goal is to replicate a database named mydatabase, then you may
want to call the project mydatabase project or something similar.
Network Name – this refers to the name you have chosen to
represent the grouping of replication sites that participate in
replication.
Release Name – this is similar to a version number for the design
of the replication database.
DSN – this specifies the data source name (DSN) to be
associated with the data files deployed for replication. The DSN
must be unique on each site.
Directories and file names of data – this specifies the directories
and data files to be included in the replication.
For detailed information about these attributes, see “XML Attributes
in Deployment Descriptor File” on page 4-15 in Getting Started with
Pervasive DataExchange.
4-5
Real-Time Backup Deployment Models
4-6
Replication Deployment Using Designer
Before You Get Before performing this task you must install Pervasive
Started DataExchange on a First Site and a Partner Site as explained in
Getting Started with Pervasive DataExchange.
We strongly recommend that you shut down all applications using
the database you are about to deploy before using this deployment
method.
Tip So that you can restore your database to its original state
after this deployment exercise, we recommend saving a copy of
your database files before proceeding with this example.
4-7
Real-Time Backup Deployment Models
3 For this example, enter Demodata in the Location field and click
Next.
The wizard asks you to identify the replication project, network,
and release. These names are of your own choosing to help keep
track of what you need to replicate.
4 For this example, enter the following:
Project: DX_Test
Network: Test
Release: 1.0
Project and network names are limited to 20 characters, and the
release name must be 8 characters or less.
5 Click Next.
The wizard provides a summary of your input for the replication
project.
6 Click Finish.
A message informs you that DataExchange Designer is creating
the replication system tables. After the replication system tables
are created, DataExchange Designer opens.
DataExchange Designer lists the ten tables in the Demodata
sample database on the Not Replicated tab,
4-8
Replication Deployment Using Designer
7 Select all of the tables by pressing the Shift key and, while
holding it down, click the last table in the list.
4-9
Real-Time Backup Deployment Models
All of the tables move from the Not Replicated tab to the
Replicated tab. The view on the right shows the information for
the selected table on the Replicated tab.
4-10
Replication Deployment Using Designer
4-11
Real-Time Backup Deployment Models
4-12
Replication Deployment Using Designer
Now that the First and Partner Site databases are activated, you
are ready to replicate data between them. Before you initiate
replication, you may want to perform a sample database change
so you can later verify the changes were replicated.
4-13
Real-Time Backup Deployment Models
4-14
Replication Deployment Using Designer
4-15
Real-Time Backup Deployment Models
Note that the source database is Demodata on your First Site and
also the database to replicate with on your Partner Site.
3 Click Replicate.
The replication process begins. The Replication Progress Viewer
reports the operation.
4-16
Replication Deployment Using Designer
4-17
Real-Time Backup Deployment Models
Three servers, A, B, and C, each has its own network. Each server
runs its own database, dbA, dbB, and dbC, respectively. You want to
implement a solution in which a replicated copy of each database is
maintained on one backup machine.
Given this scenario, the most reasonable choice for the First Site is
the backup location. Why? Part of the reason is that a replication
network can have only one First Site. In addition, the backup
location meets the following criteria:
Contains network connectivity to the Partner Site(s).
Provides the physical storage for the entire set of data.
Lends itself as the location from which the least amount of file
copying is required. Replication design requires that some files
are copied to the Partner Site(s).
4-18
Many-to-One Deployment using DXDeploy
The following image shows the same configuration after you install
DataExchange. Note that the Partner Sites are the sources of the data
and the First Site is the backup location.
Before You Get Before performing this task you must install Pervasive
Started DataExchange on a First Site and a Partner Site as explained in
Getting Started with Pervasive DataExchange.
Tip So that you can restore your databases to their original state
after this exercise, we recommend saving a copy of the
Demodata database files before proceeding with this example.
4-19
Real-Time Backup Deployment Models
Project Yes
Network Yes
Release No
4-20
Many-to-One Deployment using DXDeploy
First Site DSN Yes The DSN must also be unique for the
backup (first) site.
4-21
Real-Time Backup Deployment Models
4-22
Many-to-One Deployment using DXDeploy
13 Press Enter.
14 On ServerA, open a command prompt and type the following:
DXDeploy /Site=Partner C:\ServerA.xml
4-23
Real-Time Backup Deployment Models
Disaster Recovery
This section explains how to recover from the failure of one
replication site. The information assumes that the disaster occurs to
your primary site, requiring that you temporarily switch production
to your backup site. After a primary site is again provided, you then
need to reestablish the primary site/backup site replication network.
A disaster could, of course, occur to the backup site. The
information still applies; just substitute backup for primary. For ease
of discussion, and to remain consistent with terminology commonly
used to discuss disaster recovery, this section refers to primary site
and backup site. Think of them as the First Site and Partner Site,
respectively.
The information in this section applies only to a real-time backup
situation or to a 1-way situation. See the chapter “Deployment
Process” in Getting Started with Pervasive DataExchange Real-Time
Backup Edition for an explanation of real-time backup deployment.
See “DataExchange Implementation Options” on page 5-3 for an
explanation of 1-way deployment.
Failover In the event of a disaster, you must switch your users to access the
backup site. Use whatever methods are in place at your company to
accomplish switching to a different server. Such methods are many
and varied and beyond the scope of this document.
Since the backup site contains current data, your application(s)
should continue to function as before.
Once your users are accessing the backup site, reestablish your First
Site. Two disaster scenarios exist pertaining to the data on the
primary site:
The primary site is catastrophically destroyed and no data can be
recovered from it.
The primary is brought back into service and its data is still
available, but no longer current.
4-24
Disaster Recovery
4-25
Real-Time Backup Deployment Models
See “dxact” on page 7-6. Note that the activation on the backup
site performs an initial replication with the primary site. An
initial replication is a full replication, in which all data is
synchronized between the two machines.
The primary site and backup site now contain the same data.
10 Recreate any replication schedules from the primary site to the
backup site.
See “Schedule Tasks” on page 9-18.
11 Switch your users to access the primary site and bring your
application(s) back online.
DWSTS.MKD
4-26
Disaster Recovery
You must ensure that the database is not being accessed until
you get the primary and backup sites synchronized.
3 Delete all replication schedules on the primary site.
See “Schedule Tasks” on page 9-18.
4 Deactivate the replication database on both the primary and the
backup sites.
See “dxdeact” on page 7-11.
5 Activate the replication database on the primary site.
See “dxact” on page 7-6.
6 Activate the replication database on the backup site.
See “dxact” on page 7-6. Note that the activation on the backup
site performs an initial replication with the primary site. An
initial replication is a full replication, in which all data is
synchronized between the two machines.
The primary site and backup site now contain the same data.
7 Recreate any replication schedules from the primary site to the
backup site.
See “Schedule Tasks” on page 9-18.
8 Bring your application(s) back online.
4-27
Real-Time Backup Deployment Models
4-28
D ATA S YNCHRONIZATION
E DITION
chapter
Data Synchronization
Deployment Models 5
A Look at Deployment Models Available for Data Synchronization
5-1
Data Synchronization Deployment Models
5-2
DataExchange Implementation Options
1-Way
2-Way
5-3
Data Synchronization Deployment Models
data; you cannot use the template file as-is and successfully replicate
your data. See “dxdeploy” on page 7-13 for more information on the
XML descriptor templates included in this release and how they are
used with DXDeploy.
Designer
The Designer provides a graphical interface for designing your
replication template. This interface allows you to easily select tables
for replication.
DXact
Activating the design templates at both the First and Partner Sites is
handled by DXact. DXact is a command-line utility included with
DataExchange.
5-4
DataExchange Implementation Options
Where To Go By now, you should have a good idea as to the deployment method
From Here and implementation option that is right for you. The sections that
follow provide step-by-step instructions for each of the deployment
methods and implementation options currently available.
The next table lists each deployment method and implementation
option described in this chapter and lists where to find specific
instructions for implementing each specific scenario.
5-5
Data Synchronization Deployment Models
Tip When working with the examples in this chapter, you should
always make a copy of your database before performing the
steps, so that you can restore the original database when you are
done. In addition, you do not need to retain the example
deployed database when you are finished. After each
deployment, you will need to perform the steps associated with
your deployment method to remove the replication files and
templates and restore your database. The following examples
explain how to remove an already deployed database from the
First Site and the Partner Site.
5-6
Working with the Examples
5-7
Data Synchronization Deployment Models
5-8
Working with the Examples
5-9
Data Synchronization Deployment Models
5-10
Replication Deployment Using the Deployment Tool
Before You Get Before you start the DataExchange Deployment Tool, we
Started recommend that you review the following deployment attributes. It
is a good idea to make note of these items for the database you are
deploying, as they are needed to complete the Deployment Tool
wizard.
Project Name – this corresponds to a specific database. If your
goal is to replicate a database named mydatabase, then you may
want to call the project mydatabase project or something similar.
Network Name – this refers to the name you have chosen to
represent the grouping of replication sites that participate in
replication.
Release Name – this is similar to a version number for the design
of the replication database.
DSN – this specifies the data source name (DSN) to be
associated with the data files deployed for replication. The DSN
must be unique on each site.
Directories and file names of data – this specifies the directories
and data files to be included in the replication.
For detailed information about these attributes, see “XML Attributes
in Deployment Descriptor File” on page 4-15 in Getting Started with
Pervasive DataExchange.
5-11
Data Synchronization Deployment Models
Note This section covers only deployment and does not discuss
setting up a replication schedule.
Before You Get Before performing this task you must install Pervasive
Started DataExchange on First Site and a Partner Site as explained in Getting
Started with Pervasive DataExchange.
Tip So that you can restore your database to its original state
after this deployment exercise, we recommend saving a copy of
your database files before proceeding with this example.
5-12
1-Way Deployment Using DXDeploy
Note The <!-- and --> tags indicate comments and are ignored
by DXDeploy. The comments included in the template files are
intended as informational and may be edited or deleted.
<!--
The express deployment requires knowing the following:
- the names or IP addresses of the two database servers
- the root path of the source data
- the directories and file names of the source data
- the root path to which the data should be replicated
-->
<Sites>
<First ServerName="this.hostname"
DSN="DXDatabase" DataDirectory="C:\MYDATA">
<!--
In <Files>, enter paths of data files.
5-13
Data Synchronization Deployment Models
<Files>
<Include Path="*.mkd" />
<Include Path="*.btr" />
<Include Path="*.dat" />
<!--
We recommend replicating DDFs. See the User's Guide for
more info.
-->
<Partner ServerName="remote.hostname"
DSN="DXDatabase" DataDirectory="C:\MYDATA" />
</Sites>
</Configuration>
</DXDeployment>
Caution You must edit the XML Descriptor file to include the
required information in order for DXDeploy to successfully
replicate your data.
5-14
1-Way Deployment Using DXDeploy
Configuration Project
You will first enter the information needed by DXDeploy to
configure your replication project. This information includes
your replication project name, network and release.
In your newly created EXP_1WAY.XML file, find the following:
<Configuration Project="DXProj" Network="DXNet"
Release="1.0" Method="1-way">
5-15
Data Synchronization Deployment Models
5-16
1-Way Deployment Using DXDeploy
2 In the DSN entry, specify the Data Source Name (DSN) that you
want DXDeploy to associate with your replication database.
For example, if the database you are replicating contains all the
data for the sales department, you might enter a DSN named
SalesDB. Using this example, change DXDatabase to SalesDB.
The line would now read:
<First ServerName="SiteA" DSN="SalesDB"
DataDirectory="C:\MYDATA">
Files
Now you need to specify the tables in your database that you
want to include and exclude from your replication design. In
simplest terms, you specify the data you want to replicate and
the data you don’t want to replicate. See “Replicated Tables” on
page 8-7 for conceptual information about selecting tables for
replication.
The Include Path entries listed here are not all required; they
simply illustrate the file formats accepted by DXDeploy. The
template includes the following examples:
<Include Path="*.mkd" />
5-17
Data Synchronization Deployment Models
1 First, eliminate any references to file types that are not applicable
for your database.
Because the Sales database that we are using was created in
Pervasive Control Center using the Create Database wizard, the
data files have the .mkd or .ddf file extensions. For this example,
delete <Include Path="*.dat" /> and <Include Path="*.btr" />
references. (These entries are shown next with strikethrough
applied.)
<Files>
<Include Path="*.mkd" />
<Include Path="*.btr" />
<Include Path="*.dat" />
5-18
1-Way Deployment Using DXDeploy
5-19
Data Synchronization Deployment Models
5-20
1-Way Deployment Using DXDeploy
2 In the DSN entry, specify the Data Source Name (DSN) that you
are associating with your replication database.
For this example, change DSN="DXDatabase" to
DSN="SalesDB". The line would now read:
<Partner ServerName="SiteB" DSN="SalesDB"
DataDirectory="C:\MYDATA" />
3 Specify the absolute path to the root directory of the data files on
the Partner Site.
For our example, in the line for Partner Servername, change
DataDirectory="C:\MYDATA" to
DataDirectory="C:\CompanyData\SalesData".
The line should read something similar to the following:
<Partner ServerName="SiteB" DSN="SalesDB"
DataDirectory="C:CompanyData\SalesData" />
4 Make sure to save your file once all the changes are made.
5-21
Data Synchronization Deployment Models
Note Note that the example used here contains data files in both
relative and absolute locations. When copying your files, you
must include absolute paths to data residing outside the
DataDirectory location you specified. For information on where
to copy your files, see “File Copying” on page 4-18 in Getting
Started with Pervasive DataExchange.
5-22
1-Way Deployment Using DXDeploy
Tip For steps to remove the deployed database you just created,
see “Working with the Examples” on page 5-6 and “Removing
Databases Deployed with DXDeploy” on page 5-6.
5-23
Data Synchronization Deployment Models
Before You Get Before performing this task you must install Pervasive
Started DataExchange on a First Site and a Partner Site as explained in
Getting Started with Pervasive DataExchange.
We strongly recommend that you shut down all applications using
the database you are about to deploy before using this deployment
method.
Tip So that you can restore your database to its original state
after this deployment exercise, we recommend saving a copy of
your database files before proceeding with this example.
5-24
1-Way Deployment Using Designer
5-25
Data Synchronization Deployment Models
7 Select all of the tables. Press the Shift key and, while holding it
down, click the last table in the list.
5-26
1-Way Deployment Using Designer
All of the tables move from the Not Replicated tab to the
Replicated tab. The view on the right shows the information for
the selected table on the Replicated tab.
5-27
Data Synchronization Deployment Models
Next, you will copy all of the files from the Demodb folder to
your Partner Site.
Copy First Site ³ To copy the First Site files to the Partner Site
Files to the 1 From the First Site, copy all of the files from the folder
Partner Site PVSW\Replication\Demodb to the same folder on the Partner
Site.
2 Answer Yes to confirm file replacement.
5-28
1-Way Deployment Using Designer
5-29
Data Synchronization Deployment Models
Now that your First Site and Partner Site databases are activated,
you are ready to replicate data between them.
5-30
1-Way Deployment Using Designer
5-31
Data Synchronization Deployment Models
5-32
1-Way Deployment Using Designer
Tip For steps to remove the deployed database you just created,
see “Working with the Examples” on page 5-6 and “Removing
Databases Deployed with Designer” on page 5-8.
5-33
Data Synchronization Deployment Models
Before You Get Before performing this task you must install Pervasive
Started DataExchange on a First Site and a Partner Site as explained in
Getting Started with Pervasive DataExchange.
Tip So that you can restore your database to its original state
after this deployment exercise, we recommend saving a copy of
your database files before proceeding with this example.
5-34
2-Way Deployment Using DXDeploy
Note The <!-- and --> tags indicate comments and are ignored
by DXDeploy. The comments included in the template files are
intended as informational and may be edited or deleted.
<!--
Change Method to "2-way" for 2-way Data Synchronization
deployments.
-->
<!--
In <Sites>, enter hostnames or IP addresses of First and
Partner sites. Do not enter "localhost". Specify
DataDirectory presently containing data files on
First Site, and DataDirectory to contain data files
on Partner Site.
-->
<Sites>
5-35
Data Synchronization Deployment Models
<!--
In <Files>, enter paths of data files.
Both Include and Exclude paths have the following
properties:
Relative paths are relative to DataDirectory given in
<Sites>.
Absolute paths must all start with the same drive letter,
which must be the same drive letter as in DataDirectory.
Absolute paths cannot be used if sites are located on the
same server.
Paths can specify files (not directories) individually
or by wildcard.
Paths are not recursive (subdirectories are not
included.)
Subdirectories for include and exclude are supported.
Examples below.
-->
<Files>
<Include Path="*.mkd" />
<Include Path="MoreData\dataFile.dat" />
<Exclude Path="DontNeed.dat" />
<Include Path="C:\OtherDir\*" />
<Exclude Path="C:\OtherDir\Temp*" />
<!--
DDF changes can be replicated, but will not become
automatically effective in the schema of partner
database.
-->
5-36
2-Way Deployment Using DXDeploy
-->
</Sites>
</Configuration>
<!--
Optionally, remove actions to be omitted. An empty
<Actions> section will only validate this deployment
descriptor. Actions can only be removed from the end
of the list (e.g. remove Activate, or remove Activate
and Design.)
-->
<Actions>
<CreateDSN />
<Design />
<Activate />
</Actions>
</DXDeployment>
Caution You must edit the XML Descriptor file to include the
required information in order for DXDeploy to successfully
replicate your data.
Configuration Project
You will first enter the information needed by DXDeploy to
configure your replication project. This information includes
your replication project name, network and release.
5-37
Data Synchronization Deployment Models
5-38
2-Way Deployment Using DXDeploy
2 In the DSN entry, specify the Data Source Name (DSN) that you
want DXDeploy to associate with your replication database.
Since our example uses the Tracker database, you might enter a
DSN named TrackerDB. Using this example, change
DXDatabase to TrackerDB. The line would now read:
5-39
Data Synchronization Deployment Models
Files
Now you need to specify the tables in your database that you
want to include and exclude from your replication design. In
simplest terms, you specify the data you want to replicate and
the data you don’t want to replicate. See “Replicated Tables” on
page 8-7 for conceptual information about selecting tables for
replication.
The Include and Exclude Path entries listed here are not all
required; they simply illustrate examples of how Include and
Exclude Path statements can be structured. The template
includes the following examples:
<Include Path="*.mkd" />
1 First, include the .mkd files for the database. By using the
wildcard (*) character, you can include all of the .mkd files in the
DataDirectory path using one statement.
5-40
2-Way Deployment Using DXDeploy
2 Specify the path and file names for any files you want to include
or exclude that are located in a subdirectory of the Data
Dictionary path you specified.
For example, say you have a subdirectory called
C:\PVSW\Replication\Demodb\Misc, which contains
misc_file1.dat, misc_file2.dat, and misc_file3.dat. You want to
include all of these files except misc_file3.dat. You would change
<Include Path="MoreData\dataFile.dat" /> to <Include
Path="Misc\*.dat" />. Then you would change <Exclude
Path="DontNeed.dat" /> to <Exclude
Path="Misc\misc_file3.dat" />. The entry would look
something like this:
<Include Path="*.mkd" />
<Include Path="Misc\*.dat" />
<Include Path="Misc\misc_file3.dat" />
5-41
Data Synchronization Deployment Models
For our example, we’ll say that there is one file at this location
that you want to exclude from the replication design; this file is
C:\Archive\History.dat. You would change <Include
Path="C:\OtherDir\*" /> to <Include Path="C:\Archive\*.dat" /
>. Then you would change <Exclude
Path="C:\OtherDir\Temp*" /> to <Exclude
Path="C:\Archive\History.dat" />. Now, the files section should
look similar to the following:
<Files>
<Include Path="*.mkd" />
<Include Path="Misc\*.dat" />
<Include Path="Misc\misc_file3.dat" />
<Include Path="C:\Archive\*.dat" />
3 Specify the path to the data dictionary files that you want to
replicate.
Because TRACKER has data dictionary files (DDFs), retain the
<Include Path="*.ddf" /> line. Typically, you want to replicate
your DDFs to maintain a backup version of them. Note that the
DSN created by DXDeploy does not use TRACKER’s DDFs.
DXDeploy creates its own DDFs for specific use by replication.
The completed Files section now looks something like this:
<Files>
<Include Path="*.mkd" />
<Include Path="Misc\*.dat" />
<Include Path="Misc\misc_file3.dat" />
<Include Path="C:\Archive\*.dat" />
5-42
2-Way Deployment Using DXDeploy
<Partner ServerName="remote.hostname"
DSN="DXDatabase" DataDirectory="C:\MYDATA" />
2 In the DSN entry, specify the Data Source Name (DSN) that you
are associating with your replication database.
For this example, change DSN="DXDatabase" to
DSN="TrackerDB". The line would now read:
<Partner ServerName="SiteB" DSN="TrackerDB"
DataDirectory="C:\MYDATA" />
3 Specify the absolute path to the root directory of the data files on
the Partner Site.
For our example, in the line for Partner Servername, change
DataDirectory="C:\MYDATA" to
DataDirectory="C:\PVSW\Replication\Demodb".
The line should read something similar to the following:
<Partner ServerName="SiteB" DSN="TrackerDB"
DataDirectory="C:\PVSW\Replication\Demodb" />
Actions
Optionally, you can specify actions for DXDeploy to initiate or omit
by removing one or more of the Action statements. It is important to
note that you can only remove these statements from the bottom up.
In other words, you cannot remove <Design /> without removing
<Activate /> or DXDeploy will not run successfully.
<CreateDSN />
<Design />
<Activate />
5-43
Data Synchronization Deployment Models
Note If you remove all of the Action statements, all actions will
be performed.
</Actions>
5-44
2-Way Deployment Using DXDeploy
5-45
Data Synchronization Deployment Models
Tip For steps to remove the deployed database you just created,
see “Working with the Examples” on page 5-6 and “Removing
Databases Deployed with DXDeploy” on page 5-6.
5-46
2-Way Deployment Using Designer
Before You Get Before performing this task you must install Pervasive
Started DataExchange on a First Site and a Partner Site as explained in
Getting Started with Pervasive DataExchange.
We strongly recommend that you shut down all applications using
the database you are about to deploy before using this deployment
method.
Tip So that you can restore your database to its original state
after this deployment exercise, we recommend saving a copy of
your database files before proceeding with this example.
5-47
Data Synchronization Deployment Models
5-48
2-Way Deployment Using Designer
7 Select all of the tables. Press the Shift key and, while holding it
down, click the last table in the list.
5-49
Data Synchronization Deployment Models
All of the tables move from the Not Replicated tab to the
Replicated tab. The view on the right shows the information for
the selected table on the Replicated tab.
5-50
2-Way Deployment Using Designer
Next, you will copy all of the files from the Demodb folder to
your Partner Site.
Copy First Site ³ To copy the First Site files to the Partner Site
Files to the 1 From the First Site, copy all of the files from the folder
Partner Site PVSW\Replication\Demodb to the same folder on your Partner
Site.
2 Answer Yes to confirm file replacement.
See “dxact” on page 7-6 for more information about the Dxact
utility.
The activation process is complete when the command prompt
reappears. You now need to activate Tracker on the Partner Site.
5-51
Data Synchronization Deployment Models
5-52
2-Way Deployment Using Designer
Now that your First Site and Partner Site databases are activated,
you are ready to replicate data between them.
5-53
Data Synchronization Deployment Models
5-54
2-Way Deployment Using Designer
5-55
Data Synchronization Deployment Models
Note If you make changes from both the Partner and First Sites,
each database is replicated to reflect all changes at both sites.
5-56
2-Way Deployment Using Designer
Tip For steps to remove the deployed database you just created,
see “Working with the Examples” on page 5-6 and “Removing
Databases Deployed with Designer” on page 5-8.
5-57
Data Synchronization Deployment Models
5-58
chapter
1
Example Database Design for Data Synchronization
2
Data Synchronization Design Considerations
Region Table
Employee Table
Customer Table
3
Example Database Design for Data Synchronization
SlsRepID ** Long Integer Index to the employee who works with the company
Purchase Table
CustID ** Long Integer Index to the name of the customer who ordered
EmpID ** Long Integer Index to the employee who took the order
4
Data Synchronization Design Considerations
Product Table
5
Example Database Design for Data Synchronization
Database First you select a database to use for your replication design. You
Selection may choose to open an existing database, or you can create a new
database for this purpose. The next figure shows the Database
Information dialog where the database name is entered and the
DataExchange Method is selected, using Data Synchronization.
DataExchange Method
If you select a new database for replication, you must select the
DataExchange Method to use when you enter the database
information. In selecting an existing database, the DataExchange
Method is already determined by the method previously used for the
selected database.
The method you select depends on your database and your business
requirements. The choices are 1-way and 2-way.
6
Basic Data Synchronization Design
The next figure shows the Database Information dialog where the
database name is entered and the DataExchange Method is selected,
using Data Synchronization.
Database When creating a new database for replication, you must designate
Identification specific identifiers for the Project, Network, and Release names
associated with your replication design.
Project
A project represents a single replicated database. The replication
Project Name is of your own choosing and helps you identify and
keep track of what you need to replicate. You can use a simple-to-
understand name that helps you remember which database is
involved.
If your goal is to replicate with a database named mydatabase, then
you may want to call the project mydatabase project or something
similar that helps you remember which database is involved.
A Project name must be 20 characters or less.
A project can be associated with more than one replication network.
That is, you could create a design for mydatabase project, finance
department network, 1.0 and mydatabase project, accounting group
network, 1.0.
7
Example Database Design for Data Synchronization
Network
A replication network is the grouping of replication sites that will
participate in the replication. The name for the replication network
is of your own choosing and helps you identify and keep track of
what you need to replicate. A name that helps you remember the
grouping is very useful. For example, you could name a grouping of
sites in the finance department finance network.
The Network name must be 20 characters or less.
Release
The release is like a version number for the design of the replication
database. Your first design could be version 1, for instance. If you
choose to change the design later, then you would create a version 2
and so forth.
The Release name must be 8 characters or less.
The name for the replication release is of your own choosing and
helps you identify and keep track of what you need to replicate.
The Project, Network, and Release names are added to the database
network analyst (DNA), which is the system database used by the
Replication Engine. The replication utilities use these names from
the DNA database to allow or disallow certain actions. For example,
databases that differ only by release are allowed to replicate together.
Replicated When you first start the DataExchange Designer, the database tables
Tables are listed in the left pane on the Not Replicated tab. Initially, none of
the database tables are flagged for replication; all of the tables are
marked as Not Replicated.
8
Basic Data Synchronization Design
To begin your design, you decide which tables to use for replication
and mark these tables accordingly.
This completes the tasks required for a basic replication design. The
next sections discuss Security and the Sample Tracker Database.
9
Example Database Design for Data Synchronization
Security
Pervasive DataExchange automatically encrypts all data transmitted
between two sites. The Replication Engine controls the encryption
for you.
For information on Pervasive PSQL Security, see What's New in
Pervasive PSQL included with your Pervasive PSQL database engine.
10
Sample Tracker Database
11
Example Database Design for Data Synchronization
7 Click OK.
SQL Editor displays the SQL statements in Tracker.sql.
8 Select SQL Execute All SQL Statements.
The statements create the Tracker database tables and populate
them with data.
9 After all SQL statements have run, close SQL Editor.
10 Right-click Databases and select Refresh to redisplay the list of
databases, including their tables.
12
D ATA E XCHANGE T OOLS AND
U TILITIES
chapter
7-1
Using the DataExchange Utilities and Services
Replication The next table lists the Pervasive DataExchange utilities and services
Stages and the and the four primary replication stages in which each is used.
Utilities Used Detailed information on the Pervasive DataExchange utilities and
services is included in the sections that follow.
7-2
Utilities and Services Overview
Accessing the Some of the DataExchange utilities can be accessed from a single
Utilities control point, Pervasive Control Center (PCC) or the Start menu.
Many tools contain only a command-line interface and must be
accessed from a command prompt. Services are available from the
Windows Control Panel. The following information outlines the
various ways to access the Pervasive DataExchange utilities, services
and shortcuts.
7-3
Using the DataExchange Utilities and Services
7-4
Command-line Utilities
Command-line Utilities
This section provides information about the command-line utilities
included in Pervasive DataExchange. The following table lists the
Pervasive DataExchange command-line utilities, along with a brief
description of the utility. The section following this table details each
individual utility and includes a list of the options available for each
utility.
7-5
Using the DataExchange Utilities and Services
Description
This program activates an enabled database by registering it with the
local replication runtime environment.
If the Replication Engine is running and control tables have been
populated, the first replication with the initial Partner Site will be
performed automatically. Once this first replication has succeeded,
the newly activated database will be fully aware of all administrative
data in that network, including all replication schedules.
Syntax
DXACT [options] <DSN>
Argument Description
Options
Option Description
[default=MyFirstSite]
[default=<null>]
7-6
Command-line Utilities
Option Description
I = informational messages
W = warning messages
E = error messages
[default=iwe]
[default=<Installation Directory
>\Replication\LogFiles\DXACT.log]
[default=5]
[default=0]
[default=79]
<name>=<value>[;<name>=<value>...]
[default=<null>]
[default=PDUSER]
[default=<null>]
7-7
Using the DataExchange Utilities and Services
Option Description
[default=<LocalHost>]
[default=<Installation Directory
>\bin\repllicense.pnl]
[default=COMPLETE]
Note: The default installation directory varies depending on the version of your
operating system.
Examples
Running the following example from a command prompt on a First
Site activates a DSN named Demodata on a First Site machine.
7-8
Command-line Utilities
The next example, if run from a Partner Site, would activate a DSN
named Demodata on a Partner Site machine replicating with a
machine named XPServer.
DXACT /PARTNERNETADDR=XPServer Demodata
This example activates the DSN named Demodata on the First Site
machine and sets the Dxact logging to the console.
DXACT /FIRSTSITE /LOGFILE= Demodata
Description
This program sets or shows the control table cleanup schedules for
an activated database.
Syntax
DXCLEANUP [options] <Operation> <DSN>
Argument Description
7-9
Using the DataExchange Utilities and Services
Options
Option Description
[default=7]
[default=ADMIN]
[default=password]
I = informational messages
W = warning messages
E = error messages
[default=iwe]
[default=<Installation Directory
>\Replication\LogFiles\DXCLEANUP.log]
[default=5]
[default=0]
[default=79]
[default=<null>]
7-10
Command-line Utilities
Option Description
[default=<null>]
[default=90]
Note: The default installation directory varies depending on the version of your
operating system.
Example
This example displays the number of days set for the cleanup period
and the age (in days) of the oldest allowed record currently in place
for the data source name demodata.
dxcleanup show demodata
A message should display that lists the name and version of the
control table cleanup configuration utility, and additional
information such as the following:
Cleanup Period is 7 day(s)
Description
This program deactivates a release that was previously activated
using DXact and removes the activated database from the list of
those available for replication. If you want to delete a replicated
database from physical storage, you must deactivate it first.
Syntax
DXDEACT [options] <DSN>
Argument Description
7-11
Using the DataExchange Utilities and Services
Options
Option Description
I = informational messages
W = warning messages
E = error messages
[default=iwe]
[default=<Installation Directory
>\Replication\LogFiles\DXDEACT.log]
[default=5]
[default=0]
[default=79]
[default=<null>]
[default=<null>]
7-12
Command-line Utilities
Option Description
Examples
This example deactivates the data source name demodata and
retains the activation information in the system database; by default,
activation information is removed.
dxdeact /keepinfo demodata
Description
Syntax
DXDEPLOY [options] <XML File>
Argument Description
7-13
Using the DataExchange Utilities and Services
Options
Option Description
I = informational messages
W = warning messages
E = error messages
[default=iwe]
[default=<Installation Directory
>\Replication\LogFiles\DXDEPLOY.log]
[default=5]
[default=0]
[default=79]
[default=<null>]
Note: The default installation directory varies depending on the version of your
operating system.
7-14
Command-line Utilities
Caution You cannot use these template files as-is and successfully
replicate your data. You must create a template file to include specific
information about your replication environment.
EXPRESS.XML
See “1-Way Deployment Using DXDeploy” on page 5-12 for an
example deployment using the EXPRESS.XML template file.
CUSTOM.XML
See “2-Way Deployment Using DXDeploy” on page 5-34 for an
example deployment using the CUSTOM.XML template file.
Description
Append, replace or show the existing include and exclude patterns
and/or regular expressions for a given designed database. Optionally
test existing or hypothetical patterns or regular expressions.
Syntax
DXDYNPATH [options] <Operation> <DSN>
7-15
Using the DataExchange Utilities and Services
Argument Description
Options
Option Description
[default=<null>]
I = informational messages
W = warning messages
E = error messages
[default=iwe]
[default=<Installation Directory
>\Replication\LogFiles\DXDYNPATH.log]
[default=5]
[default=0]
7-16
Command-line Utilities
Option Description
[default=79]
[default=<null>]
[default=<null>]
[default=<null>]
[default=INCLUDE]
Note: The default installation directory varies depending on the version of your
operating system.
Remarks
It is critical that to note that any file that is being considered for use
with the dxdynpath utility requires system keys.
Before we explain how DataExchange automatically includes or
excludes files using pattern matching, let’s first discuss the types of
expressions you can use.
7-17
Using the DataExchange Utilities and Services
Dir Expressions
This type of expression is based on the Windows directory (dir)
command, and provides an alternative to using regular expressions.
Dir expressions have the following characteristics:
Must contain “dir” as the first characters (“dir” is case-
insensitive).
May include a relative path to the dictionary files. See “Relative
Paths” on page 7-19. Absolute paths are not allowed.
Must include the name(s) of file(s). File names may include the
“?” or “*” wildcard. Note that a period (.) designates a period. It
is not the same as the “?” wildcard.
May include the slash (/) character, back slash (\) character, or a
combination of the two.
May include the parameter “/s” to indicate the processing of files
in subdirectories. The “/s” parameter may not be the first
characters in the expression. Other than that, the parameter is
not positional.
Must include a space character as the separator between the
elements of the expression.
May be used in a series, separated by semi-colons (;). A space
character may precede or follow the semi-colon if you choose,
but is not required.
The following Dir expressions are valid examples:
dir mydbase\*.mkd /s
dir ..\..\acct/acct*.?db
Dir ../payables/custdb/??posted??.pay
dir mydbase\*.mkd /s ; dir ..\..\acct/acct*.?db
Regular Expressions
Regular expressions are a pattern matching technique that let you
parse and manipulate text. DataExchange uses the same regular
7-18
Command-line Utilities
7-19
Using the DataExchange Utilities and Services
Relative Paths
Relative paths are relative to a “home” directory. The home directory
is the one that contains data dictionary files (DDFs) recognized by
DataExchange. To be recognized by DataExchange, the dictionary
files must have been created by one of the DataExchange utilities or
by a DataExchange replication process. If you already have
dictionary files created by a replication process, the home directory
is relative to their location.
Relative paths use “..\” to refer to a directory level. You may also the
slash character (/) instead of the back slash (\). Each “..\” means to
move up the directory structure relative to the home directory. For
example, if your home directory is c:\myapp\mydata\accounts\,
then a relative path of “..\” navigates to c:\myapp\mydata. Similarly,
a relative path of “..\..\” navigates to c:\myapp.
7-20
Command-line Utilities
Examples
This example displays the include and exclude patterns currently in
place for the data source name demodata.
dxdynpath /t=both show demodata
Description
Registers, unregisters or shows the event handler for an activated
database.
Syntax
DXREGEVNT [options] <Operation> <DSN>
Argument Description
7-21
Using the DataExchange Utilities and Services
Options
Option Description
[default=ADMIN]
[default=password]
I = informational messages
W = warning messages
E = error messages
[default=iwe]
[default=<Installation Directory
>\Replication\LogFiles\DXREGEVNT.log
]
[default=5]
[default=0]
[default=79]
[default=<null>]
7-22
Command-line Utilities
Option Description
[default=<null>]
[default=<null>]
Note: The default installation directory varies depending on the version of your
operating system.
Examples
Running this example displays if the specified database has an Event
Handler DLL registered.
dxregevnt show demodata
Description
Replicate files from DSN to Partner Site.
7-23
Using the DataExchange Utilities and Services
Syntax
DXREPL [options] <DSN> [<SiteID>]
Argument Description
Options
Option Description
I = informational messages
W = warning messages
E = error messages
[default=<Installation Directory
>\Replication\LogFiles\DXREPL.log]
7-24
Command-line Utilities
Option Description
Note: The default installation directory varies depending on the version of your
operating system.
Description
Finds modified data missed by DataExchange event handler and
returns control tables to the consistent state.
Syntax
dxsynctables [options] <Table> <DSN>
Argument Description
Options
Option Description
[default=<null>]
I = informational messages
W = warning messages
E = error messages
7-25
Using the DataExchange Utilities and Services
Option Description
Note: The default installation directory varies depending on the version of your
operating system.
Description
The ffcopy utility copies non-Btrieve files from First Site to Partner
Site. This tool can run by hand or as part of the DX session event
handling scheme.
See “DxEvent.sql / dxevent.dll” on page 7-28 for more information
about event handling.
Syntax
ffcopy.exe [options] <DATAFILE>
7-26
Command-line Utilities
Argument Description
<DATAFILE> The MKD file name associated with the table created by the
fcopy.sql script
Options
Option Description
I = informational messages
W = warning messages
E = error messages
Note: The default installation directory varies depending on the version of your
operating system.
Setup steps
Run ffcopy.sql file to create the database file that contains the
information about the files to be copied. The columns of the table
have the following meaning.
7-27
Using the DataExchange Utilities and Services
ReserveInt1 Set to 0 initially, used by DLL after that, do not alter manually
ReserveInt2 Set to 0 initially, used by DLL after that, do not alter manually
Functionalities
1 Find names may include wildcards (*, ?).
2 A new file that matches a wildcard is detected only on the local
site and will be copied to the remote site.
3 If a wildcard matches sub-directories, they will be traversed and
new directories will be created on the remote side if they do not
exist.
4 Change detection algorithm: A file on NTFS contains 3 dates -
creation date, modification date, and accessed date. If a local file
is more recent than its remote partner file, the local file is copied
to the remote directory. (Note that copying a file does not
change its modification date).
5 Check the ffcopy.log file for information and errors.
Logging
ffcopy.exe logs information and error messages to the replication log
files directory which is commonly located in
<Installation Directory
>\replication\logfiles\ffcopy.log.
7-28
Command-line Utilities
DxEvent.sql / dxevent.dll
The dxevent.dll handles replication session event callbacks. The
following events are handled:
PostSessionStart Called after the connection has been made with the
Partner Site and before any data has been replicated.
This is the first callback method that receives an identifier
for the replication session. In addition, it receives the
name and network address of the Partner Site.
OnSessionEnd Called after all the data has been replicated and before
the network connection is terminated. This is the last
session callback method that receives the SessionID.
Useful for reporting the results of a replication session
including the number of data conflicts resolved.
Setup steps
Run dxEvent.sql to create the dxEvent table in your database. The
dxEvent table columns have the following meaning.
Command char(128) Contains the command the user wants to run (ex.
'c:\<Installation Directory >\bin\ffcopy.exe
myfiles.mkd')
Wait bit Set this bit if you want the callback DLL to wait for the
command to return and check the status code
NeedArgs bit Set this bit if you want the callback DLL to pass in
session args such as dsn name, dbname, session id
Ignore bit Set this bit if you want the callback DLL to ignore this
command
7-29
Using the DataExchange Utilities and Services
Logging
dxevent.dll logs information and error messages to the replication
log files directory which is located in:
<Installation Directory
>\replication\logfiles\dxevent.log.
7-30
GUI-based Utilities
GUI-based Utilities
Pervasive DataExchange includes four graphical user interface
(GUI) utilities for completing replication design, administration and
monitoring tasks. The following table lists the GUI-based utilities
and offers a brief description for each utility.
replmonitor Replication Progress and Log GUI statistics and logging view
Viewers utility. Configures replication
sessions, monitors data
replication, and sets logging
options.
DataExchange Manager
Description
The DataExchange Manager is used to administer replication
networks. DataExchange Manager is a separate application that can
be run external to PCC. You can access the Manager by selecting
DataExchange Manager from the Pervasive group on the Start
menu, or from within PCC by selecting DataExchange Manager.
For more information on using the DataExchange Manager, see
Chapter 9, “Using DataExchange Manager.”
7-31
Using the DataExchange Utilities and Services
Description
The DataExchange Designer is used to design and update a database
for replication. You create design templates for replication using this
utility. DataExchange Designer is also a separate application that can
be run external to PCC. You access the Designer by selecting
DataExchange Designer from the Pervasive group on the Start
menu or from within PCC by selecting DataExchange Designer.
For more information on using the DataExchange Designer, see
Chapter 8, “Using the DataExchange Designer.”
Description
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).
For more information, see Chapter 10, “Using the Replication
Progress and Log Viewers.”
Description
Deployment Tool walks you through the steps necessary to deploy
replication on First and Partner Sites. The wizard is an automated
alternative to the DXDeploy command-line utility and can be
invoked by selecting DataExchange DeploymentTool from the
Pervasive group on the Start menu, or from within PCC by selecting
DataExchange DeploymentTool
Description
Template Remover is a wizard that deletes a replication template.
You can no longer use the template to activate sites. You access this
7-32
GUI-based Utilities
7-33
Using the DataExchange Utilities and Services
Services
Pervasive DataExchange includes two services that initiate
automatically at the time of startup. This section discusses these
services and includes specific information on configuring these for
your specific business requirements.
Description
Detects critical replication failures and notifies administrators by
e-mail.
Failure Notification
DataExchange has the ability to notify you by electronic mail
(e-mail) if a scheduled replication fails. The failure can be either of
the following types:
A scheduled replication fails to replicate within a specified
period.
A replication site cannot be communicated with (perhaps the
machine is down, the network has failed, and so forth).
Notification Agent
DataExchange installs a component called the notification agent if
the machine contains the Pervasive PSQL Server product. The
notification agent, or DXAgent, provides the notification
functionality when scheduled replication fails.
The agent is not available if you install DataExchange on a machine
with the Pervasive PSQL Workgroup product. If you use a
Workgroup engine as a replication site, set up your replication
7-34
Services
schedule on the site that contains the Server database engine. The
agent on the Server machine will detect if replication fails on the site
with the Workgroup engine.
The agent initiates an e-mail if a replication failure occurs. The
subject line of the e-mail contains the words “DataExchange alert.”
The body of the e-mail contains the following primary content:
Identity of computer on which the failure occurred
Name of database
Time since the last successful replication
Communication Protocol
The agent requires the basic Simple Mail Transfer Protocol (SMTP)
to communicate with a mail server. Each replication machine with
an agent must be configured to access the SMTP server.
Correspondingly, the SMTP server must be set up to accept e-mail
from each replication site running the agent.
The agent does not deal with authentication or encryption. It does
allow a different port other than the standard SMTP port 25. Thus,
if a firewall opens a different port, you can specify which one. The
port must not require authentication or encryption.
If a replication failure occurs and the SMTP server cannot be
reached, a pop-up message appears. The message informs you that
e-mail could not be sent and lists the name of the SMTP server that
cannot be communicated with. Note that the pop-up message
appears even if no one is logged on to the computer. Also, the
message continues to display until replication succeeds or the SMTP
server becomes available. This is true even if you click OK to dismiss
the message.
Agent Configuration
DataExchange contains a configuration file with which you
configure the agent.
7-35
Using the DataExchange Utilities and Services
<dxagentconfig>
<smtpserver>
<hostname>SMTP Server To Be Configured
</hostname
<port>25</port>
</smtpserver>
<email>
<from>DXAgent@MyCompany.com</from>
<to>E-mail Address To Be Configured</to>
</email>
</dxagentconfig>
<hostname>myserver.mylocation.mycompany.com</
hostname>
<port>25</port>
</smtpserver>
<email>
<from>DXAgent@mycompany.com</from>
<to>mailbox@myserver.mylocation.mycompany.com</to>
</email>
</dxagentconfig>
7-36
Services
Description
The executable of the Replication service. The Pervasive
DataExchange service performs data replication between Pervasive
PSQL databases.
For information on starting and stopping the Replication Service,
see “Starting and Stopping Replication,” on page 2-2.
7-37
Using the DataExchange Utilities and Services
7-38
chapter
8-1
Using the DataExchange Designer
Overview The Designer can be used with both Data Synchronization and Real-
Time Backup Editions. An alternate method for Real-Time Backup
and Data Synchronization 1-way and 2-way replications is to use the
DXDeploy utility.
For information on using DXDeploy, see Chapter 7, “Using the
DataExchange Utilities and Services.”
8-2
DataExchange Designer Concepts
1-way
Select the 1-way method if one or more of the following is true:
You want a data replication solution to ensure that you can
restore data from a backup copy. This is a 1-way replication
from one machine to another or from multiple machines to a
single backup machine.
You want a data portal solution to ensure a backup of your data
and the ability to run reports on the backup server.
2-way
Select the 2-way method if one or more of the following is true:
You want a data synchronization solution (2-way replication).
You do not require sophisticated conflict handling. That is,
record conflicts can be handled at the column level granularity
based on the most recent timestamp and other criteria.
8-3
Using the DataExchange Designer
1-Way / 2-Way This section explains the concepts of using the DataExchange
Methods Designer to create and customize replication designs for both
DataExchange Methods. The instructions here provide the
foundation for using either the 1-way or 2-way method, in that both
methods require you to perform the following:
1 Select the database
2 Identify the database
3 Select tables for replication
Database Selection
First you select a database to use for your replication design. You
may choose to open an existing database, or you can create a new
database for this purpose. The next figure shows the Database
Information dialog where the database name is entered and the
DataExchange Method is selected, using Data Synchronization.
The next figure shows the Database Information dialog where the
database name is entered and the DataExchange Method is selected,
using Real-Time Backup.
8-4
DataExchange Designer Concepts
DataExchange Method
If you select a new database for replication, you must select the
DataExchange Method to use when you enter the database
information. In selecting an existing database, the DataExchange
Method is already determined by the method previously used for the
selected database.
The method you select depends on your database and your business
requirements. The choices are 1-way and 2-way.
Database Identification
When creating a new database for replication, you must designate
specific identifiers for the Project, Network, and Release names
associated with your replication design.
Project
A project represents a single replicated database. The replication
Project Name is of your own choosing and helps you identify and
keep track of what you need to replicate. You can use a simple-to-
understand name that helps you remember which database is
involved.
8-5
Using the DataExchange Designer
Network
A replication network is the grouping of replication sites that will
participate in the replication. The name for the replication network
is of your own choosing and helps you identify and keep track of
what you need to replicate. A name that helps you remember the
grouping is very useful. For example, you could name a grouping of
sites in the finance department finance network.
The Network name must be 20 characters or less.
Release
The release is like a version number for the design of the replication
database. Your first design could be version 1, for instance. If you
choose to change the design later, then you would create a version 2
and so forth.
The Release name must be 8 characters or less.
The name for the replication release is of your own choosing and
helps you identify and keep track of what you need to replicate.
The Project, Network, and Release names are added to the database
network analyst (DNA), which is the system database used by the
Replication Engine. The replication utilities use these names from
the DNA database to allow or disallow certain actions. For example,
databases that differ only by release are allowed to replicate together.
8-6
DataExchange Designer Concepts
Replicated Tables
When you first start the DataExchange Designer, the database tables
are listed in the left pane on the Not Replicated tab. Initially, none of
the database tables are flagged for replication; all of the tables are
marked as Not Replicated.
To begin your design, you decide which tables to use for replication
and mark these tables accordingly.
Design After you have completed your design, you save and apply the design
Completion to create the replication template. Templates are required for designs
in order to establish a structure on which to base data replication.
8-7
Using the DataExchange Designer
Templates
Saving the design writes design information to one of the replication
system control tables for the template. The design information for
your data has not yet been applied directly to the template itself.
The save action also verifies the design and ensures that you have not
specified anything incorrectly. If there are errors, the DataExchange
Designer displays a window describing the error and instructing you
on how to correct the error. Once the save process completes
successfully, a message is presented in the lower left corner of the
DataExchange Designer main window.
When you choose to save the design template, the Designer creates a
template with initial design information, such as the replication
system control tables. This action applies the design of your data to
the template. That is, the Designer creates a replication control table
for each data table you chose to replicate, and updates the replication
system control tables.
A dialog box appears, like the following, on which you can specify
the copy of “starter” data. The default is to copy the starter data.
.
If the database you are designing contains data and you want to
replicate that data, then you must copy the data as starter data to the
replication template. If you clear this selection, the data will not be
replicated.
This option applies only to data existing in the database before
configuring the database for replication. All data entered into the
8-8
DataExchange Designer Concepts
Authentication
Authentication is not used with Pervasive PSQL databases. Pervasive
PSQL databases can replicate with any site regardless of the
replication network.
Information Files
Information files contain information about the replication design
and are primarily used for troubleshooting. The DataExchange
Designer creates two information files when you first save your
design (thereafter, a save updates the files). The files are named in the
format xPDnnnnnn.OUT and xPDnnnnnn.REF. The default location
is the directory where you installed Pervasive PSQL.
Generally, you do not have to use the information files unless
requested by a technical support representative.
8-9
Using the DataExchange Designer
Preferences
You can set DataExchange Designer preferences to determine if
database selection is automated at startup and how messages and
errors are logged.
Wizard
The Startup Wizard can be invoked when you launch the
DataExchange Designer, by setting the preferences on the Wizard
tab of the Designer. This dialog lets you open a new database or select
an existing database to use for your replication design.
Logging
The log file for the DataExchange Designer is PRD.log. This file is
located in <Installation Directory >\Replication\LogFiles. You can
specify certain options about the information contained in the log,
the size and location of the log, and the number of logs that retain
historical information.
8-10
DataExchange Designer Concepts
Error This setting turns on or off the logging of errors to the PRD.log
file.
8-11
Using the DataExchange Designer
Caution Avoid using the Trace option for long periods (over 30
minutes), particularly if you are performing numerous tasks
with the DataExchange Designer. Trace outputs every function
call to the log file. Your log file can grow enormously in a very
short period. Generally, only use Trace when requested by a
technical support representative.
8-12
DataExchange Designer Concepts
Log file options you can set include Maximum Log Size, Maximum
Logs to Keep, and the Name of Log File.
Maximum Logs to Keep - This value sets the number of history files
retained. Each time the Designer is activated, a new PRD.log file is
created, renaming the previous PRD.log file to PRD.lo1.
For example, when the Designer is activated, the files PRD.log and
PRD.lo1 are created. PRD.log is then empty and starts acquiring data
once more. The next time the Designer is activated, PRD.lo1
becomes PRD.lo2, a new PRD.lo1 is created from PRD.log, and
PRD.log is again empty and able to acquire data. The Maximum
Logs to Keep setting determines the extent of the history retained:
lo1, lo2, lo3, and so forth.
Name of Log File - This specifies the location and name of the
current log. The Pervasive DataExchange logs are located at
<Installation Directory >\Replication\Logfiles. The default log file
name for the Designer is PRD.log. You can change the location and
the name of log file for the DataExchange Designer if you prefer.
This completes the discussion of DataExchange Designer concepts.
The next section discusses the graphical user interface of the
DataExchange Designer.
8-13
Using the DataExchange Designer
Main Window The main window of the DataExchange Designer displays when the
application is first started or after you have selected a database for
use, depending on the application settings you have made. The
following image shows the main window of the DataExchange
Designer GUI. The primary objects in this window include:
Title Bar
Menu Bar
Toolbar
Database Design Pane
Status Bar
8-14
DataExchange Designer GUI Visual Reference
The following table describes the main window GUI objects. Each
object is explained in depth in the subsequent sections of this
chapter.
Minimize button
Maximize button
Close button
File
Actions
Tools
View
Help
New Database
Open Database
Save Database
Verify Design
Create Replication
Template
View Messages
Refresh
Help Topics
8-15
Using the DataExchange Designer
Replicated tab
Database Name
Project Name
Network Name
Release Name
Designer Menu The following image shows the menu and toolbar in the
and Toolbar DataExchange Designer interface.
8-16
DataExchange Designer GUI Visual Reference
The following table details each object available from the Designer
Menu and Toolbar components.
File
Actions
Tools
View
Help
New Database
Open Database
Save Database
Verify Design
Create Replication
Template
View Messages
Refresh
Help Topics
New
Open...
Save
Exit
8-17
Using the DataExchange Designer
(New Database
button)
Replicate Table
Refresh
8-18
DataExchange Designer GUI Visual Reference
(Refresh button)
Verify Design
Create Replication
Template...
(Create
Replication
Template... button)
Create New Creates a new release for the “To create a new release
Release... current design. of a design” on page 8-30
or
(Create New
Release... button)
8-19
Using the DataExchange Designer
Database Settings...
Database Information...
Verification Messages...
Preferences...
Switch Views
Database Settings Displays the current settings “To access the Database
for the selected database. Settings” on page 8-30
Database settings include:
“To display Authentication
Authentication Settings” on page 8-31
Name
Type
Location
Project Certificate
Organization Certificate
(View Messages
button)
8-20
DataExchange Designer GUI Visual Reference
Switch Views
(Ctrl+Shift+Tab)
About Pervasive
DataExchange Designer
Help Topics (F1) Lists the documentation topics “To display help” on page
for DataExchange Designer. 8-23.
or
(Help Topics
button)
8-21
Using the DataExchange Designer
Database The following image shows the Database Design pane and the
Design pane objects which are included in this component of the DataExchange
Designer GUI.
The following table details the objects included each of the tabbed
dialogs in the Database Design pane.
8-22
DataExchange Designer Tasks
Category Description
General Tasks The tasks described in this section apply to general use of the tool
and are intended to introduce you to working with DataExchange
Designer.
“To start DataExchange Designer as a stand-alone application” on
page 8-23
“To start DataExchange Designer from PCC” on page 8-23
“To display help” on page 8-23
Basic Design The tasks described in this section apply to all replication designs.
Tasks Both Real-Time Backup and Data Synchronization Editions require
that these tasks be completed. The following lists the tasks included
in this category.
“To create a new database for replication” on page 8-24
“To open an existing database for replication” on page 8-25
“To designate a table for replication” on page 8-27
“To designate a table not to be replicated” on page 8-28
8-23
Using the DataExchange Designer
General Tasks
³ To display help
1 Click Help, then select the type of help you want:
Help Topics – Lists the documentation topics for
DataExchange Designer.
About – Displays the name and version of DataExchange
Designer and the Pervasive DataExchange copyright
information.
8-24
DataExchange Designer Tasks
Tip You may also press F1 to access the list of help topics.
Tip The database must exist and already have been added to
ODBC.
8-25
Using the DataExchange Designer
7 Enter or select from the drop-down list the Project name for
your design. Project names must be 20 characters or less.
8 Enter or select from the drop-down list the Network name for
your design. The Network name must be 20 characters or less.
9 Enter the Release name for your design. The release is like a
version number for the design of the replication database. The
Release name must be 8 characters or less.
8-26
DataExchange Designer Tasks
Tip The Project names and Network names must match to allow
replication.
Note You can select Enable New Database from this screen, and
the Database Information dialog discussed in “To create a new
database for replication” on page 8-24 displays.
8-27
Using the DataExchange Designer
Tip To select multiple tables in the list, click the first table in the
list. Press the Shift key and, while holding it down, click the
additional tables for selection in the list.
The selected tables move from the Not Replicated tab to the
Replicated tab.
As you select each table name on the Replicated tab, the view on
the right changes to show information for that table. The first
tab on the right shows the structure for a particular table.
8-28
DataExchange Designer Tasks
Tip To select multiple tables in the list, click the first table in the
list. Press the Shift key and, while holding it down, click the
additional tables for selection in the list.
The selected tables move from the Replicated tab to the Not
Replicated tab.
8-29
Using the DataExchange Designer
If the database you are designing contains data and you want to
replicate that data, then you must copy the data as starter data to
the replication template.
8-30
DataExchange Designer Tasks
Note When you activate a site you can specify whether to copy
the starter data to the activated site. If you want to copy the data
during activation, it must already be in the template. The
DataExchange Designer and dxact.exe each have options dealing
with copying data.
4 Click OK.
Administrative Tasks
8-31
Using the DataExchange Designer
8-32
DataExchange Designer Tasks
2 Type the location, or use the browse button, for the location
where you want the information files to be created. The default
location is the directory where you installed Pervasive PSQL.
3 Click OK.
8-33
Using the DataExchange Designer
2 Click OK.
8-34
DataExchange Designer Tasks
3 Mark the check box for each of the Logging Levels option for
which you want Designer to report.
Error - records Error messages to the log file
Warning - records Warning messages to the log file
Information - records Information messages to the log file
Debug - records debugging information to the log file
Tracing - records trace information to the log file.
For more information on Logging Level options, see “Logging” on
page 8-9.
Caution Avoid using the Trace option for long periods (over 30
minutes), particularly if you are performing numerous tasks
8-35
Using the DataExchange Designer
Note This only applies to the Debug Logging Level. Debug must
be selected in order to use this option.
5 Enter the Maximum Log Size (in bytes) for the log file.
6 Enter the Maximum Logs to Keep. This is the number of log files
you want DataExchange Designer to maintain.
7 Enter the location and name of the log file for DataExchange
Designer.
8 Click OK.
8-36
chapter
Using DataExchange
Manager 9
A Tour of DataExchange Manager Utility
9-1
Using DataExchange Manager
9-2
DataExchange Manager Concepts
A schedule for the First Site applies to all sites that are subscribed to
the First Site. You can create as many schedules as you need for each
site.
Site List
The site list contains a list of all the sites to which you have
administrative access in the replication network. You display the site
list by clicking Database Sites. The first entry in the site list is
always All Sites. The other sites are listed below All Sites.
9-3
Using DataExchange Manager
9-4
DataExchange Manager Concepts
The other sites on your replication network do not know that a site
has been removed until you perform a replication. Until you
replicate, only the site for which you are logged on to DataExchange
Manager knows that a site has been removed. An example helps
clarify this.
The DataExchange Manager requires that you connect to a specific
database when you log on. Assume that you select MyDataBase when
you log on to DataExchange Manager. Once logged on, you remove
site Partner_Site_2. At this point, only the replication tables for
MyDataBase contain the removal information. The information has
not been replicated to the rest of your replication network.
If you were to open the Initiate Replication dialog and select
MyDataBase as the source database, Partner_Site_2 would not be
included in the list of sites to replicate with. However, if you were to
select a different site on the same replication network—for example
Partner_Site_1—then Partner_Site_2 would still be listed in the sites
to replicate with because you have not yet replicated. After you
replicate, then Partner_Site_2 is no longer listed in the sites to
replicate with.
Note that the first replication after removing (or restoring) a site
from the replication network will fail for that site. The log file for
DataExchange Designer, DRE.log, contains an error message similar
to the following:
E 019f 0303-15: 6:25 Partner site Partner_Site_2(site
number: 00LFLU) has been removed from the replication
network - it cannot replicate with any other site.
After the first replication, this error no longer occurs because all sites
on the replication network are aware of the site’s status (removed or
restored).
9-5
Using DataExchange Manager
9-6
DataExchange Manager Concepts
9-7
Using DataExchange Manager
Managing With DataExchange Manager, you may only view the permission
Permissions groups available with DataExchange Manager. The DataExchange
permission groups are System Administrators and Everyone. You
access the permissions group list by clicking Database Permission
Groups.
9-8
DataExchange Manager GUI Visual Reference
Main Window The following image shows the main window of the GUI. The table
following the image describes the GUI objects.
Reconnect
Refresh
Exit
9-9
Using DataExchange Manager
Sites
Users
Permission Groups
icon
Options command Displays the dialog on which “To set the log options for
you specify logging options for DataExchange Manager”
DataExchange Manager. on page 9-14
Help Topics
About
Help Topics Lists the documentation topics “To display help” on page
for DataExchange Manager. 9-17
9-10
DataExchange Manager GUI Visual Reference
DataExchange Manager
users
Permission Groups
9-11
Using DataExchange Manager
General Tasks General tasks apply to the overall use of the tool:
“To start DataExchange Manager from Pervasive Control
Center (PCC)” on page 9-12
“To start DataExchange Manager from a command prompt” on
page 9-12
“To log on to DataExchange Manager” on page 9-13
“To log on as a different user or to connect to a different
database” on page 9-13
“To change a logon password” on page 9-13
“To set the log options for DataExchange Manager” on page 9-
14
“To refresh DataExchange Manager view” on page 9-16
“To display help” on page 9-17
9-12
DataExchange Manager Tasks
2 For Logon Name, type a valid user’s name. The default logon
name is ADMIN (all capital letters).
3 For Password, type a valid password. The default password is
password (all lowercase).
4 Click OK.
9-13
Using DataExchange Manager
9-14
DataExchange Manager Tasks
Option Discussion
Error Turns on or off the logging of errors to the log file. Errors are
indicated by an E in the first column:
Tracing Turns on or off the logging of trace information to the log file.
The information being traced is every function call. Trace
information is indicated by a T in the first column:
Caution: Avoid using the Trace option for long periods (over
30 minutes), particularly if you are performing numerous
tasks with DataExchange Manager. Trace outputs every
function call to the log file. Your log file can grow enormously
in a very short period. Generally, use Trace only when
requested by a technical support representative.
Debug Turns on or off the logging of debug information to the log file.
Debug information is indicated by a D in the first column:
1:SUCCESS:PD2PQQ85001,TrackerPROJ (net) -
Tracker
PD2PQQ86001,tracker-project
int-tut-network) - IntTut_First_Site
PD2PQQ86002,tracker-project
int-tut-network) - IntTut_Partner_Site
PD2PQQ86003,tracker-project
(int-tut-network) - drelogtest
9-15
Using DataExchange Manager
Option Discussion
Verbose Logging 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 cmdsend is receiving
a response from the replication engine (line 308 of the source
code).
1:SUCCESS:PD2PQQ85001,TrackerPROJ (net) –
Tracker
Maximum Log This value determines when a new history log file is started
Size (lo1, lo2, and so forth). See Maximum Logs to Keep.
Maximum Logs to This value sets the number of history log files retained. When
Keep a log file reaches its maximum size, the file is reassigned to
the next history file name.
Name of Log File This specifies the location and name of the current log file.
The Pervasive DataExchange logs are located at
<Installation Directory >\Replication\Logfiles. You can
change the location and the name of log file for
DataExchange Manager if you prefer.
Note: The default installation directory varies depending on the version of your
operating system.
9-16
DataExchange Manager Tasks
to switch to the user Information tab in the first Manager and refresh
the view.
1 In the menu bar, click Options, or press F5 or click .
³ To display help
1 Click Help, then the type of help you want:
Help Topics – Lists the documentation topics for
DataExchange Manager.
About – Displays the name and version of DataExchange
Manager and the Pervasive DataExchange copyright
information.
You may also press F1 to access the list of help topics.
9-17
Using DataExchange Manager
Option Meaning
Notify if no replication after See “dxagent” on page 7-34 for a discussion of the
[value] minutes notification agent and how this option applies to the
agent.
9-18
DataExchange Manager Tasks
9-19
Using DataExchange Manager
User Tasks User tasks apply to adding or deleting users and membership groups
and changing user information:
“To add a new user” on page 9-20
“To change user information” on page 9-21
“To delete a user” on page 9-21
“To change a user’s group membership” on page 9-22
9-20
DataExchange Manager Tasks
³ To delete a user
Permission Group Requirement: You must be a member of the
System Administrator Permission Group to perform this task.
1 Click Database Users or click .
2 In the user list, click the desired user.
3 Click the Information tab.
9-21
Using DataExchange Manager
4 Click Delete.
You cannot delete the default administrator user ADMIN.
Permission groups for a selected work set are sorted into two
lists: Not a Member Of and Member Of. The selected user is a
member of all those groups in the Member Of list.
5 Click the desired permission group, then use the arrow buttons
between the lists to move the group to the Member Of or Not a
Member Of lists.
For example, in the following image, if you wanted to add a user
to the System Administrators group, click System
Administrators in the Not a Member Of list, then click .
9-22
chapter
10-1
Using the Replication Progress and Log Viewers
10-2
Checking the Replication Engine and Service
10-3
Using the Replication Progress and Log Viewers
10-4
Initiating Replication from the Progress and Log Viewers
2 Select the Source Database you want from the Source Database
drop-down list.
3 Click the type of replication you want. Choose one of the
following options:
a. Replicate data between the source database and the
selected sites.
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. Delete and replace all data on the selected sites with data
from the source database.
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. Delete and replace all data on the local site with data from
the selected site.
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 Check mark the sites with which you want to replicate with the
source database. Clear the check mark for the sites you do not
want to participate in the replication.
5 Click Replicate.
10-5
Using the Replication Progress and Log Viewers
Reading the The list of sites to replicate with may seem inconsistent depending
Initiate on how you activated your Partner Sites.
Replication Here's an example of how the list may appear inconsistent. You
Dialog Box 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.
10-6
Recording and Monitoring Replication Activity
3 You may select the option shown in the following table for the
actions you wish to perform.
Table 10-1 Replication Logging Commands
Command Description
Clear Log Removes all lines from the log display pane. (The log on
physical storage is not affected.)
Copy Copies the current highlighted line in the pane. You can then
paste the copied line into another application.
10-7
Using the Replication Progress and Log Viewers
Log Messages Toggle the selection for each of the following logging options
as needed:
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:
D - debug
E - error
I - information
W – warning
The following table describes each available Logging Level option
and provides a sample log entry for that option.
10-8
Recording and Monitoring Replication Activity
Table 10-2 Replication Progress and Log Viewers Logging Level Options
Option Name Description
Error The option turns on or off the logging of errors to the DRE.log
file.
10-9
Using the Replication Progress and Log Viewers
Table 10-2 Replication Progress and Log Viewers Logging Level Options
Option Name Description
Verbose Logging 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.
10-10
S UPPLEMENTAL I NFORMATION
appendix
Basic Troubleshooting
A
How to Identify and Solve Common Problems
A-1
Basic Troubleshooting
Troubleshooting Resources
The following table describes resources available to help you solve
problems.
Table A-1 Resources that Assist with Problem Determination
Feature/ Function For More
Component Information
A-2
Troubleshooting Strategies
Troubleshooting Strategies
You must first diagnose a problem before you can fix it. The
following checklist contains items to help you diagnose problems
with DataExchange.
R Did DataExchange install correctly?
R Did DataExchange uninstall correctly?
R Does the network function correctly?
R Is the database engine running?
R Is the replication engine running?
R Is data being replicated correctly?
R Is the notification agent sending e-mail?
R Do the log files contain errors?
R Are other sources of help available?
The rest of this chapter discusses each checklist item in more depth.
A-3
Basic Troubleshooting
Installation
This section discusses topics that pertain to installation.
A-4
Uninstalling
Uninstalling
If you have activated databases that are located under <Installation
Directory >\Replication, first deactivate them then delete the
replication template with the Template Remover wizard. If you do
not deactivate the database then remove the template, uninstall
leaves the database files and the associated replication files. The
remaining files do not cause any problems but you may prefer to
reclaim physical storage by deleting them. You may delete the files
manually if you want. Remember, also, to remove the DSN
associated with the database.
See “Working with the Examples” on page 5-6 for a discussion of
how to deactivate a database and remove a template.
A-5
Basic Troubleshooting
Network Communications
Pervasive System Analyzer (PSA) is a diagnostic utility included with
the Pervasive PSQL database engines. PSA can be used as a stand-
alone diagnostic tool to help you troubleshoot network problems.
Documentation The use of PSA is detailed in the Pervasive PSQL User's Guide. Please
for PSA see that guide for complete information regarding PSA.
A-6
Database Engine
Database Engine
The Pervasive PSQL database engine must be running to perform
replication.
A-7
Basic Troubleshooting
Replication Engine
The DataExchange replication engine must be running to perform
replication.
A-8
Log Files
Log Files
Pervasive DataExchange allows you to enable event logging via log
files. You may record the activity of the DataExchange Designer, the
DataExchange Monitoring Tools, the DataExchange Manager, and
the Replication Engine. Additionally, DataExchange keeps a
messages log and an installation log.
All logs are text files and have a file extension of .log for the most
current one saved. The files produce any mix of data: Information,
Warning, Error, and Debugging. You can choose verbose (as
opposed to terse) messages. Verbose messages contain the name of
the program and a line number within the program to help you
debug situations. Verbose applies only to the Debug logging level.
You can change the default location of the logs, which is
<Installation Directory >\Replication\LogFiles. If you want, you can
also change the default log size and the default number of files kept
(a history). You can view the LogFiles folder by selecting
DataExchange LogFiles from the Pervasive group on the Start
menu.
Log File Size If you set the maximum log size to zero, or no limit, the log will
increase in size to whatever capacity the physical storage allows. We
recommend that you do not set a maximum log size of zero except
for troubleshooting. Even then, avoid using the no limit setting for
an extended period (typically, more than four hours). The DRE log,
for example, can grow rapidly depending on the type of logging
being performed (such as Debug logging), the frequency of
replication, and the number of sites replicating.
In the case of the DRE.log, when the log file reaches its maximum
size, the file is reassigned to the next history file name. For example,
when the Dre.log reaches its maximum size, it gets renamed to
Dre.lo1 and a new Dre.log gets created. Dre.log is then empty and
starts acquiring data once more. When the maximum size is again
reached, Dre.lo1 gets renamed to Dre.lo2, Dre.log gets renamed to
Dre.lo1, and a new Dre.log is again empty and able to acquire data.
The Maximum Logs to Keep setting determines the extent of the
history retained: lo1, lo2, lo3, and so forth.
Other DataExchange components automatically start a new log file
when the utility or service executes. In this situation, each time the
A-9
Basic Troubleshooting
Log File The following table describes the content of the various log files.
Descriptions
Log File (.log) Description
dnewsite The replication installation log. This log is created when you
install Pervasive DataExchange and contains information
about setting up the replication DNA database.
The default maximum size of this log is 2 MB. You may want
to limit this log to a maximum 5 MB. Some text editors cannot
open files larger than 10 MB.
dregdtk This log is created if you install a First Site (which includes the
DataExchange Designer). The log contains information
about registering the licenses.
dxact The log updated by the activation utility when you activate a
site.
A-10
Log Files
ffcopy The log updated by the ffcopy.exe utility, which copies non-
Btrieve files from a First Site to a Partner Site.
msg This log lists messages about the replication sessions, the
sites that replicated and if the replication was successful. The
Replication Engine writes to this log. The dre log is more
detailed.
A-11
Basic Troubleshooting
1 Select Start Run, type regedt32 in the Open field of the Run
dialog box, and click OK.
Registry Editor opens.
2 Find the following registry key:
HKEY_LOCAL_MACHINE\Software\Pervasive
Software\Pervasive Replication\SessionExpiry
3 Double-click REG_DWORD for the key.
The Edit DWORD Value dialog opens.
4 In the Value Data field, change the value to the desired minutes
(5 is the default).
5 Click OK.
6 Exit Registry Editor.
A-12
Data Replication
Data Replication
This section discusses topics that pertain to replicating data.
List of Sites to The Initiate Replication dialog allows you to start a replication.
Replicate With (Right-click Replication - Connected in the PCC tree, then click
Seems Tasks Initiate Replication to display the dialog.) On this dialog,
Inconsistent you select a source database and the sites to replicate with. 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.
Replication The other sites on your replication network do not know that a site
Fails for a has been deactivated until you perform a replication. Therefore, the
Deactivated first replication after deactivating a site from the replication network
Site will fail for that site. This is the normal behavior.
The DRE.log file contains an error message similar to the following:
E 019f 0301-15:46:25 Partner site Partner_Site_2
(site number: 00LFLU) has been removed from the
replication network - it cannot replicate with any
other site.
A-13
Basic Troubleshooting
After the first replication, this error no longer occurs because all sites
on the replication network are aware of the site’s status
(deactivated).
False Alert If you delete, disable, or modify a schedule, the other replication sites
Because of are not aware of this because replication does not take place. The
Schedule notification agent on the other sites continues to contact the
Manipulation scheduling site. If the scheduling site is down or unreachable, the
agent sends a failure alert. The alert is false because the schedule no
longer applies.
To prevent such false alerts, manually initiate replication after you
delete, disable, or modify a schedule. The replication ensures that the
schedule changes get replicated. Alternatively, if your entire
replication network no longer needs replication, deactivate all
replication sites on the network.
Correct Alarms This situation occurs if you change a schedule remotely. For
but Replication example, you start DataExchange Manager on site B and use it to
on Wrong change the schedule on site A. The replication engine on site A will
Schedule not use the new settings until you restart the engine. The notification
agent, however, uses the new schedule without having to be
restarted. The agent properly notifies of replication being off
schedule.
To prevent this situation, do not update schedules remotely.
Dynamically If your dynamically created tables are not being replicated, verify
Created Tables that the file matching patterns in the dCNF table are correct.
Not Being DataExchange provides a utility, Dxdynpath, to help you verify file
Replicated matching patterns. See “dxdynpath” on page 7-15 in Pervasive
DataExchange User’s Guide.
A-14
Data Replication
Note that relative paths are relative to a home directory that contains
data dictionary files (DDFs) recognized by DataExchange.
SQL Triggers SQL triggers are a type of stored procedure that are automatically
and Replication executed when data in a table is modified with an INSERT,
UPDATE, or DELETE. (Stored procedures are SQL statements that
are predefined and saved in the database dictionary.)
Replication updates the base table before updating the dependent
tables. This sequence maintains the correct foreign key relationships.
In the case of the sample database Tracker, for example, the Region
table is updated before the Employee table.
For illustration, suppose you have a database with a base table A and
a dependent table B (table B has a foreign key relationship to table
A). You create a trigger that updates base table A when a new record
is inserted into table B.
Partner site 1 inserts a new record into table B, causing the trigger to
execute. Table A is updated on Partner Site 1. Then you replicate
Partner Site 1 with your other sites.
On the other sites, replication updates table A, then inserts a new
record into table B, causing the trigger in table B to execute and again
attempt to update table A. This may not be the desired behavior
because the Replication Engine has already updated the record in
table A with changes made on Partner Site 1.
Definite rules concerning triggers and replication cannot be given.
In general, carefully consider each trigger that is part of a replicated
database. Make certain that the trigger’s functionality and the
behavior of replication are compatible to ensure the outcome you
desire.
Data Conflicts The template data prepared for replication during design is marked
When differently (with timestamps and other internal methods) than the
Activating data prepared during activation. The Replication Engine resolves the
Partner Sites differences during replication. In a few cases, data conflicts may
result between how you activate your First Site versus how you
activate your Partner Sites.
A-15
Basic Troubleshooting
Index For data files with 4096 byte page size, you are limited to 119 index
Segments segments per file. Because each indexed nullable column with true
NULL support requires an index consisting of 2 segments, you
cannot have more than 59 indexed nullable columns in a table (or
indexed nullable true NULL fields in a Btrieve file). This limit is
smaller for smaller page sizes.
Any file created with Pervasive PSQL, with file create mode set to 7.x,
and TRUENULLCREATE set to the default value of On, has true
null support. Files created using an earlier file format, or with
Pervasive PSQL 7, or with TRUENULLCREATE set to Off, do not
have true null support and do not have this limitation.
Refer to the Pervasive PSQL book SQL Engine Reference for more
information about TRUENULLCREATE.
A-16
Data Conflicts
Data Conflicts
Central to any replication solution is its ability to detect and resolve
conflicts when they occur. The best method of handling conflicts is
a preventative one: avoid conflicts by design. In addition to this,
Pervasive DataExchange includes a default last-in-wins policy. By
maintaining time stamps in control tables and synchronizing clocks
on replication sites, an accurate account of when records where
inserted, updated, and deleted is kept. The Replication Engine is
responsible for enforcing the conflict policy (and logging conflicts)
as they occur.
In addition, Pervasive DataExchange provides an interface with
which you can define your own conflict resolution. You can design
the appropriate conflict resolution for any set of business rules and
provide the resolution through an event handler DLL. The DLL
overrides or extends the functionality of the Replication Engine.
For information about creating an event handler DLL, contact
Pervasive Software. We will supply you the Event Callback API
documentation.
Conflict Types Data conflicts are divided into types by Pervasive DataExchange.
Each conflict is recorded in the log dre.log. You can read the log
entries and determine what, if any, action needs to be taken.
Messages similar to the following appear in the log. It contains the
type of conflict, the key of the record involved, and how the conflict
was resolved.
When a conflict occurs and a record must be overwritten, the newest
record is always used. To alter this behavior, you can register your
customized Event Handler DLL with the Replication Engine.
W 0130 0321-17:44:04 CONFLICT: Type I: Record 2 for
table Customer has been altered at both sites (key:
123).
W 0130 0321-17:44:04 Type I conflict resolved:
Record 2 will be updated at partner (Table Customer,
key: 123).
The log file of the Site where the record was not updated will contain
a message saying that the record at the partner Site was updated (as
above). At the Site where a record was overwritten messages similar
to the following indicate the data value that was updated as well as
A-17
Basic Troubleshooting
the new value (in this case the last name Yin was replaced by the last
name Yan:
I 0130 0321-17:44:04 Local field Customer.LastName
replaced by remote value
I 0130 0321-17:44:04 Before: Yin
I 0130 0321-17:44:04 After: Yan
Type I Conflict
A Type I conflict occurs when a record has been updated at both
Sites since the last replication session. When this occurs the newer
record is replicated and a log message similar to the following is
generated:
W 0130 0321-17:44:04 Type I conflict resolved:
Record 2 will be updated at partner (Table Customer,
key: 123).
A-18
Data Conflicts
Type V Conflict
Type V conflicts occur when there is an error with the starter data at
each Site (the data that already exists in the database when your
database application is activated).
If starter data exists at one Site and not at the other, the starter data
is replicated to the other site. If the existing starter data is different,
however, a type V conflict is logged and replication stops:
W 0130 0321-17:44:04 CONFLICT: Type V: Starter data
in record 2 for table Customer is different at the
two sites - the conflict must be resolved manually.
A-19
Basic Troubleshooting
Resolving The best way to avoid primary key conflicts is to design your source
Primary Key database with unique primary keys. If you are using an existing
Conflicts database for replication that does not have unique primary keys, you
can designate primary keys with the Pervasive PSQL Control Center.
A primary key conflict occurs when two rows have been inserted into
two different activated databases that have the same primary key.
Because each row could potentially have relevant data, the
replication engine stops the replication and will not modify these
rows.
You will see the following errors the DRE.log file on the system that
detects the primary key conflict. For this example, the primary key
conflict has been detected on the Region table of the sample database
Tracker.
E 01cb 1108-11:42:21 sqlhelp 852 ODBC Error -1:
(S1000) ‘[Pervasive][ODBC Client
Interface][LNA][Pervasive][ODBC Engine
Interface][Data Record Manager] The record has a
key field containing a duplicate value(Btrieve
Error 5)’ <-4994>
E 01cb 1108-11:42:21 dbutil 629 ODBC statement
failed: -1 from function Execute
E 01cb 1108-11:42:21 dbutil 636 ODBC statement:
INSERT INTO "Region" ("RegionID","NameStr") VALUES
(?,?)
E 01cb 1108-11:42:21 dsectbl 927 Unable to insert
new record into table Region having key: 8
E 01cb 1108-11:42:21 dresyncs5368 FSM:{22: An ODBC
error occurred}: Unable to store next
PD2PQQ88002.Region record from partner’s data list
(key:PDCID(1000010))
All other systems that attempt to replicate with this system will fail
with the Error:
A-20
Data Conflicts
Site 1 Site 2
8 Site1Data 8 Site2Data
Site 1 Site 2
8 Site1Data 8 Site2Data
A-21
Basic Troubleshooting
Site 1 Site 2
9 Site1Data 8 Site2Data
Site 1 Site 2
8 Site2Data 8 Site2Data
9 Site1Data 9 Site1Data
Now both sites are replicated to a consistent copy and no data has
been lost.
A-22
Notification Agent
Notification Agent
If the notification agent is not sending e-mail, check the following:
The agent is running as a service
The agent is correctly configured (see “dxagent” on page 7-34 in
Pervasive DataExchange User’s Guide)
The SMTP port through which the agent communicates does
not require authentication or encryption
Each replication machine with an agent has access to the SMTP
server
The SMTP server is set up to accept e-mail from each replication
site running the agent
Testing the Mail The SMTP mail server must also be functioning correctly. If
Server required, verify that the SMTP mail server is sending and receiving
e-mail correctly. Reference the documentation supplied for your
SMTP server software or check for testing procedures on vendor
Web sites.
A-23
Basic Troubleshooting
Pervasive Software Web site The Pervasive Software Web site http://www.pervasive.com
is a great source for everything
Pervasive PSQL.
A-24
How to Get Additional Help
Or telephone:
1 800 287 4383.
A-25
Basic Troubleshooting
A-26
appendix
B-1
Supported Data Types
Data Types
The following table lists the Pervasive PSQL data types supported by
Pervasive DataExchange.
Bit bool no
Numeric1 numeric no
Bigint1 numeric no
Ubigint1 numeric no
Currency1 numeric no
Longvarbinary blob no
Binary blob no
Longvarchar blob no
B-2
Data Types
Note :
1
Partially supported data type in Pervasive PSQL. Refer to the
appendix on Pervasive PSQL supported data types in the SQL
Engine Reference.
2
Limited to 255 characters.
3
Limited to 254 characters.
4Although Identity is supported in Pervasive DataExchange for
replication primary keys, using it for any part of a unique index
is strongly discouraged.
B-3
Supported Data Types
NUMERIC, The other data types that are implemented as NUMERICS cannot be
BIGINT, used as primary keys for replication. These include NUMERIC,
UBIGINT and BIGINT, UBIGINT, and CURRENCY.
CURRENCY
IDENTITY Although you may use IDENTITY data types for primary keys in
DataExchange, we strongly recommend that you not use this data
type as part of a unique index.
B-4
appendix
dVer dWSTS
C-1
Reserved Table Names
C-2
appendix
Advanced Topics
D
A Look at Advanced Topics for Pervasive DataExchange
D-1
Advanced Topics
How To The following steps explain how to perform a silent installation for a
Perform a First Site and a Partner Site.
Silent Install
Note Ensure that all Pervasive PSQL utilities, such as PCC, and
all applications that use Pervasive PSQL are closed before
performing a silent install.
D-2
Installing DataExchange as Part of Your Application
D-3
Advanced Topics
13 Delete setup.iss.
14 Add the contents of the temporary directory, with both of the
newly created ISS files, to your installation media.
15 Use the following commands to silently install DataExchange
from your media.
For a First Site: setup -sms /f1 first.iss /s (or whatever you
named the ISS file in step 7)
For a Partner Site: setup -sms /f1 partner.iss /s (or whatever
you named the ISS file in step 8)
D-4
appendix
Glossary
E
Replication Terminology
Accelerated In Btrieve 7.x, a file open mode that provides improved response
time over Normal mode when updating data files. However,
Accelerated mode disables the MicroKernel’s logging capability.
Therefore, the MicroKernel cannot guarantee transaction durability
or atomicity on files opened in Accelerated mode.
If you are using Btrieve 6.x, Accelerated mode is equivalent to
Normal mode, except that opening a data file in Accelerated mode
cancels the effect of flagging a file as transactional.
Control Table Each replicated table in the database has a control table associated
with it. Control tables store a record for each record in its
E-1
corresponding user table, and contain associated information such
as the creation date of the record, last change date for the record, and
so forth. By creating a control table for each replicated table,
Pervasive PSQL ensures that you do not have to make any changes
to your existing tables to enable replication.
DataExchange A graphical user interface tool for enabling your database for
Designer replication. DataExchange Designer allows you to enable all of
Pervasive DataExchange's features.
DataExchange A graphical user interface for managing tasks, users, and sites in a
Manager replication network. DataExchange Manager can:
Manage replication schedules
Manage site information
Manage local or remote sites
First Site Every replication network must have a First Site, which is the first
site to be activated for replication. The First Site contains
information about the whole replication network, such as, sites
available for replication, etc. It also contains a copy of the whole
database. Any other site in the replication network is a Partner Site.
Hub and Spoke A network configuration that consists of a centralized server that
maintains a complete copy of the database (the hub) and several
connected servers or workstations with subsets of the replication
data (spokes). The replication process typically consists of all spokes
replicating with the hub at a predetermined time. Then, upon this
successful initial replication, the updates are distributed to all spokes
via a second replication cycle from the hub to each spoke site.
E-2
In Place Activation of an existing database by either using a replication
Activation template or by using a design exported from a template.
Local Table A nonreplicated table. Each site can have different local tables.
N-Tiered A network configuration that is similar to hub and spoke, but with
additional levels (or tiers) in the network. An n-tiered configuration
can be thought of as a hub and spoke network, where the spoke sites
are also hub sites for the next tier in the configuration hierarchy.
Thus, a centralized server can replicate with three second tier server
sites, each of which, in turn, communicates with several desktop and
notebook machines.
N-tiered configurations allow some scalability that is not available in
hub and spoke networks. Configuring these network topologies and
balancing the load as the network grows requires some planning.
Partner Site Any site that is not the First Site in a replication network.
E-3
Refresh A term used for a mode of synchronization that involves
unidirectional flow of data, as opposed to the default bidirectional
flow of data commonly referred to as replication. A refresh is used to
manually override the conflict resolution rules by specifying a
prevailing site. For example, a “refresh local” operation overwrites
all local data with data from a specified site.
Replication The component that manages the replication process. All replication
Engine is performed in the background and can be fully automated
according to schedules that you define.
Pervasive Control Center contains the user interfaces to the
Replication Engine from which you can:
Remotely manage replication sites
View current state of replication nodes
Query history of replication activity
Provide multiple views of replication statistics and information
Filter replication messages/logs
E-4
one computer with its own local database
a local database shared by a local network
a large client/server database used by hundreds or thousands of
users
E-5
E-6
Index
Numerics database setting 8-9
Automating Replication
1-way method
with schedules 9-2
concepts 8-4
overview 5-2
selecting 8-3 B
2-machine configuration Basic concepts
for Real-Time Backup 4-2 of Pervasive DataExchange 2-1
2-way method Basic designs
concepts 8-4 concepts 8-4
overview 5-2 tasks to create 8-25
selecting 8-3 Bigint
data type B-4
A
Accelerated C
defined E-1 Change Apply
Accessing DataExchange Utilities defined E-1
from a command prompt 7-3 Change Capture
from Pervasive Control Center 7-4 defined E-1
Activate a Project Release utility Char
See Dxact.exe data type B-4
Activated Database Clear Log
defined E-1 log file actions 10-7
Activating Client DSN 2-7
project release 7-6 defined 2-7
template on first site 4-12, 5-28, 5-51 Command prompt
template on partner site 4-12, 5-29, 5-52 accessing utilities from 7-3
Activation 3-2 opening in Windows 7-4
DSN created 3-2 Command-line Utilities
First and Partner Sites 3-3 Dxact.exe 7-6
more information 3-4 Dxcleanup.exe 7-9
Adding new dynamic tables to an activated database Dxdeact.exe 7-11
3-20 DXDeploy.exe 7-13
Administrative tasks Dxdynpath.exe 7-15
in DataExchange Designer 8-31 Dxregevnt.exe 7-21
Advanced Topics Dxsynctables.exe 7-25
Silent Install D-1 Ffcopy.exe 7-26
Assigning Components
permissions 9-9 in DataExchange 1-4
Attributes Concepts
of XML Descriptor file 4-20 basic designs 8-4
Authentication Data Synchronization Edition 8-3
Index 1
database connection information 8-5 in DataExchange Designer 8-10
database identification 6-7, 8-5 setting in DataExchange Manager 9-14
network 8-6 setting in Designer 8-35
project 8-5 Custom.XML Descriptor file 5-35
release 8-6
database selection 8-4 D
DataExchange methods 8-5 Da.exe 7-31
1-way 8-4 See also DataExchange Manager
2-way 8-4 Da.log A-10
design completion 8-8 Data conflicts
initiate replication 10-4 with partner site activation A-15
network 6-8 Data dictionary files for DataExchange 7-20
Real-Time Backup Edition 8-2 Data recoverable but not current
release 6-8 in disaster recovery 4-26
replicated tables 8-7 Data Source Names
Configuration assigned during activation 3-2
for DataExchange Notification Agent 7-35 Data Source Names (DSNs) 2-7
for dynamic tables 7-15 Data Synchronization
for Real-Time Backup 4-2 basic design considerations 6-6
using many-to-one 4-3 database design overview 6-2
using multiple machines 4-3 DataExchange methods
using one-to-many 4-19 1-way 8-3
using two machines 4-2 2-way 8-3
Console Application concepts 8-3
Replication Engine 2-3 deployment models 5-1
Control Table additional information resources 5-4
cleanup (Dxcleanup.exe) 7-9 using DataExchange Designer and Utilities 5-
configuration (Dxcleanup.exe) 7-9 4
defined E-1 using Dxact.exe 5-4
Control Table Cleanup Configuration utility using DXDeploy.exe 5-3
See Dxcleanup.exe working with the examples 5-6
Copy deployment using Deployment Wizard 5-11
log file actions 10-7 design considerations 6-2
Copying example database design 6-1
files 7-26 security 6-10
flat files 7-26 Tracker sample database 6-11
Creating understanding database designs 6-1
design templates 8-30 Data Types B-2
new release of a design 8-31 bigint B-4
new replication database 8-25 char B-4
sample Tracker database currency B-4
from SQL 6-11 decimal B-4
Currency notes about B-4
data type B-4 numeric B-4
Current Log supported B-2
size A-9 ubigint B-4
2 Index
varchar B-4 replicating dynamically created tables 3-20
Data unrecoverable relative paths 7-20
in disaster recovery 4-25 types of expressions 7-18
Database verifying expression pattern matching 7-20
activation utility 7-6 reserved words C-1
connection information system table names C-1
concepts 8-5 table name limitations C-2
creating new replication 8-25 using 3-1
deactivation utility 7-11 DataExchange components
selection DataExchange Agent 1-4
concepts 8-4 Documentation 1-4
settings in DataExchange Designer 8-31 overview 1-4
Authentication 8-9 Replication Engine 1-2, 1-4
Information Files 8-9 Replication Event Handler (REH) 1-2, 1-4
Database Certification Information Utilities 1-4
viewing 8-33 DataExchange Designer 7-32
Database Design administrative tasks 8-31
considerations for Data Synchronization 6-6 database settings 8-31
for Data Synchronization 6-1 defined E-2
Database Engine deploying Real-Time Backup 4-7
checking status A-7 GUI icons 8-14
Database Identification logging 8-10
concepts 6-7, 8-5 main window visual reference 8-14
network 6-8, 8-6 menu and toolbar 8-16
project 6-7, 8-5 overview 8-2
release 6-8, 8-6 removing databases after deployment 5-8
Database Network Analysis (DNA) 3-2 replicated tables 6-9
Database network analyst concepts 8-7
See DNA See also Prd.exe
Database state setting preferences 8-10, 8-34
DNA 10-3 logging 8-10
Pure 10-3 wizard 8-10
Template 10-3 tasks
viewing 10-2 access the Database Settings 8-31
Databases create a new database for replication 8-25
named 2-7 create a new release of a design 8-31
Tracker create a replication template based on a design
creating from SQL 6-11 8-30
DataExchange designate settings for the startup wizard 8-34
(PDC) user table names C-1 designate tables for replication 8-28
Agent 7-34 designate tables not to be replicated 8-29
See also DXAgent.exe display Authentication Settings 8-32
data dictionary files 7-20 display help 8-24
notification agent 7-34 open an existing database for replication 8-27
communication protocol 7-35 set logging preferences 8-35
configuration 7-35 set preferences 8-34
Index 3
set the Information Files location 8-33 refresh view 9-16
start Designer as a stand-alone application 8- remove a site from replication network 9-20
24 restore a site to replication network 9-20
start Designer from PCC 8-24 set logging options 9-14
view Database Certification information 8-33 start from command prompt 9-12
view generated Verification Messages 8-34 start from PCC 9-12
templates 8-8 user information tab 9-7
troubleshooting multiple installations A-4 user membership tab 9-7
using for Data Synchronization deployments 5-4 DataExchange methods
DataExchange Documentation 1-5 1-way 8-3
DataExchange Editions 1-3 2-way 8-3
Data Synchronization 1-3, 8-3 concepts 8-5
Real-Time Backup 1-3, 8-2 DataExchange Monitoring Tools 7-32
DataExchange Manager 7-31 See also Pvreplcm.exe
defined E-2 tasks
GUI icons 9-9 view engine and service state 10-2
log 9-14 view the state of a database 10-2
logon DataExchange Template Remover Wizard
name 9-13 See also Trwizard.exe
password 9-13 DataExchange Utilities
main window visual reference 9-9 accessing 7-3
managing overview 1-4, 7-2
user permissions 9-9 when used 7-2
users 9-5 DBNAMES (Named Databases) 2-7
permissions 9-9 Deactivate a Project Release utility
replication schedules 9-2 See Dxdeact.exe
schedules 9-2 Deactivating
See also Da.exe project release 7-11
site information 9-3 Debug information
site information tab 9-4 logging in DataExchange Designer 8-10, 8-12, 8-
site list 9-3 35
site schedule tab 9-2 logging in DataExchange Manager 9-15
tasks 9-12 logging in DataExchange Monitoring Tools 10-
add new user 9-20 10
change logon password 9-14 Decimal
change replication schedule 9-19 data type B-4
change site information 9-19 implemented as numeric B-4
change user information 9-21 Deploy DataExchange utility
change user’s group membership 9-22 See DXDeploy.exe
connect as different user 9-13 Deploying
connect to different database 9-13 replication 7-13
create replication schedule 9-18 Deployment
delete a user 9-21 using Deployment Wizard
delete replication schedule 9-19 for Data Synchronization 5-11
display help 9-17 for Real-Time Backup 4-5
logging on 9-13 using Designer
4 Index
for Real-Time Backup 4-7 Documentation
using DXDeploy.exe for DataExchange 1-5
for many-to-one Real-Time Backup 4-18 for Pervasive System Analyzer A-6
for Real-Time Backup 4-6 Getting Started Guides 1-5
Deployment Models User’s Guide 1-5
for Data Synchronization Edition 5-1 Dre.log A-10
1-way using Designer 5-24 Dregdtk.log A-10
1-way using DXDeploy.exe 5-12 DSN 3-2
2-way using Designer 5-47 client
2-way using DXDeploy.exe 5-34 defined 2-7
using Deployment Wizard 5-11 engine
for Real-Time Backup Edition 4-1 defined 2-7
using DataExchange Designer 4-7 DSNs
using Deployment Wizard 4-5 created during activation 3-2
using DXDeploy.exe 4-6, 4-18, 4-20 created during design 3-2
Deployment Wizard 3-4 DX Designer
deploying Data Synchronization 5-11 See DataExchange Designer
deploying Real-Time Backup 4-5 DX Manager
Descriptor File See DataExchange Manager
attributes 4-20 DX Monitoring Tools
Custom.XML 5-35 See DataExchange Monitoring Tools
Express.XML 4-20, 5-13 Dxact.exe 3-4, 7-6
Design See also Utilities
DSN created 3-2 using for Data Synchronization deployments 5-4
Designer Dxact.log A-10
See DataExchange Designer DXAgent.exe 7-34
Designs not installed on Workgroup engine 2-5
basic See also Services
concepts 8-4 starting the service 2-5
tasks to create 8-25 stopping the service 2-5
completing DXAgentConfig XML file 7-35
concepts 8-8 Dxcleanup.exe 7-9
for Data Synchronization databases 6-1 See also Utilities
tasks to complete 8-30 Dxdeact.exe 7-11
Disaster Recovery See also Utilities
data recoverable but not current 4-26 Dxdeact.log A-10
failover 4-24 DXDeploy.exe 5-3, 7-13
for Real-Time Backup 4-24 removing databases after deployment 5-6
no data recoverable 4-25 See also Utilities
setting primary site back into replication 4-26 using in many-to-one configuration 4-20
setting up a new primary site 4-25 using with Data Synchronization deployments 5-
DNA database 3-2 3
database identification 8-6 using with Real-Time Backup 4-6, 4-18
defined E-2 Dxdeploy.exe 3-4
state 10-3 Dxdynpath utility 7-20
Dnewsite.log A-10 Dxdynpath.exe 7-15
Index 5
See also Utilities running DXDeploy.exe on 5-21, 5-44
Dxevent.log A-10 specifying in XML Descriptor file 5-16, 5-39
Dxregevnt.exe 7-21 Flat File Copy utility
See also Utilities See Ffcopy.exe
Dxsynctables.exe 7-25
See also Utilities G
Dxsynctables.log A-10 General tasks
Dynamic Table Configuration and Test utility in DataExchange Designer 8-24
See Dxdynpath.exe in DataExchange Manager 9-12
Dynamic Tables Getting Started Guides 1-5
configuration and test utility 7-15 Globally-Unique IDs
Dynamically created tables defined E-2
replicating 3-20 Glossary of terms E-1
Group By
E log view option 10-8
E-mail GUI-based Utilities
response to replication failure 7-34 Da.exe 7-31
Email Prd.exe 7-32
See E-mail ReplMonitor.exe 7-32
Encryption Trwizard.exe 7-32
defined E-2
Engine H
checking status A-8 Home directory for DataExchange DDFs 7-20
DSN 2-7 How to find
defined 2-7 information 1-5
replication (Replserv.exe) 2-2, 2-3 Hub and Spoke
Event Handler defined E-2
component of DataExchange 1-4
registering 7-21
Express.XML Descriptor file 4-20, 5-13
I
In Place Activation
defined E-3
F Index segments
Failover troubleshooting A-16
disaster recovery 4-24 Information
Failure notification 7-34 about Data Synchronization deployments 5-4
Ffcopy.exe 7-26 how to find 1-5
See also Utilities Information Files
Ffcopy.log A-10 database setting 8-9
Files Initiate Replication
copying utility 7-26 concepts 10-4
First Site Installation troubleshooting A-4
activating template on 4-12, 5-28, 5-51 Installing DataExchange
activation 3-3 as part of your application D-2
copying files from 5-28, 5-51 silently D-2
creating template on 4-8, 5-25, 5-48 troubleshooting A-4
defined E-2
6 Index
L Trace 8-12
Logon name for DataExchange Manager 9-13
Limitations
Logon password for DataExchange Manager 9-13
of DataExchange C-2
Local Table
defined E-3 M
Log File actions Managing
clear log 10-7 replication schedules 9-2
copy 10-7 site information 9-3
Log files users for DataExchange Manager 9-5
Da A-10 Many-to-One Configuration
Dnewsite A-10 for Real-Time-Backup 4-3
Dre A-10 Many-to-One Deployment
Dregdtk A-10 for Real-Time Backup
Dxact A-10 using DXDeploy.exe 4-18
Dxdeact A-10 Maximum Log Size
Dxevent A-10 logging option 8-13
Dxsynctables A-10 Maximum Logs to Keep
Ffcopy A-10 logging option 8-13
Mer A-10 Menu and toolbar
Msg A-10 for DataExchange Designer 8-16
Prd A-10 Mer.log A-10
Reh A-10 Messages, Verification
session A-10 viewing 8-34
setting Monitoring Tools
in DataExchange Designer 8-35 See DataExchange Monitoring Tools
setting in DataExchange Designer 8-10 Msg.log A-10
setting size A-9
used for troubleshooting A-9 N
Log options Name of Log File
setting 10-7 logging option 8-13
Log View options Named databases 2-7
group by 10-8 Network
Logging concepts 6-8, 8-6
on to DataExchange Manager 9-13 defined E-3, E-4
Logging Level Options 10-9 Network communications
Debug 10-10 testing A-6
Error 10-9 troubleshooting A-6
Information 10-9 Not Replicated Tables 8-29
Verbose Logging 10-10 Notification agent
Warning 10-9 troubleshooting A-23
Logging options Notification of replication failures 7-34
in DataExchange Designer 8-10, 8-12, 8-35 N-Tiered
in DataExchange Manager 9-14 defined E-3
Maximum Log Size 8-13 Numeric
Maximum logs to keep 8-13 data type B-4
Name of Log File 8-13 data type used for primary key B-4
Index 7
O managing 9-9
Pervasive DataExchange
ODBC
overview 1-2
defined E-3
overview of basic concepts 2-1
One-to-many
Pervasive PSQL
configuration 4-19
client, defined 2-7
Operations
server, defined 2-7
using DataExchange 3-1
Pervasive PSQL Engine
Options
checking status A-7
logging level 10-9
checking status of Server A-7
Debug 10-10
checking status of Workgroup A-7
Error 10-9
Pervasive PSQL Replication Service 7-37
Information 10-9
See also Replserv.exe
Verbose logging 10-10
Pervasive PSQL utilities
Warning 10-9
See Utilities
Overview
Pervasive System Analyzer
of 1-way method 5-2
documentation A-6
of 2-way method 5-2
starting A-6
of DataExchange Designer 8-2
using for troubleshooting A-6
of DataExchange Utilities 1-4, 7-2
Prd.exe 7-32
of Pervasive DataExchange 1-2, 2-1
See also DataExchange Designer
of Tracker example database design 6-2
Prd.log 8-10, A-10
of Utilities and Services 7-2
Preferences
setting in Designer 8-10
P Primary Keys
Partner Site resolving conflicts A-20
activating template on 4-12, 5-29, 5-52 Primary Site
copying files to 4-11, 5-28, 5-51 putting back into replication after disaster
copying template to 5-22, 5-45 recovery 4-26
data conflicts when activating A-15 setting up after disaster recovery 4-25
defined E-3 Project
running DXDeploy.exe on 5-23, 5-46 activation 7-6
specifying in XML Descriptor file 5-20, 5-42 concepts 6-7, 8-5
Partner Sites deactivation 7-11
activation 3-3 defined E-3
Password to log on to DataExchange Manager 9-14 deployment 7-13
Pattern matching Pure database
verifying 7-20 state 10-3
Peer-to-Peer Pvreplcm.exe
defined E-3 See also DataExchange Monitoring Tools
Performing actions
on the log file
clear log 10-7
R
Real-Time Backup
copy 10-7
concepts 8-2
Permissions
configuration 4-2
assigning
deployment models 4-1
in DataExchange Manager 9-9
8 Index
deployment using DataExchange Designer 4-7 See DataExchange Designer
deployment using Deployment Wizard 4-5 Replication Engine
deployment using DXDeploy.exe 4-6 checking status A-8
disaster recovery 4-24 defined E-4
no data recoverable 4-25 Replserv.exe 2-2, 2-3
disaster recovery failover 4-24 starting and stopping as a console application 2-3
many-to-one configuration 4-3 starting manually 2-3
many-to-one deployment starting the service 2-2
using DXDeploy.exe 4-18, 4-20 stopping the service 2-2
multiple machine configuration 4-3 Replication Progress and Log Viewers 7-32
recovering from data loss 4-24 Replication schedules
two-machine configuration 4-2 automating 9-2
Refresh Replication System Table Names
defined E-4 limitations C-2
option in Designer 8-19 Replication Templates
view in DataExchange Manager 9-16 See Templates
Register Event Handler utility Replication terminology
See Dxregevnt.exe defined E-1
Registering Replication Tools
event handler 7-21 See Utilities
REH ReplMonitor.exe 7-32
See also Dxregevnt.exe Replserv.exe 2-2, 2-3, 7-37
Reh.log A-10 Replserv.exeSee also Services
Relative path for DataExchange DDFs 7-20 Reserved words C-1
Release 8-6 Resources
concepts 6-8 for troubleshooting A-2
defined E-4 Restoring
Release name 8-6 a site to replication network 9-4
Removing
a site from replication network 9-4 S
databases deployed with Designer 5-8 Sample Tracker Database 6-11
databases deployed with DXDeploy.exe 5-6 creating with SQL Editor 6-11
Replace Data on Local Site with Data from Selected Saving
Site 10-5 design templates 8-8
Replicate Data Between Source and Selected Sites 10- Schedule tasks
5 in DataExchange Manager 9-18
Replicated Tables Schedules
concepts 8-7 managing for replication 9-2
Replication Schedules, using to automate replication 9-2
automating with schedules 9-2 Scheduling replication 9-2
defined E-4 Security
deployment utility 7-13 in Data Synchronization 6-10
initiating 10-4 Services
removing a site from network 9-4 DXAgent.exe 2-5, 7-34
restoring a site to network 9-4 overview 7-2
Replication Designer Pervasive DataExchange 7-2
Index 9
Replication Engine 2-2 Subscriptions
Replserv.exe 7-37 defined E-5
See also Notification agent Synchronization
Services, terminal of tables 7-25
installation issues A-4 System database
Session log files A-10 DNA 3-2
Setting System Failure
Designer preferences 8-10, 8-34 recovering from in Real-Time Backup 4-24
Designer settings 8-31
logging options T
in DataExchange Designer 8-10 Tabbed work areas
in DataExchange Manager 9-14 in DataExchange Designer
startup wizard settings 8-34 Logging 8-35
Settings Not Replicated tab 8-22
Authentication 8-32 Replicated tab 8-22
Information Files location 8-33 Wizard 8-34
Show Wizard on Startup 8-34 in DataExchange Manager
Silent Install D-2 Site Information 9-4
Simple mail transfer protocol Site Schedule 9-2
See DataExchange notification agent User Information 9-7
Site User Membership 9-7
defined E-4 Table designs
information 9-3 completing 8-8
setting primary back into replication 4-26 Table Names
setting up new primary 4-25 limitations C-2
Site information tasks Table Synchronization and Check utility
in DataExchange Manager 9-19 See dxsynctables.exe
Site List Tables
in DataExchange Manager 9-3 checking utility 7-25
SMTP designate for replication 8-28
See DataExchange notification agent Not Replicated 8-29
SQL Editor Replicated 8-28
used to create Tracker sample database 6-11 synchronization utility 7-25
Starter data 8-8 Tasks
Starting in DataExchange Designer 8-23
DXAgent service 2-5 administrative 8-31
Replication Engine basic designs 8-25
as a console application 2-3 design completion 8-30
as a service 2-2 general 8-24
manually 2-3 in DataExchange Manager 9-12
Statistics and Log Views command 5-4 general 9-12
Stopping schedule 9-18
DXAgent service 2-5 site information 9-19
Replication Engine user 9-20
as a console application 2-3 Technical Support A-25
as a service 2-2 Template database
10 Index
state 10-3 See also DataExchange Template Remover
Template Descriptor Files Wizard
Custom.XML 5-35 Two-machine configuration
Express.XML 4-20, 5-13 for Real-Time Backup 4-2
Template Remover Wizard 7-32
Templates U
concepts 8-8 Ubigint
creating for replication 8-30 data type B-4
defined E-4 Understanding
Terminal Services Data Synchronization database designs 6-1
troubleshooting installation of A-4 Uninstalling
Terminology DataExchange A-5
used in DataExchange E-1 User tasks
Testing in DataExchange Manager 9-20
dymanic tables 7-15 User’s Guide 1-5
network connectivity A-6 Users
Tools assigning permissions 9-9
See Utilities for DataExchange Manager 9-5
Trace information tab in DataExchange Manager 9-7
logging option 8-12 membership tab in DataExchange Manager 9-7
Tracker sample database Utilities
creating from SQL 6-11 accessing from a command prompt 7-3
Tracker.SQL accessing from Pervasive Control Center 7-4
using to create sample database 6-11 command-line
Troubleshooting Dxact.exe 7-6
data conflicts when activating partner sites A-15 Dxcleanup.exe 7-9
index segments A-16 Dxdeact.exe 7-11
installation issues A-4 DXDeploy.exe 7-13
installation of multiple DataExchange Designers Dxdynpath.exe 7-15
A-4 Dxregevnt.exe 7-21
installation of terminal services A-4 Dxsynctables.exe 7-25
network connectivity A-6 Ffcopy.exe 7-26
primary key conflicts A-20 DataExchange 1-4
resources A-2 GUI-based
strategies A-3 Da.exe 7-31
uninstalling issues A-5 Prd.exe 7-32
using log files A-9 ReplMonitor.exe 7-32
using Pervasive System Analyzer A-6 Trwizard.exe 7-32
verifying database engine is running A-7 overview 7-2
verifying Pervasive PSQL Server engine is running Pervasive DataExchange 7-2
A-7 replication stages used in 7-2
verifying Pervasive PSQL Workgroup engine is used in Data Synchronization deployments 5-4
running A-7 Designer 5-4
verifying replication engine is running A-8 Dxact.exe 5-4
Trwizard.exe 7-32 Utility
to verify pattern matching 7-20
Index 11
V
Varchar
data type B-4
Verbose Logging
option in DataExchange Designer 8-12
option in DataExchange Manager 9-16
option in DataExchange Monitoring Tools 10-10
option used in troubleshooting A-9
Verification Messages
viewing 8-34
Verifying
regular expression patterns 7-20
status of database engine A-7
status of replication engine A-8
Viewing
Database Certification Information 8-33
Verification Messages 8-34
W
Words
reserved C-1
Workgroup Engine
DXAgent.exe not installed 2-5
Working with the Examples
in Data Synchronization 5-6
X
XML Configuration File
DXAgentConfig.XML 7-35
XML Descriptor File
attributes 4-20
Custom.XML 5-35
Express.XML 4-20, 5-13
specifying First Site 5-16, 5-39
specifying Partner Site 5-20, 5-42
12 Index