4

enter image description hereI've never touched PervasiveSql before and now I have a bunch of .ddf and .Btr files. I read that all I had to do was create a new database in the control center and point to the folder that contains these files. When I do this and look at the database there is nothing in it. Since I am new to Pervasive, I'm more than likely sure that I'm doing something wrong.

EDIT: Added a screen shot after running command prompt

Chris
  • 2,953
  • 10
  • 48
  • 118

1 Answers1

7

To create a database name in the PCC, you need to connect to the engine then right click the engine name and select New then Database. Once you do that, the following dialog should be displayed: Create Database Dialog

Enter the database name, and path. The path being where the DDFs are located. In most cases the default options are sufficient.

A longer process is documented at http://docs.pervasive.com/products/database/psqlv11/wwhelp/wwhimpl/js/html/wwhelp.htm#href=uguide/using.02.5.html.

If you pointed to a directory that had DDF files (FILE.DDF, FIELD.DDF,and INDEX.DDF) when you created the database name, you should see tables listed. If you pointed to a directory that does not have DDF files, the database will still be created but will have no tables defined. You'll either need to get DDFs from the vendor or create the table entries using CREATE TABLE (with IN DICTIONARY clauses) or use DDF BUilder to add table entries.

Based on your screen shot, you only have 10 records in FILE.DDF. This is not enough. There are minimum system tables required (X$FILE, X$FIELD, X$INDEX, and a few others). It appears your DDFs are not a valid set. Contact the client / vendor that provided the DDFs and ask for a set that include all of the table definitions.

Once you have tables listed in your Database Name, you can use ODBC to access the data.

mirtheil
  • 8,952
  • 1
  • 30
  • 29
  • That was what the first thing that I did, I read the same instructions as you provided. But nothing wants to appear. – Chris Feb 03 '14 at 02:07
  • After I add everything the way its supposed to and when I open the database and look at the tables and there are no tables. The tables folder is empty. – Chris Feb 03 '14 at 02:59
  • I have both the ddf and btr files. I'm not sure if its the complete database. Or does that matter? – Chris Feb 03 '14 at 03:20
  • Where did the DDFs come from? Did they come from a vendor or were they created when you create the database name? – mirtheil Feb 03 '14 at 11:33
  • The files came from a client of mine. He sent the btr and ddf files. He gave the same instructions that you gave, but nothing happened. I'm not sure whether he sent the complete database, it could be partial and I'm not sure if that matters? – Chris Feb 03 '14 at 12:49
  • The DDF files store the table / field / index information so that the BTR (in this case) files can be access through ODBC or other access methods. If the DDFs don't have tables defined, they won't help. From a command prompt, run "BUTIL -STAT FILE.DDF" in the directory where the DDFs are located. It'll give, among other information, the number of records. If it's 13 or less, you might have an invalid DDF set. Ask the client where he got them. – mirtheil Feb 03 '14 at 14:30
  • I'm going to try out your suggestion and contact my client again to see if I have everything I need. Thanks for sticking through with me on this, it is greatly appreciated. – Chris Feb 03 '14 at 15:26
  • I edited my question and added a screen shot of what was shown after I ran your suggestion... – Chris Feb 03 '14 at 15:33
  • I've edited my answer to include information about your screenshot. – mirtheil Feb 03 '14 at 15:59
  • Thank you. I've contacted my client and he is going to log in via team viewer and set it up. Thanks again for your help, I appreciate it. – Chris Feb 03 '14 at 16:10