A WAN configuration for Pro2 and your OpenEdge application is best suited for cloud-based business solutions across multiple geographies. For example, assume that you have OpenEdge applications and databases spread across the US, Europe, and Asia, with a consolidated Microsoft SQL Server database in the US that is used for reporting and analytics. In this configuration, the source databases spread across the globe communicate with an application server that in turn, sends data to the target Microsoft SQL Server database.

You can install Pro2 along side of OpenEdge during your initial setup and configuration, or you can install Pro2 as an add-on to complement your OpenEdge environment later on. Installing Pro2 as an add-on can be especially useful when you are upgrading OpenEdge versions, or need to migrate databases. For more information about database migration, see Migrate your OpenEdge database with Pro2.

If you are installing Pro2 along with OpenEdge, then you will need to first install and configure OpenEdge, after the installation and configuration is complete, you then install and configure Pro2.

The Pro2 WAN configuration setup differs from the LAN configuration process in that, after the initial installation of Pro2, you must configure the application server before you can set replication configurations for your Pro2 instances. Moreover, unlike the LAN configuration, the source database does not directly communicate changes to the replication and target databases. The source database is connected to a Progress Application Server instance, which is then connected to an empty synchronized-copy of the replication database that connects to the Pro2 facing replication database.

System requirements

The specifications for a Pro2 server are generally the same whether server is a physical or virtual machine. Because are determined by the OS being loaded on the box. However the following is a general idea of new specifications.
  • Minimum 2 processors.
  • Memory: If using a 64-bit operating system, use 8 gigabytes of RAM.
    Note: If your machine also hosts a SQL server, then use a 64-bit platform with a minimum 8 gig of memory.
  • Network speed: minimum 1 gigabit per second.
  • Disk: 50 gigabytes of allocated space. This allocation is for both the installation and for any content generated by Pro2, such as log files.
    Note: If your machine also hosts a SQL Server database, then the size of the SQL Server database will be approximately twice the size of the Progress data space requirements.
    Note: In either a physical or virtual environment it is recommended to spread the I/O. On a physical machine this means separating the operating system/Pro2 and/or SQL database onto separate physical drives. This is the same for a virtual machine the where “disks” become multi-VMDK file (Virtual Machine Disk). For example separate the operating system and Pro2 installation onto separate VMDK files.

These are minimum recommendations. All parameters can be increased to accommodate more robust hardware.

Note: Additionally, during your planning phase, it is important to understand that the Pro2 database uses large object data types. By default, CLOB fields are set to Latin-1 and basic collation by default. Adjust these settings to support your requirements before loading the Pro2 .df file.

For more information about OpenEdge system requirements, see the Progress Platform Compatibility Guide.

Before you begin

Ensure that you have OpenEdge installed and configured on the same machine as Pro2. For more information about installing OpenEdge, see Install OpenEdge on Windows.

Main steps to install and configure Pro2

  1. Install Pro2 by using the installation wizard.
  2. Create and configure a WAN side repl database.
  3. Create and configure the WAN application server.
  4. Create a Pro2 side repl and Pro2 database.
  5. Create an empty local copy of the source database.
  6. Start the PAS for OpenEdge instance for the Pro2 web user interface.
  7. Load the configuration file.
  8. Connect to your WAN application server instance.
  9. Start the job runner.
  10. Add the source database details.
  11. Generate and load the source schema file.
  12. Add the target database details.
  13. Create the target database.
  14. Create a schema holder for your target database.
  15. Generate the target schema file.
  16. Load the target database table file.
  17. Map the tables in the source database to the target database.
  18. Generate the replication code based on your configuration.

