Preparing to Install Pervasive DataExchange. This chapter provides important information including system requirements and platform specific notes that are relevant to your operation.
1
3 Double-click REG_DWORD for the key.
4
5 Click OK.The REG_DWORD value should read 0x00000000 (0).Note Changing this registry setting to zero grants Pervasive PSQL administrative authority to everyone who has access to the Terminal Server client machine. To restrict Pervasive PSQL administrative authority, you may want to restore the default value of the registry setting after DataExchange is installed. To do this, change the REG_DWORD value back to 1 (see step 4 in To modify the security registry setting on a Terminal Server client).If your backup machine lacks a Pervasive PSQL database engine, install one from your original CD media or download the Pervasive PSQL product from http://www.pervasive.com. For installation steps, see Chapter 4, “Installing Pervasive PSQL with No Previous Installation,” in the Getting Started With Pervasive PSQL guide for your product (Server or Workgroup).DataExchange installs a notification service called dxagent if the machine contains the Pervasive PSQL Server product. This notification agent is not available if you install DataExchange on a machine with the Pervasive PSQL Workgroup product. See dxagent in Pervasive DataExchange User’s Guide.
If the installation does not start automatically, run the following command from the operating system: drive:\setup where drive is the drive letter of your CD-ROM device.
2 Click Next.At the end of the evaluation period, the replication engine returns an error when it tries to start. You may apply a license key at any time. See To upgrade an evaluation license.
5 Click Next.
7 Click Next, then continue as follows:
To install a First Site, Click Yes if you have not installed a First Site on your replication network and continue with the next step. Otherwise, click No.
8 Click Next.
The Site Name identifies your machine on the replication network. The name can be whatever you want. Accept the default or enter a more descriptive site name.
The Host Name identifies this machine to the DataExchange Engine. If your machine has a fixed IP address and you prefer to use it, enter it here. If the address is assigned by DHCP, accept the machine host name by default.
9 Click Next.
10
11 Click Finish.
If you chose to view the readme file, it appears in a browser window. You must close the browser window to exit setup.
If you cleared the View the readme file option, setup exits.Pervasive DataExchange files are no longer installed to <drive>:\pvsw\bin. This change comes as Pervasive Software adopts the same program and security guidelines established by Microsoft for its current operating systems.
Windows Vista and later1 (64-bit) <drive:>\ProgramData\Pervasive Software\PSQL\Replication <drive:>\Program Files\Pervasive Software\PSQL\BIN <drive:>\Program Files (x86)\Pervasive Software\PSQL\Replication<drive:>\Program Files (x86)\Pervasive Software\PSQL\BIN Windows pre-Vista2 (64-bit) <drive:>\Documents and Settings\All Users\Application Data\Pervasive Software\PSQL\Replication <drive:>\Program Files\Pervasive Software\PSQL\BIN <drive:>\Program Files (x86)\Pervasive Software\PSQL\Replication<drive:>\Program Files (x86)\Pervasive Software\PSQL\BIN Windows Vista and later1(32-bit) <drive:>\Program Data\Pervasive Software\PSQL\Replication <drive:>\Program Files\Pervasive Software\PSQL\Replication Windows pre-Vista2 (32-bit) <drive:>\Documents and Settings\All Users\Application Data\Pervasive Software\PSQL\Replication <drive:>\Program Files\Pervasive Software\PSQL\Replication Note: The DataExchange Event Handler files are installed on all 64-bit platforms at <drive:>\Program Files\Pervasive Software\PSQL\BIN1 Windows Vista and later refers to Windows Vista and any Windows operating system released after Windows Vista that is currently supported by Pervasive PSQL.2 Windows pre-Vista refers to any Windows operating system currently supported by Pervasive PSQL that was released prior to Windows Vista.The uninstall program removes all DataExchange components from your system. Uninstall removes databases registered by Pervasive PSQL that are located under <Installation Directory >\Replication.The uninstall program does not remove any databases that were created in locations other than under <Installation Directory >\Replication. It also does not remove the DSNs and database names associated with these databases.
Deactivate each database with the dxdeact utility. For an example of deactivating a database, see Removing the Example Deployed Database. See also dxdeact in Pervasive DataExchange User’s Guide.
Remove the template with Template Remover wizard. For an example of using the wizard, see Removing the Example Deployed Database. See also trwizard in Pervasive DataExchange User’s Guide.Note You are not required to uninstall DataExchange before upgrading it. If you want to upgrade DataExchange, see Upgrading Pervasive DataExchange. An uninstall removes all DataExchange design and activated database information from your system. Uninstalling requires that you redesign your replication databases.
1 Access the Add/Remove Programs from the Control Panel on your Windows operating system.
2 Click Pervasive DataExchange in the list.
3 Click the button to remove a program. The button may be labelled Add/Remove or Remove. The program to uninstall Pervasive DataExchange begins.
4 Click OK in response to the message about completely removing DataExchange.
5
6 Click OK when the uninstall program completes.The procedures in this tutorial are covered in more detail in Pervasive DataExchange User’s Guide.
4 The easiest way to understand the process is to perform an example deployment using the sample database Demodata. The example concentrates on what to do. You can then learn about why you perform certain actions by reading Working with Your Database.The procedures in this section present do not explain why you do things so that you can concentrate on what to do. The intent is to quickly deploy Demodata for replication. After you’ve seen what to do, read the next section, Working with Your Database to understand the why.To do so, in PCC right-click DefaultDB and select Properties. Click the Security tab, select the checkbox Disable database security, and click Apply. If you’re not logged in to DefaultDB, provide the master password. Click OK. Remember to reenable security for DefaultDB after you complete the example deployment.If you want to retain security and deploy Demodata, see Pervasive PSQL Security in Pervasive DataExchange User’s Guide.Before you work through this example, be sure you’ve already installed both a First Site and a Partner Site (backup site) as explained in Installing Pervasive DataExchange:
1
2 Open the XML descriptor file EXPRESS.XML in a text editor.
3 Save EXPRESS.XML as ExampleRTB.xml.You may save the file to the location you choose on your First Site machine. This example uses C:\<Installation Directory >\Replication\Docs.<First
ServerName="db_server1"For First Servername, change DataDirectory="C:\MYDATA"> to DataDirectory="C:\<Installation Directory >\Demodata">.<First
ServerName="db_server1"
DSN="DXDatabase"
DataDirectory="C:\<Installation Directory >\Demodata">The Demodata data files contain a file extension .mkd. Therefore, keep the line <Include Path="*.mkd" />.Because Demodata has data dictionary files (DDFs), keep <Include Path="*.ddf" />. Typically you want to replicate DDFs. Note that the DSN created by DXdeploy does not use Demodata DDFs but uses its own in replication.Change remote.hostname to your site name or IP address. For example, if the Partner Site machine is db_server2:<Partner
ServerName="db_server2"For partner server name, change DataDirectory="C:\MYDATA" /> to DataDirectory="C:\Demodata" />.Note The data directory on the Partner Site could be C:\<Installation Directory >\Demodata if you want to overwrite the sample database. This example uses a different directory to preserve the Demodata sample database as installed by Pervasive PSQL.
2 Press Enter.More detailed messages are written to dxdeploy.log, located in the folder <Installation Directory >\Replication\LogFiles. To view these messages on-screen while DXdeploy runs, you can use the /LOGFILE= option. For example, DXdeploy /Site=First /LOGFILE= ExampleRTB.xml. A space follows the equal sign after LOGFILE=.
1 Start PCC if it is not already running. (Select Control Center & Documentation from the operating system Start menu or Start screen.)
1 From the First Site, copy the file C:\<Installation Directory >\Replication\Docs\ExampleRTB.xml to the same folder on the Partner Site.
3 Copy the contents of the First Site folder C:\<Installation Directory >\Replication\Templates\DXDatabase to C:\Demodata on the Partner Site.Note Demodata files reside in a relative location that can be wherever you choose on the Partner Site. Your application may require absolute paths to certain data files. See File Copying for details.
2 Press Enter.More detailed messages are written to dxdeploy.log, located in the folder <Installation Directory >\Replication\LogFiles. To view these messages on-screen while DXdeploy runs, you can use the /LOGFILE= option. For example, DXdeploy /Site=Partner /LOGFILE= ExampleRTB.xml. A space follows the equal sign after LOGFILE=.
Task 1: Deactivate the example database on both sites
1 On the First Site machine, open a command prompt.
2 Type DXdeact DXDatabase
3 Press Enter.
4 Repeat these steps at a command prompt on the Partner Site.
2 Click Next.
3 In the templates pane, click LOCAL:DXDATABASE.
4 Select Remove DataExchange System Tables and click Yes in the warning message to confirm that you wish to continue.
5 Select Remove DSN and database name.
6 Click Next.
7 Click Close.
1 On the First Site, find the DX_projectname directory under C:\<Installation Directory >\Demodata that was created during deployment.DX_projectname is the name given to your replication project in the XML deployment file, in this case DXProj in the following line in ExampleRTB.xml:
2 Delete the folder \<Installation Directory >\Demodata\DX_DXProj.
3
1 On the Partner Site, start PCC if it is not already running. (Select Control Center & Documentation from the operating system Start menu or Start screen.)
2
3 Click Yes.
4 Verify that DXDatabase is the database name selected.
5 For the option Always remove associated DSN entries, do one of the following:
6 Click OK.
7 To complete removal of the deployed replication database on the Partner Site, delete the directory C:\Demodata. This was the directory created in Task 4: Copy the Template to the Partner Site.
4 Determine which tables need to be replicated. Consider any situations in which tables created dynamically also need to be replicated. See Adding Dynamic Tables to an Activated Database, in Pervasive DataExchange User’s Guide.You specify the tables to be replicated in the XML deployment descriptor file. See XML Deployment Descriptor File.Among other information, the statistics output informs you about system data and key. If the output shows that System Data = Yes and SYSKEY Status = Present, then system data and key is present.If the existing database does not have system keys, you must add system data and keys with the Pervasive PSQL Rebuild utility. Refer to the Rebuild Utility chapter in the Pervasive PSQL Advanced Operations Guide.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. For more details, see also the chapter on Pervasive PSQL Security in the Pervasive PSQL Advanced Operations Guide.The XML deployment descriptor file is a text file in which you specify information for the DXdeploy utility. For real-time backup between two machines, you use the descriptor file EXPRESS.XML. This file is located in the \<Installation Directory >\Replication\Docs folder.You must edit the XML file for your situation. The following table explains the attributes in the XML file that may require editing. The default value for some of the attributes may be adequate as is. With the exception of Exclude Path, DXdeploy requires all of the attributes. DXdeploy is further discussed in Pervasive DataExchange User’s Guide. See dxdeploy.
Project often 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 that helps you remember which database is involved.
• Relative paths are relative to DataDirectory listed in the <Sites> section of the XML file.
• This attribute specifies the root for relative paths in Include Path and Exclude Path. DataDirectory must begin with a drive letter.DataDirectory in First Servername applies to the First Site. DataDirectory in Partner Servername applies to the Partner Site. After you edit the XML descriptor file, you run the DXdeploy utility on the First Site. The utility creates a template of the source data files. (Hereafter, for ease of discussion, the source data files will be referred to collectively as the source database.)You use a template to activate a database. Activation is the process of enabling a database for replication and establishing it as belonging to a site. DXdeploy also activates the source database on the First Site.
An activated database is placed in a folder named DX_projectname, which is subordinate to the source database folder. All templates are placed in the <Installation Directory >\Replication\Templates folder.
• <Installation Directory >\Replication\Templates\
mydbdsn — This folder contains the empty data files produced from the source data files. The empty files are considered part of the template. Also in this folder is a copy of the XML descriptor file.
• <Installation Directory >\Replication\Templates\
mydbdsn\DX_myproject — This folder contains the remaining replication-enabled files, such as the control tables.
DX_projectname subdirectory:
<Installation Directory >
Replication
Templates
mydbdsn
mydatabase
DX_projectname After the template is copied to the Partner Site and DXdeploy activates it on the First Site, activate the Partner Site. Run DXdeploy with the same XML deployment descriptor file used for the First Site. The edited file is found in the database directory under <Installation Directory >\Replication\Templates, which in the example above would be \<Installation Directory >\Replication\Templates\mydbdsn\mydatabase.Following deployment, you may want to set up a replication schedule to initiate replication. A replication schedule periodically keeps the Partner Site data concurrent with the First Site data. See Schedule Tasks in Pervasive DataExchange User’s Guide for how to set up a replication schedule.