Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Recreate DDF's for table in Pervasive Database

Posted on 2013-01-29
7
Medium Priority
?
1,066 Views
Last Modified: 2013-02-08
I have a Pervasive database for Sage BusinessVision ERP where I have created some additional tables. In the folder the tables/files for the BusinessVision ERP are with extension btr and the tables I created manually are with extension mkd.

After an upgrade of the ERP and adding the new DDF's from Sage my manually created tables no longer show in the pervasive control center.

What I can I do with the DDF files so that the manually created tables will show again in the control center?

I'm using MS SQL SSIS to pull data from the manually created tables
0
Comment
Question by:Gerhardpet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 18

Expert Comment

by:mirtheil
ID: 38832915
The best solution would be to rerun the original CREATE TABLE statements but add the IN DICTIONARY clause so that only the table entry is created.
0
 
LVL 28

Assisted Solution

by:Bill Bach
Bill Bach earned 2000 total points
ID: 38832922
You will need to log into the new database (with the new DDF's) and re-run your original CREATE statements.  I recommend doing this with these steps:
- Get all users out of the system.
- Rename the MKD files so that they are out of the way.
- Run the CREATE TABLE statements to create the files you need.  This will recreate the MKD files, but they will all be empty.
- Optional: If there is ANY chance that you messed this up, do a BUTIL -STAT on the new MKD file and compare it to the BUTIL -STAT on the old MKD file.  The keys should match (except for record counts, of course).  If they do not match, DROP TABLE and do it again until it matches.
- Copy the old MKD files on top of the new ones. This will put your data back into the location where the database engine wants it.

You can also try to do this with CREATE TABLE..IN DICTIONARY, but this can sometimes give you bad results, and I don't recommend it.
0
 
LVL 1

Author Comment

by:Gerhardpet
ID: 38834768
The problem is that I don't have the CREATE TABLE statements. The tables were created a long time ago. Is there anyway to access the mkd files for the CREATE TABLE SQL statements?
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 28

Accepted Solution

by:
Bill Bach earned 2000 total points
ID: 38835173
Not wirh the native tools that Sage installs. Another solution would be to restore the DDFs from your old system to a different folder, create a new database for them, move the MKD files into the same folder, and then access them with cross-database joins.

A cross database join simply indicates the new dbname, like this:
   SELECT * FROM NewDB.MyTable;

If you use aliases in your queries, then you should be able to make this change very easily by just changing the table names in each query to include the new database name. With this solution, you'll never need to worry about this issue again!
0
 
LVL 1

Author Comment

by:Gerhardpet
ID: 38868873
We can't find the old DDF's so we are out of luck.

Thanks for your help Bill...no solution is your solution so I will award points to you.
0
 
LVL 28

Expert Comment

by:Bill Bach
ID: 38868892
Do you not have any backups from before the upgrade?  I always save at least one or two year-end backups, just in case.
0
 
LVL 1

Author Comment

by:Gerhardpet
ID: 38868900
Yes we do have backups from at least 2 years ago but the DDF's are not there with these additional tables.

The tables were created about 5-6 years and have not been used for at least 3 years.

It would be nice to get the data but it is not the end of the world
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question