Install Pro2

  1. Close all applications before beginning the installation.
  2. Locate and execute the Pro2.exe file.
    There can be a numeric value in the file name that indicates the version of Pro2, for example, Pro2-6.5.0.exe.
    Note: Starting with Pro2 6.5.2, after locating the Pro2.exe file, run the following command from the command prompt:
    Pro2.exe LAX_VM "C:\<JAVA_HOME>\bin\java.exe"
    The supported Java version is Java 11 and Java 17.
  3. In the Pro2 installation wizard, click Next. The Choose the Install Folderscreen appears.
  4. Specify the path or click Choose to browse and select where you want to install Pro2.

    The default installation directory is C:\Progress\Pro2.

  5. In the Choose OpenEdge window, specify the path, or select Choose to browse and set the OpenEdge home directory.

    The OpenEdge home directory is where OpenEdge is installed on your machine.

    The default directory is C:\Progress\OpenEdge.

  6. On the PAS Ports screen, enter the relevant PAS for OpenEdge information in the Port and Instance Name fields.

    The default instance name is Pro2Web. You can change this name to according to your needs. It is recommended to change the instance name for each Pro2 installation.

    Note: For each installation of Pro2, you must specify different port information. No two installations can use the same ports on the same machine.
  7. Click Next and review the options you chose for this installation on the Pre-Installation Summary page.
  8. Click Install to continue with the installation process.
    Note: The Pro2 installation wizard can take several minutes to complete and may appear to lag at times. Allow the installation wizard to complete before prematurely canceling the process.
  9. Click Done to finish the installation process.
  10. Check the installation logs at C:\Progress\Pro2\install\logs folder.

After the installation is complete, go to the Pro2 AS_Src root folder to continue the configuration process. If you used the default settings during the installation, then this folder would be C:\Progress\Pro2\bprelp\AppSrv\AS_Src. Copy this folder to the machine where you have your source database, and rename the folder.

All files, scripts, and procedures for Pro2 are relative to the root folder. This allows for Pro2 to be installed several times on the same drive without each installation interfering with each other. This functionality was designed to allow you the be able to create development and production environments to test implementations as needed without the risk affecting your production environment.

Create and configure a Repl database for WAN

On this step of the configuration process you create a WAN side Repl database. This Repl database is hosted on the same machine as your source database and communicates directly with the source database and the WAN application server.

It is important to note that this procedure describes the high level steps to create the WAN side Repl database. Later in the configuration process, you will need to create another Repl database on the same machine as your Pro2 database and Pro2 installation. When creating these databases every consideration and precaution should be taken, as if you were creating a database for an enterprise application in a production environment, to ensure their availability. Without these databases, data is not replicated from your source database to your target database. This can cause loss of synchronization.

  1. On you source database machine, where you have just copied the AS_Src root folder to, open a Proenv instance.
  2. Set your working directory to the db folder in the WAN Pro2 root directory.
    Note: Check the directory of the db folder to view the database instances. Type dir after navigating to the database folder.
  3. Create an empty Repl database instance by entering the following command prodb repl empty.
    Note: Ensure that the you set the code page of the Repl database to match the code page of your source and target databases.
  4. In the WAN Pro2 root directory, go the scripts folder bprepl\scripts and add the application server connection details to the AppSrv.pf file to connect the replication threads and PAS for OpenEdge or classic application server instance to the Repl database and your source database. Add the complete path of the databases in the file and click Save.
  5. Load the table definitions file in the Repl database by first entering prowin repl -1.

    The Procedure Editor window appears.

  6. Navigate to Tools > Data Administration.
  7. In the Data Administration window, navigate to Admin > Load Data and Definitions > Data Definitions (.df file)….
  8. In the Load Data Definitions window, load the repl.df file and click OK.
    Note: The repl.df file is located in Pro2 folder/db.
  9. Start the Repl database by entering: Proserve repl
  10. To confirm that the Repl database is connected, open the Pro2 Editor from the bprepl\Scripts folder and navigate to Tools > Data Dictionary. If the connection is successful, the Tables section displays the tables.

Create and configure a WAN application server

Creating your WAN application server can vary widely depending on your specific business needs and application environment. In general, creating a PAS for OpenEdge instance involves defining a name and location for the instance as well as defining various configuration properties. When you create an instance, the properties of the instance are automatically set to the directory where the new instance is created and the related files and logs are stored. The following properties are set when the new instance is created and can be controlled by the system administrator:

  • The environment variables and paths for running commands
  • The HTTP and HTTPS transports, and ports
  • The username and password for the instance
  • The type of instance (development or production)

For more information about PAS for OpenEdge, see Learn about PAS for OpenEdge administration.

