Fast and reliable access to business data is extremely important for modern IT infrastructure of companies and organizations. That's why migration from legacy systems to modern powerful platforms becomes a very popular task. One common example of such migration is transferring data from DBF files used by legacy DBMS Dbase, Xbase, Clipper, FoxPro and Visual FoxPro to SQL Server or Azure SQL database.
This whitepaper introduces benefits, bottlenecks and best practices of seamless migration from DBF to SQL Server.
Although DBF format does not include such complicated database entries as stored procedures, functions and triggers, there are still some bottlenecks in DBF to SQL Server migration. One of these bottlenecks is data types mismatch. For instance, there are two possible values for DBF logical type - True that is stored as 'T' and False that is stored as 'F'. SQL Server does not have logical data type, but there is a common option to use BIT type instead, providing 1 for True and 0 for False. This may lead to the related type mapping rule, however some migration projects may require to preserve data 'as is'. For such cases CHAR(1) with CHECK constraint is the most suitable type mapping:
IS_DELIVERED CHAR(1) CHECK (IS_DELIVERED IN ('T','F'))
Another issue is missing or incorrect information about character set used by the source DBF file. Usually, encoding is stored in the header of DBF file, but sometimes it may be empty or corrupted. In those cases, correct codepage conversion may be obtained by analysis of the migrated text data. When the codepage is converted properly, text data is readable. Otherwise, migration must be run again using another codepage.
Due to these issues, it is not recommended to migrate from DBF to SQL Server manually. Use the suitable database migration software instead.
There are software tools to simplify DBF to SQL Server database migration ensuring it is seamless and accurate. For instance, DBF to SQL Server converter produced by Intelligent Converters automates types mapping. It carefully analyzes the structures of DBF tables and the data in order to choose the most appropriate equivalent for every DBF column among SQL Server data types.