Search code examples
sqlsql-serverbtrieve

How to convert a bunch of .btr and .lck files to a readable SQL?


I have a bunch of .btr and .lck files and I need to import those to a SQL Server Data Base.

How can I do that?


Solution

  • .LCK files are lock files. You can't (and don't need to) read those directly. The .BTR files are the data files. Do you have DDF files (FILE.DDF, FIELD.DDF, INDEX.DDF)? If so, you should be able to download a trial version of Pervasive PSQL v11 from www.pervasivedb.com. Once you've installed the trial version, you can create an ODBC DSN pointing to your data and then use SSIS or DTS or any number of programs to export the data from PSQL and import it to MS SQL.
    If you don't have DDFs, you would need to either get them or create them. The DDFs describe record structure of each data file.