Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicate data to new server, missing entries in X$File (v8)

Status
Not open for further replies.

UViewIT

IS-IT--Management
Feb 5, 2007
21
CA
Hello! I am trying to put together a "mirror" of our existing Pervasive v8 database so I can develop an application with "real" data and not cause any issues.

Here's what I've done:
- I installed the Pervasive engine & hotfixes to my laptop (PCC shows v8.00.114.000).
- Copied the data files (2 folders worth, about 17gb) and DDF files to the laptop. The entire folder structure is identical to the server, including the drive letter.
- In PCC, I created a new database. I entered the same database name, the location of the DDF's, and via advanced settings I created a new "database name". In here I added the two folders where the actual tables were located locally.

When I go to review the database in PCC I find all of the tables and am able to open an SQL query window and return data with no troubles.

Here are the issues I've come across:
1) When looking at the properties of any table, it shows nothing in "table location", and all statistics from "File Version" down list "no file"...
2) I cannot review or modify the indexes on any table, as the index list comes up empty. There should be at least one index on each table.


I noticed that the file version reported on the X$File system table is 8.0 on the laptop, but the production server shows 7.0. When I open that system table it only shows the 3 default entries (for the File, Field & Index DDF's), instead of the listing of all of my tables.

I suspect that the reported DDF version is causing the issue. I've tried stopping the pervasive engines and re-copying the DDF's, but that did not make a difference.

Is there a setting I'm missing somewhere, or any insight on this issue?

I greatly appreciate any tips someone may have, thanks in advance!
 
What's in the X$FILE table if you open it on the server (not the laptop)?
I have seen problems with older versions of the PCC where it doesn't do well with some DDFs and could actually cause index problems. For example, in the v7.8 release, the PCC would remove all indexes defined on a table if you tried to change the index. I would suggest finding v8.7 (V8 SP3) as it's the latest version. V8.00 is very old and there were some major changes to the engine and PCC in later patches.

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
On the server it comes back with 996 rows, which include the 3 default items (File, Field & Index) as well as 1 row for every table in the database. On the laptop I only see the 3 default items.

The problem is that our ERP & accounting apps use the old version and are working very happily... Each table reports that it's on the v7 structure, but for some reason when I copy the data and try to create another database it thinks they are all v8?

For kicks, I tried this on the production server (copy data and create a new database with the cloned data & DDF's), which gave me the same issue... Are there any other methods for creating/associating a new database, or parameters I could pass to force the tables into v7 mode?
 
It almost sounds like the DDFs you are copying aren't the correct ones.

Just to be clear, are there users accessing the DDFs when you copied them? If so, can you stop the PSQL engine, then copy the DDFs and data files?

There's no way to force a v7 mode however simply copying the files (using WIndows copy) shouldn't affect the file version.

You don't need to modify the DDFs/data files when making the copy, simply copy them through Explorer or a Command Prompt.


Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
Thanks Mirtheil, but unfortunately that didn't fix the problem. I tried stopping both engines on the production server and the laptop, copying the files over then restarting both. Each table still does not have a file path under the properties page, and the items still show "no file".

I tried also deleting & recreating the database on the laptop, pointing to the DDF's and the problem persists.

I also found a crystal report built by our ERP vendor that lists the filed details out of the File.ddf & Field.ddf files. I changed the database locations to the laptop's copy of the DDF files and ran it; it came out with 1160 pages with every table & field listed as expected.

Do you have any other ideas I can try? I'm at a total loss here, it seems like this should have been a very straight-forward process...

Thanks!!
 
Well, I'm at a loss as well. How many other database names do you have? If it's not too many, you could take the drastic step of stopping the PSQL engines and then deleting DBNAMES.CFG. When the engines are restarted, it will be recreated. You would lose TEMPDB, SYSTEMDB, and any other Database Names defined. It would let you recreate the entry to yours though.


Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top