To create and configure a WAN application server:

  1. On your source database machine, open a Proenv instance.
  2. Use the pasman create command to create an application server instants. For example
    pasman create -p 11000 -P 11001 -s 11002 P2WAN
    • On Windows, a shutdown port, set by the -s option, is required.

    • The -p (lower case) option specifies the HTTP port. The default is 8810.
    • The -P (upper case) option specifies the HTTPS port. The default is 8811.
    • In this example, the instance-path or instance-name is P2WAN
  3. Go to the instance-path for your application server using the cd command, for example:
    cd P2WAN
    Note: The absolute paths mentioned in the following steps serve as examples, and their configuration paths may vary.
  4. (Optional) Add OpenEdge Management to your instance if your business needs require, for example:

    bin\tcman.bat deploy C:\Progress\OpenEdge\servers\pasoe\extras\oemanager.war

    Note: Within a Proenv session, in Windows, you may utilize %DLC% instead of C:\Progress\OpenEdge. In Unix, you may utilize $DLC.
  5. (Optional) Add the PAS for OpenEdge Health scanner to your instance if you want to use it health monitoring capabilities, for example:

    bin\tcman.bat deploy C:\Progress\OpenEdge\servers\pasoe\extras\oehealth.war

  6. Use the oeprop command to set the application server project directory to the WAN root folder, for example:

    bin\oeprop AppServer.Agent.PROPATH="C:\Pro2Wan_Scr, C:\Pro2Wan_Scr\pbrepl,${CATALINA_BASE}/OPENEDGE,${DLC}/tty,${DLC}/tty/netlib/OpenEdge.Net.pl"

  7. Use the oeprop command to set the work directory to the WAN root folder, for example:

    bin\oeprop AppServer.Agent.workDir="C:\Pro2Wan_Src"

  8. Set the instance-path project directory by using the oeprop command, for example:

    bin\oeprop AppServer.Agent.P2WAN.PROPATH="C:\Pro2Wan_Src,C:\Pro2Wan_Src\bprepl,$(CATALINA_BASE)/webapps/pro2/WEB-INF/openedge,${CATALINA_BASE}"

  9. Set the start up parameters by using the oeprop command to point to the AppSrv.pf file:

    bin\oeprop AppServer.SessMgr.P2WAN.agentStartupParam="-T C:\Pro2Wan-Src\tmp -pf bprepl\scripts\AppSrv.pf"

  10. Designate which application server adapters are to be enabled are to be enabled, for example:
    bin\oeprop P2WAN.ROOT.APSV.adapterEnabled=1
    bin\oeprop P2WAN.ROOT.REST.adapterEnabled=0
    bin\oeprop P2WAN.ROOT.SOAP.adapterEnabled=0
    bin\oeprop P2WAN.ROOT.WEB.adapterEnabled=0
  11. Test your PAS for OpenEdge instance with the pasman test -I instance name command, for example:

    pasman test -I P2WAN

  12. After the test is successfully completed, use the pasman pasoestart -restart -I instance name command to restart your instance for example:

    pasman pasoestart -restart -I P2WAN

For more information about the OpenEdge properties command (oeprop), see OEPROP.

Note: Depending on your business needs, it may be useful to configure your PAS for OpenEdge instance as a Windows service. For more information about running PAS for OpenEdge instance as a Windows service, see Register and manage an instance as a Windows service.

Create a Repl and Pro2 database:

While similar to the Repl database that you created earlier, this Repl database is hosted on the same machine as your Pro2 installation. You build a Repl database by using Proenv commands and the repl.df file.

Before you create your replication database, navigate back to the machine where you have Pro2 installed. This machine should be different than your source database machine where your PAS for OpenEdge instance is configured.

Standard OpenEdge database utilities are used to create the Repl database. The structure file (.st) and schema definition file (.df) used to create the Repl database can be found in the db folder of the Pro2 root folder. If you are using replication triggers with a LAN configuration, all configuration files, parameter (.pf) files, and scripts need to be modified to include a connection to the Repl database wherever there is a connection made to the source database. Change data capture (CDC) is not affected by this requirement.

It is important to note that this procedure describes the high level steps to create the Repl and Pro2 databases. When creating these databases every consideration and precaution should be taken, as if you were creating a database for an enterprise application in a production environment, to ensure their availability. Without these databases, data is not replicated from your source database to your target database. This can cause loss of synchronization.

Confer with your database administrator and other key stakeholders to when creating the Repl and Pro2 database for your production environment. For more information about database administration, see OpenEdge database essentials.

