Runtime File Setup

A deployed BTR2SQL application requires a small set of files to function. This page lists every file, explains where to place it, and describes its purpose.

Required Files

File

Location

Purpose

Mertech driver DLL

Application directory

The replacement driver DLL your application loads instead of the original Btrieve engine. Choose the DLL that matches your application’s bitness:

  • 32-bit: w3btrv7.dll or wbtrv32.dll — from deploy\<backend>\

  • 64-bit: w64btrv.dll or wbtrv64.dll — from deploy\<backend>\x64\

where <backend> is mssql, oracle, or pgsql.

License file (sql_btr.cfg, ora_btr.cfg, or pgs_btr.cfg)

Application directory (must be on system PATH)

Contains your BTR2SQL license. The driver will not load without a valid license file.

.INT files

Data directory (or a shared folder specified by INT-Folder in mds.ini)

Intermediate files created during migration. One per migrated table. Contains the schema mapping the driver needs at runtime.

mds.ini

Data directory

Per-folder configuration defining the SQL connection (server, database, schema, credentials). Settings are inherited from parent folders.

mds_global.ini

Application directory (same folder as the DLL)

Application-wide settings: tracing, locking, performance tuning, caching. Optional but recommended.

Note

The original Btrieve data files (.mkd, .dat, etc.) and DDFs are not required on deployed machines. They are only needed during migration.

SQL Client Libraries

The SQL client libraries for your chosen backend must be installed on each machine running the application. The client libraries must match the bitness of the Mertech driver DLL (32-bit driver requires 32-bit client libraries; 64-bit driver requires 64-bit client libraries).

  • MS SQL Server — Use the MSOLEDBSQL Client software. See the Supported Platforms section for details.

  • Oracle — Requires OCI.dll and its dependencies, included with the Oracle client software.

  • PostgreSQL — DLLs are installed in <Program Files>\Mertech Data Systems\DB Drivers\Btrieve\clients\pgsql. Copy them to your application’s bin folder or ensure they are on the system PATH.

Network Share Deployments

Some deployments run the application from a network location, or keep files such as the Mertech driver DLL, the license file, or SQL client libraries on a shared folder that is included on the system PATH. This can work, but it requires extra care.

  • Make sure users have the required share and NTFS permissions for every referenced file and folder. In practice this means read access to configuration and license files, and read/execute access to the application EXE, the Mertech driver DLL, and any SQL client libraries.

  • If the license file is stored on a network share, make sure all client machines can open it at startup and that the share allows concurrent read access by multiple users at the same time.

  • Windows applies additional security scrutiny to libraries loaded from remote or untrusted locations. Microsoft documents this in Dynamic-Link Library Security and in its Insecure Library Loading Could Allow Remote Code Execution advisory. Depending on system policy and how the share is classified, DLLs on network locations may be blocked or may fail to load.

  • For best reliability, keep the Mertech driver DLL and required SQL client libraries on the local machine whenever possible. Use shared locations only when the permissions, PATH configuration, and Windows security policy have been validated.

Directory Layout Example

A typical deployment directory structure looks like this (using PostgreSQL as an example):

C:\Program Files\YourCompany\YourApp\
├── bin\
│   ├── yourapp.exe            # Your application
│   ├── w3btrv7.dll            # Mertech replacement driver (32-bit)
│   ├── pgs_btr.cfg            # License file
│   ├── mds_global.ini         # Global driver settings
│   ├── libpq.dll              # PostgreSQL client libraries
│   ├── libintl-9.dll          #   (must be in the same folder
│   ├── libcrypto-3-x64.dll    #    as the driver DLL or on
│   └── libssl-3-x64.dll       #    the system PATH)
└── data\
    ├── mds.ini                # Connection settings for this folder
    ├── CUSTOMERS.INT           # INT file for CUSTOMERS table
    ├── ORDERS.INT              # INT file for ORDERS table
    └── INVENTORY.INT           # INT file for INVENTORY table

Important

Don’t forget to include the SQL client library DLLs. This is a commonly missed step that will cause the driver to fail at runtime. Copy them into the same folder as the Mertech driver DLL (typically your application’s bin folder).

File Placement Rules

Driver DLL

Place in the application directory so it is found before any other version on the system PATH. This guarantees the correct version is loaded. A shared network location can work, but a local copy is preferred because Windows security policy and network-share permissions can interfere with DLL loading. See Before You Begin for prerequisite details.

License file

Must be discoverable on the system PATH. The simplest approach is to place it alongside the driver DLL in the application directory. If you keep a single license file on a shared network location, make sure all clients have read access and that the share supports simultaneous access by multiple clients.

INT files

By default, the driver looks for each INT file alongside the corresponding data file reference. If you want to consolidate INT files in a single folder, set the INT-Folder token in mds.ini.

mds.ini

Place one in each data directory, or use folder inheritance to share a single mds.ini at a common root. Connection credentials can be encrypted using MdsEncryptPassword or stored in Windows Credential Manager.

mds_global.ini

Place in the same directory as the driver DLL. The driver searches for it in a specific order — see the mds_global.ini documentation for the full search path.

See also