XML Structure Overview¶
Basic Structure¶
A migration XML file has the following general structure:
<?xml version="1.0" encoding="utf-8"?>
<Btrieve2SqlFullMigration Driver="SQL_BTR">
<!-- Global defaults (optional, empty Name applies to all tables) -->
<Table Name="" Schema="dbo" OverwriteExistingTable="y">
<MSSQLBulkCopy BulkCopyByRowCount="500" LockTable="y"/>
</Table>
<!-- Individual table definitions -->
<Table Name="MyTable" Filename="myfile.dat" Schema="dbo">
<Fields>
<Field Name="ID" BtrDataType="15" Offset="0" Size="4" />
<Field Name="Name" BtrDataType="0" Offset="4" Size="50" />
</Fields>
<Indices>
<Index Number="0" Unique="y" PrimaryKey="y">
<Segment Number="1" Field="ID" />
</Index>
</Indices>
</Table>
</Btrieve2SqlFullMigration>
Choosing the Right Variant¶
Btrieve2SqlMigration (With DDFs)¶
Use this variant when:
Your Btrieve files have associated DDF (Data Definition Files).
You only need to override specific settings (e.g., change a field’s default value or mark an index as the primary key).
You do not need to define every field and index — the DDFs supply the base definitions.
The root element is <Btrieve2SqlMigration>.
Btrieve2SqlFullMigration (Without DDFs)¶
Use this variant when:
No DDFs are available for the Btrieve files.
You need complete control over every field definition, data type, offset, and size.
The XML is generated by the BTR2SQL conversion tools.
The root element is <Btrieve2SqlFullMigration>.
Element Hierarchy¶
The following diagram shows the complete element hierarchy:
Btrieve2SqlMigration (or Btrieve2SqlFullMigration)
└── Table (one or more)
├── MSSQLBulkCopy (MSSQL only, optional)
├── OracleTableSpaces (Oracle only, optional)
├── OracleTableStorage (Oracle only, optional)
├── Fields (optional for DDF variant; required for Full)
│ └── Field (one or more)
└── Indices (optional)
└── Index (one or more)
└── Segment (one or more)
Global Defaults¶
A <Table> element with an empty Name attribute (Name="") acts as a global default. Its settings apply to every table in the file. When a specific table entry is also present, the specific table’s settings override the global defaults.
This is useful for setting options like OverwriteExistingTable, RememberServerName, or bulk copy parameters once, rather than repeating them on every table.
<!-- These settings apply to all tables unless overridden -->
<Table Name="" Schema="dbo" OverwriteExistingTable="y"
RememberServerName="y" EraseTableBeforeCopy="y">
<MSSQLBulkCopy BulkCopyByRowCount="500" LockTable="y"/>
</Table>
Common Value Types¶
Throughout this reference, attributes use the following value conventions:
Type |
Description |
|---|---|
|
Yes or No boolean flag. Case-insensitive. |
|
Free-form text string. |
|
A numeric or simple token value (e.g., |
|
Used for index nullable mode. See Index Elements. |