To create a Repl and Pro2 database:

  1. Open a Proenv instance.
  2. Set your working directory to the db folder in the Pro2 root directory.
    Note: Check the directory of the db folder to view the database instances. Type dir after navigating to the database folder.
  3. Create an empty repl database instance by typing the following command prodb repl empty.
  4. Create an empty Pro2 database instance by typing the following command prodb pro2 empty.
    Note: Ensure that the you set the code page of the Repl and Pro2 databases to match the code page of your source and target databases.
  5. Load the table definitions file in the Repl database by typing prowin repl -1.

    The Procedure Editor window appears.

  6. Navigate to Tools > Data Administration.
  7. In the Data Administration window, navigate to Admin > Load Data and Definitions > Data Definitions (.df file)….
  8. In the Load Data Definitions window, load the repl.df file and click OK.
    Note: The repl.df file is located in the db folder of the Pro2 root folder.
  9. Load table definitions in the Pro2 database by entering prowin pro2 -1 -p _admin.

    The Data Administration window appears.

  10. In the Data Administration window, navigate to Admin > Load Data and Definitions > Data Definitions (.df file).
  11. In the Load Data Definitions window, load the pro2.df file and click OK.
    Note: The pro2.df file is located in Pro2 folder/db.
  12. Start the repl and pro2 databases by typing:
    • Proserve repl
    • Proserve pro2
  13. Add the Pro2 database connection details to the replProc.pf file in the Pro2 root folder under \bprepl\Scripts\replProc.pf to connect the replication threads and PAS for OpenEdge instance to the Pro2 database. Navigate to the bprepl\scripts folder and open the replProc.pf file. Add the complete path of the database in the file and click Save.
    The following is the example.pf parameter file that you can use as a reference for database connections in Pro2.
    # Example PF File for Database Connections for Pro2 Tool
    # Actual .pf file should be named after the logical name
    #  for the Source database connection.
    
    # Source Databases go here (Required for MSS/ORACLE/PROGRESS as target type).
    -db example -ld example -H remotehost -S src-port
    
    # Schema Holder Databases go here.
    # If not built yet then just comment out all lines. (Required for MSS/ORA/PROGRESS as target type)
    -db c:\Pro2SQL\db\exsh -ld examplesh -RO
    
    # Schema Images go here.
    # If not imported yet, then just comment out all lines.
      -db exodbc 							# Required MSS/ORA
      -ld examplesql 						# Required MSS/ORA
      
        # Required MSS/ORA value should be (MSS/ORACLE)
    	# For Oracle Target type need to enter username and password
    	
      -dt <TGT_TYPE> -U Username -P Password
      -Dsrv QT_CACHE_SIZE,30000  			#Required for MSS and ORA target type in other type just comment it 
      -Dsrv TXN_ISOLATION,1      			#Required for MSS target type in other type just comment it
    # -Dsrv BINDING,0 						#Removed for v11
      -Dsrv AUTOCOMMIT,1            		#Required for MSS target type only
      -Dsrv PRGRS_PREPCACHE,100				#Required for MSS target type only
      -Dsrv MSS_PRESERVE_CURS,1				#Required for MSS target type only
      -Dsrv PRGRS_LOCK_ERRORS,08501			#Required for MSS target type only
      -Dsrv logginglevel,0,svub,1   		#This will reduce the DataServer Log output Required for ORA/MSS
      
    	#Added below to release locks earlier
      -Dsrv PRGRS_NATIVE_LOCKWAIT,0 		#Required for MSS target type only
      -Dsrv PRGRS_NOWAIT_OVERRIDE,1   		#Required for MSS target type only
  14. To check that both the Repl and Pro2 database instances are connected, open the Pro2 Editor from the bprepl\Scripts folder and navigate to Tools > Data Dictionary. If the connection is successful, then the Tables section displays the tables.

Create an empty local copy of the source database

  1. On your Pro2 machine, open a Proenv instance.
  2. Set your working directory to Pro2 folder/db.
  3. Use the prodb command to create an empty copy of your source database, for example:

    prodb source database name empty

  4. Start the database copy by entering proserve source database name.
  5. Add the source database connection details to the replProc.pf file in the Pro2 root folder under \bprepl\Scripts\replProc.pf to connect the replication threads and PAS for OpenEdge instance to the Pro2 database. Navigate to the bprepl\scripts folder and open the replProc.pf file. Add the complete path of the database in the file and click Save.
  6. To check Repl and Pro2 database instances are connected successfully, open the Pro2 Editor from the bprepl\Scripts folder and navigate to Tools > Data Dictionary. If the connection is successful, the Tables section displays the tables.

