Pervasive DataExchange Basics

Pervasive DataExchange Basics
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
Depending on the Pervasive PSQL product, the DataExchange Replication Engine runs as a service or a console application. It can be accessed from Pervasive Control Center (PCC). This section covers starting and stopping the engine in all three cases.
As a Service
Pervasive DataExchange (REPLSERV.EXE) runs as a service on the machine where Pervasive PSQL Server is installed. It is a single executable that runs under the Windows Service Control Manager. It is configured by default to run when the system starts under the LocalSystem account, which should be adequate for most systems. You can, however, change the account in the Startup Parameters dialog for the service.
*
1
Access the Services functionality from the operating system.
2
Select the Pervasive PSQL Replication icon.
3
*
Select Action then Start.
*
Open the icon and click Start under Service Status.
*
*
1
Access the Services functionality from the operating system.
2
Select the Pervasive PSQL Replication icon.
3
*
Select Action then Stop.
*
Double-click the icon and click Stop under Service Status.
*
As a Console Application
Pervasive DataExchange Engine (REPLSERV.EXE) runs as a console application on all platforms if Pervasive PSQL Workgroup engine is installed. The application appears as an icon in the taskbar system tray .
By default, Replication Engine starts when the system starts. You can also start it manually.
*
1
Select Replication Engine from the operating system Start menu or Start screen.
*
1
2
Select Stop Engine and Exit.
From Pervasive Control Center
*
1
Start PCC if it is not already running. (Select Control Center & Documentation from the operating system Start menu or Start screen.)
In the Engines branch, the Replication icon shows a red dot to indicate the Replication Engine is stopped.
2
3
Right-click Pervasive Replication and select Start Service.
Mapache01
M
In the Engines branch, the Replication icon shows a green arrow to indicate the Replication Engine is running.
*
1
Start PCC if it is not already running. (Select Control Center & Documentation from the operating system Start menu or Start screen.)
In the Engines branch, the Replication icon shows a green arrow to indicate the Replication Engine is running.
2
3
In the Engines branch, the Replication icon shows a red dot to indicate the Replication Engine is stopped.
Starting and Stopping the DXAgent Service
Pervasive DataExchange Agent runs as a service. It can be accessed from Pervasive Control Center (PCC). This section covers stopping and starting the agent as a service and from PCC.
As a Service
Pervasive DataExchange (DXAGENT.EXE) runs as a service on the machine where Pervasive PSQL Server is installed. It is a single executable that runs under the Windows Service Control Manager. It is configured by default to run when the system starts under the LocalSystem account, which should be adequate for most systems. You can, however, change the account in the Startup Parameters dialog for the service.
*
1
Access the Services functionality from the operating system.
2
Select the Pervasive DataExchange Agent icon.
3
*
Select Action then Start.
*
Double-click the icon and click Start under Service Status.
*
*
1
Access the Services functionality from the operating system.
2
Select the Pervasive DataExchange Agent icon.
3
*
Select Action then Stop.
*
Double-click the icon and click Stop under Service Status.
*
Note DXAgent.exe is not installed with the Workgroup engine.
From Pervasive Control Center
*
1
Start PCC if it is not already running. (Select Control Center & Documentation from the operating system Start menu or Start screen.)
2
3
In the Services branch, the service icon shows green to indicate DXAgent is running.
*
1
Start PCC if it is not already running. (Select Control Center & Documentation from the operating system Start menu or Start screen.)
2
3
In the Services branch, the service icon shows red to indicate DXAgent is not running.
ODBC Basic Concepts
Pervasive PSQL follows the Microsoft standard for ODBC database connections. According to the standard, applications must connect to databases through Data Source Names (DSNs) defined in the operating system.
Every Pervasive PSQL database that you expect to access using ODBC must have a Data Source Name (DSN) available on the same computer as the database engine, and (if applicable) another DSN on the client computer. The only exceptions are Pervasive tools, which can access remote databases without using DSNs on the client computer. A DSN created on the same machine as the database engine is called an Engine DSN. A DSN created on the client machine is called a Client DSN.
Note Pervasive PSQL databases that are accessed only through Btrieve do not need DSNs. However, in this case, the database is not visible in PCC nor can it be manipulated using PCC. Pervasive recommends using Data Dictionary Files (DDFs) and DSNs with all databases, including ones accessed only through Btrieve, to make them easier to manipulate.
Servers and Clients
Every Pervasive PSQL server engine or workgroup engine includes a 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 Names
In a client-server architecture, each data set must have a well-known name. A DSN is a well-known name for a data set. There are generally three ways to create DSNs:
*
*
*
Components of a Database Name
There are two components of a database name. Pervasive PSQL uses an internal Database Name (DBNAME) to identify the location of the Data Dictionary Files (DDFs) and the data files for each database. An ODBC Data Source Name (DSN) entry refers to one DBNAME.
You may set up more than one DSN that refers to the same DBNAME. If the physical location of the data files on the server is changed, only the DBNAME needs to be updated. All DSNs remain unchanged.
Pervasive PSQL Security
If you are replicating a database with Pervasive PSQL Security enabled, you will be required to supply a user name and password. The user name defaults to Master, which cannot be changed. You enable security in PCC before designing a template for replication.
Note In order to add Pervasive PSQL security to an already activated database, you must first deactivate the database at all sites before adding security. Once Pervasive PSQL security has been added (via PCC) you will then need to reactivate the database.
Deploying Demodata Under Pervasive PSQL Security
Pervasive PSQL provides security models for Btrieve applications. However, the activated databases created by DXdeploy do not contain security, even if the source database does. You may add security to a replication database if you choose. See Pervasive PSQL Security in Pervasive DataExchange User’s Guide. See also the chapter on Pervasive PSQL Security in the Pervasive PSQL Advanced Operations Guide for details.
Getting Started with Pervasive DataExchange (Real-Time Backup Edition) explains how to deploy the sample database Demodata under the Classic security model. If you are using either the Database security model or the Mixed model and you want to retain security, you must ensure that Demodata can be deployed.
The following table explains the high-level actions required to deploy Demodata. Perform the appropriate actions on both the First Site and the Partner Site before attempting the example deployment. See Working with the Demodata Sample Database in Getting Started with Pervasive DataExchange (Real-Time Backup Edition).
 
Add the Demodata directory (for example, <drive>:\Documents and Settings\All Users\Application Data\Pervasive Software\PSQL\Demodata) to the data file locations for DefaultDB.
Add the templates directory (for example, <Installation Directory >\Replication\Templates to the data file locations for DefaultDB.
In PCC Configuration for Server Access, set Prompt for Client Credentials to On. You may accomplish the same thing by using the Pervasive PSQL command-line utility pvnetpass. See the Pervasive PSQL Pervasive PSQL User's Guide for details about pvnetpass.
Add the Demodata directory (for example, <drive>:\Documents and Settings\All Users\Application Data\Pervasive Software\PSQL\Demodata) to the data file locations for DefaultDB.
Add the templates directory (for example, <Installation Directory >\Replication\Templates to the data file locations for DefaultDB.
In PCC, click Users for DefaultDB. Right-click the Public user, then click Properties.
Click the Permissions tab. Grant all permissions for Public, then click OK.
For information on the types of security available, see the chapter “Pervasive PSQL Security” in the Pervasive PSQL documentation.