Embed the repl tables (optional)

You can choose to embed the repl tables into your source and source copy database. Embedding the repl tables into the source database and source copy database can simplify implementation. If the repl tables are embedded, no additional database connection is be required. One major reason to choose to keep repl as a stand-alone database is to simplify schema updates made by the application provider to the source database. Pro2 works the same whether the repl tables are embedded or in a separate stand-alone database.

If you choose to embed the repl tables in the source database, you must also embed them in the source database copy to be in sync. You need to preform the following procedure for both the source database and the source database copy. To embed the repl tables in a database:
  1. Shut down the database.
  2. Add the Repl structure to the database:

    prostrct add db name repladd.st

  3. Load the repl.df to the database.

    Both repladd.st and repl.df are available in the folder where Pro2 is installed.

  4. Open Pro2\predefs.i and configure the Embedded_ReplTables and ReplDB settings.
    The unmodified settings are as follows:
    &GLOBAL-DEFINE Embedded_ReplTables /*CREATE ALIAS Repl FOR DATABASE {Source-dbname}.*/
    &GLOBAL-DEFINE ReplDB Repl. /*This line and Embedded_ReplTables line need to be changed for embedded repl */
    1. Embedded_ReplTables:

      Uncomment the CREATE ALIAS section for Embedded_ReplTables.

      Replace {Source-dbname} with the name of the database.

      For example:

      &GLOBAL-DEFINE Embedded_ReplTables CREATE ALIAS Repl FOR DATABASE sports.

    2. ReplDB:

      Replace Repl with the name of the database.

      For example:

      &GLOBAL-DEFINE ReplDB sports. /*This line and Embedded_ReplTables line need to be changed for embedded repl */

Start the PAS for OpenEdge instance and log in to the Pro2 web application

Now that the database instances are set up successfully, start the PAS OpenEdge instance and log in to the Pro2 web application.

  1. Start a Proenv instance.
  2. Navigate to the Pro2 folder by entering cd followed by name of the folder where you installed Pro2, for example, cd Pro2v62.
  3. Enter instance name\bin\tcman.bat env.
    Note: The default instance name is Pro2Web.
  4. Type instance name\bin\tcman.bat start.
  5. To verify that the instance started successfully, type instance name\bin\tcman.bat env. The server running section shows a number if the instance started.
  6. Open any browser and log in at localhost:port number/pro2/static/ using the login credentials, where the default username and password are both set to admin.
    Note: It is strongly recommended to change the default credentials immediately after the initial login. Update the password to a strong, unique value to prevent unauthorized access and ensure security.

Load the configuration file

Before you set up the source and target database connections in the user interface, you must set up a basic configuration by loading the default configuration file. The configuration file consists of all the default properties and records that are necessary to set up the Pro2 environment.
Note: If you use Internet Explorer to load the configuration file, you may encounter errors. To avoid them, use an alternative web browser like Google Chrome.

To load the configuration file:

  1. In the Pro2 web interface, navigate to Actions > Tools > Load Configuration.
  2. Click Select Files and load the .ini configuration file, for example replbasev610.ini, from the Pro2 folder.
  3. Click Submit. A success or failure notification is displayed after the upload is complete.

You can view the default properties and records on the Properties tab after the configuration file is successfully loaded.

Connect to your WAN application server instance

After the properties are loaded, you must connect to your WAN PAS for OpenEdge instance from the Pro2 user interface.

To connect to your WAN instance:
  1. In the Pro2 user interface, click Settings from the side menu.
  2. Select LAN/WAN from the options.
  3. Choose WAN.
  4. Enter your application server details and click Submit when complete. The Pro2\predefs.i file is updated.

Start the job runner

To start the job runner and initiate the scheduled Enterprise Push job, use the following procedure:
  1. Navigate to the Pro2 Scripts folder, for example: C:\Pro2\bprepl\Scripts.
  2. Select and execute the jobrunner.bat file.
  3. Navigate back to the web interface and confirm that the jobrunner.bat is running by checking the status in the Pending Jobs watch-box.

Add the source database details

You can set up either trigger-based replication or CDC-based replication. In a trigger-based-replication, the replication queue records (also known as ReplQueue records) are generated by deploying Pro2 triggers on a source database. In a CDC-based replication the ReplQueue records are generated from change tracking table. However, for CDC-based replication, the source database must be CDC enabled.

To add source database details:

  1. From the Pro2 web interface, navigate to the Manage Replication tab.
  2. Click New.

    The Create Replication window appears.

  3. (Optional) Enter your User Name and Password.
    Note: Enter your user name and password only if it is required by your source database.
  4. Select Test Connection.

    If the test is successful, move on to set the target database. Review your source database details to ensure they are correct.

  5. Click Next.

Generate and load the source schema file

By generating the source schema file, you build the files necessary to enable your local empty copy of your source database to communicate with the application server-side source database.

To generate and load the source schema file:
  1. On the Generate Source Schema tab, click Generate Source Schema.
  2. After the source schema is generated, click the Download Schema files and download all available files.
  3. Copy and paste the source schema file database name_REM_AREAS.df in the db folder of Pro2.
  4. Open a Proenv instance and enter the command prowin database name for the local empty copy of source database.
  5. In the Procedure Editor, select Tools > Data Administration.
  6. Select Admin > Load Data and Definitions > Data Definitions (.df file)
  7. Add the source schema file as the Input File and click OK.
  8. Navigate to the Pro2 web interface and click Next.

Add the target database details

The target database can be either a Microsoft SQL Server, Oracle database, or OpenEdge database. If your target database is an OpenEdge database, the you can forgo some of the configuration processes like generating the schema holder. However, there for a Microsoft SQL Server or Oracle database there are several configuration considerations to take into account. For more information about configuring Microsoft SQL Server or Oracle as a target database, see Configure Pro2 to target SQL database connectivity.

To add target database details:

  1. Select Target Database Type. Choose Microsoft SQL Server, Oracle database, or OpenEdge databases.
  2. Following fields are automatically filled, but can be changed if necessary
    • Target Database Name
    • Target Schema Image
    • Schema Holder DB
    • Target ODBC Connection
  3. (Optional) Enter your user name and password.
    Note: Entering your user name and password only if it is required by your target database.
  4. Click Next.

    The Generate Target Schema tab appears.

Generate the target schema file

By generating the target schema file, you load the target database with files necessary to build out the target database. Pro2 reads the source database schema, and generates scripts that are then executed on the target database server to create the target schema. By default, all tables and fields are created in the target. The rest of the files (drop.sql, index.sql, trunc.sql, errors.log, and warnings.log) are created separately. You can execute these files as necessary. Typically, tables that are not replicated remain unmapped.

Pro2 reads the source Progress schema and generates scripts that are then executed on the target database server to create the target schema. By default, all tables and fields are created in the target. Typically, tables not replicated remain in the target bur are simply not mapped for replication, however, if it is desired that the tables do not exist at all on the target side, the generated scripts can be edited to remove the pertinent statements.

To generate target schema file:

  1. Click Generate Target Schema. A table that contains a replication job appears.
    Note: Do not execute this job until you run the job runner file. A job runner batch file continuously processes replication jobs from the job queue. This file is in the Scripts folder.
  2. Click Download under the Download Schema files column, to download the target schema files.

Create a target database

If you have not done so already, create a target database for you replicated data. The target database can be either a Microsoft SQL Server, Oracle, or OpenEdge database. Creating a target database will depend largely on they type of database you want to use and your development tooling. The following lists the general steps to create your target database:

  1. In your database admin tool, like Microsoft SQL server Management Studio, create a new database and give it a name.
  2. Create a new database query, and load the schema file into the query.

For more information about target databases, see

Create a schema holder for your target database

An empty OpenEdge database is created to act as the schema holder for the Microsoft SQL Server or an Oracle database. The schema holder is the layer that allows ABL to interact with the Microsoft SQL Server or Oracle database as though it were a native OpenEdge database.

To create a schema holder:

  1. Open a Proenv window, and type prodb database name empty to create an empty schema holder database.
  2. Start a single user session by typing prowin database name -1.

    The Procedure Editor window appears.

  3. From the Procedure Editor, select Tools > Data Administration.
  4. Select DataServer > database type Utilities > Create DataServer Schema .

    The Create/Modify Record for Schema window appears.

  5. Specify the Logical Database Name.
  6. If the source database is a SQL Server, specify the ODBC Data Source Name. Click OK.
  7. Enter the login ID and password if required in the next dialog box and click OK.
  8. Enter criteria for Object Name, Object Owner (typically, dbo), and Qualifier.
  9. Select the Default to OpenEdge DATETIME option.
  10. If you are using LOB fields in replication, ensure that the Default to OpenEdge LOB for BLOBs option is selected along with the CLOBs option. This forces the data server to automatically consider certain target side data types to be treated as LOBs.

    By selecting CLOBs, varchar(max)/nvarchar(max) data types are automatically converted to CLOBs. By selecting BLOBs the data server is forced to consider all varbinary(max) as BLOBs. On source fields that are character types, Pro2 may convert some types to varchar(max) when the source width is wider than the MAX_CHAR_WIDTH property setting. This conversion has the added benefit of avoiding row size limits for SQL Servers. However, varchar(max)/nvarchar(max) are not necessarily treated as CLOBs.



  11. Click OK to finish.

Load the target database table definitions

After the target schema file is downloaded, load the target database with the appropriate tables required for replication.

For OpenEdge target databases:

  1. Copy and paste the target schema file in the db folder of Pro2.
  2. Open a Proenv window, enter prowin target database name.
  3. In the Procedure Editor, select Tools > Data Administration.
  4. Select Admin > Load Data and Definitions > Data Definitions (.df file)
  5. Add the target schema fileas the Input File and click OK.
  6. Navigate to the Pro2 web interface and click Next.

    The Mapping Source to Target Tables tab appears.

For Microsoft SQL Server or Oracle target databases:
  1. Open a Proenv window, type prowin database name -1 and press Enter.

    The Procedure Editor window appears.

  2. Select Tools > Data Administration.
  3. Select Database > Select Working Database.
  4. Click OK. The Data Administration window appears.
  5. Select DataServer > database type Utilities > Update/Add Table Definitions…

    The Pre-Selection Criteria for Schema Pull window appears.

  6. Enter dbo for the Owner, select the Default to OpenEdge DATETIME and Default to OpenEdge LOB for: CLOBs and BLOBs checkboxes. Click OK.

    The Select database type Objects window appears.

  7. Click Select Some....

    The Select Objects by Pattern Match window appears.

  8. Enter dbo for the Owner, table as the Object Type, and click OK.
  9. Truncate the database name database to restrict operations in this database. This database should be a read-only database. Enter the following command in the Proenv window.

    proutil database name -C truncate bi

  10. Navigate to the Pro2 web interface and click Next.

    The Mapping Source to Target Tables tab appears.

Map tables and fields

You must map data fields between your source and target database so that data in the source can be replicated to the target. You can do this from the Mapping dashboard in the web interface. The repl database contains all the mapping information for the replication of the databases, tables, and fields between the source and target. This information is stored in the ReplDBXref, ReplTableXref, and ReplFieldXref tables. Mapping information can be saved to and loaded from a text file.

Depending on the number of schemas, primary keys, and foreign keys of the databases, the data sources and the database mapping information has varying degrees of complexity.

Map source tables to target tables and generate code

To map source tables to target tables and generate code:

  1. On the Mapping Source to Target Tables tab, select the tables from the source database that you want to map with the target database. You can map the tables in the following ways:
    • Map—Choose the Map option if you want to map a single source table with a single target table.
    • Automap—Choose the Automap option if you want to map one or more source tables to the corresponding target tables.
    Note: You can also unmap the tables based on your needs using the Unmap option.
  2. Select the tables to map, click Automap, and click Next.
  3. In the Advanced Configuration tab, change thread assignments and other optional control flags if required.
    Note: The Advanced Configuration tab is an optional settings tab.
  4. Click Next.

    The Generate Code tab appears.

  5. Click Generate Code. You are directed to the Pro2 web interface dashboard. Click the Pending Jobs watch-box to see which replication jobs are running.
  6. Run the replication file to execute the replication jobs. In Windows Explorer, navigate to \bprepl\Scripts.
  7. Double-click the Replbatch1.bat file.

    The corresponding replication thread starts running on the Dashboard.

    Note: In a CDC-based replication, double-click the CDCbatch.bat file.
  8. Refresh the Pro2 user interface to complete the replication configuration process.

Manually test a replication

Testing is an important part of any enterprise applications configuration process. Consider an testing example where a city is assigned to a customer. This change is made in the source database, and needs to be replicated to the target database. To perform the test scenario:

  1. In a Proenv window, navigate to your Pro2 root folder. For example, C:\Pro2v62\db.
  2. Enter the command prowin -db database name -db repl.

    The Procedure Editor window appears.

  3. Assign city to the first customer in source database.
    FIND FIRST customer
    ASSIGN city = “NY”
    
  4. Open the Pro2 web interface and click the Total Threads watch-box. Notice the event type in the Replication thread window. This event will show the recent change made to the source database.


  5. Run the replication file by navigating to \bprepl\Scripts .
  6. Double click the Replbatch1.bat file to run the replication thread. This action removes the event type in the replication thread which implies that the replication record is processed by the replication thread and sent to the target database.


Directory reference

The following is a description of the folders under the Pro2 root folder.

Folder Description
bprepl Root directory for application programs.
bprepl\AppSrv Used in WAN implementations.
bprepl\common This folder contains common files used across Pro2.
bprepl\datasets Used to support the acquisition of data sets from the database.
bprepl\images Image files that can be used for shortcut icons.
bprepl\misc Miscellaneous replication files and procedures.
bprepl\PRO2_REST Contains files to support the user interface.
bprepl\repl_as_tgt Used in WAN implementations.
bprepl\repl_d Directory for the Pro2 generated database replication delete trigger procedures.
bprepl\repl_export Used in WAN bulk loads.
bprepl\repl_inc Directory for Pro2 generated assign include files.
bprepl\repl_jtrig Directory for any java triggers.
bprepl\repl_log Default location of log files.
bprepl\repl_mgtrig Directory listing tables that require merged triggers.
bprepl\repl_mlog Location for bulk load logs.
bprepl\repl_mproc Directory for the Pro2 generated bulk copy procedures.
bprepl\repl_mproclog Location for bulk load program logs.
bprepl\repl_pf Directory for application server and repl .pf files.
bprepl\repl_pro2dbtrigs Directory for Pro2 database trigger files.
bprepl\repl_proc Directory for the Pro2 generated replication library
bprepl\repl_sql Directory for SQL replication procedures.
bprepl\repl_tmpl Directory containing the templates used for various code generation. Contains the ReplLogCheck ErrorTriggers.lst files.
bprepl\repl_w Directory for Pro2 generated database replication write trigger procedures.
bprepl\replcdc_proc Directory for Pro2 CDC replication procedures.
bprepl\Scripts Directory containing the .pf files, scripts, and shortcuts to start various Pro2 functions.
bprepl\SQL_inc Directory for the direct SQL assign include files.
bprepl\SQL_mproc Directory for the direct SQL bulk copy procedures.
bprepl\SQL_proc Directory for the direct SQL replication procedures.
bprepl\custom Directory to deploy your customized code so that it overrides the existing code in the bprepl folder.
Note: This folder must maintain the bprepl folder structure and is applicable for both LAN and WAN configurations.
db Location of schema holder database(s). Also, the initial temporary location for repl database during implementation.
Docs Contains various read me files for Pro2.
Downloads Initially empty. Used to save site-specific downloads.
misc Miscellaneous Pro2 utilities.
PASOE Directory for the PAS for OpenEdge instance associated with your Pro2 deployment.
tmp Miscellaneous Pro2 temporary files used during implementation.
utils Directory for various replication procedures.

ReplProperties and ReplQueue

The OpenEdge replication source database and target database tables are stored in property files. There are configuration settings whose values you set in these tables that control different aspects of your replication environment. The following are the tables for the Pro2 replication environment:
  • ReplProperties—Configuration settings such as log file location, logical delete tables, and specification of procedure templates are stored in the ReplProperties table. Configuration settings can be saved to and loaded from a text file from the New button in the Manage Replication window on the Pro2 web interface.
  • ReplQueue—Information about change events is stored in the ReplQueue table. This information includes the ROWID of the record changed, event date, time, and queue thread. Typically, repl queue records represent updates made to the source database that are waiting to be written to the target SQL database.