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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make a copy of a pervasive database

Status
Not open for further replies.

tbscmgi

MIS
Sep 17, 2003
66
US
I have a pervasive database call sqn which is my production database. I want to make a copy of my production database as sqndev for testing, on the same server.

I have no idea how to do this HELP Please.

Thanks
Tony
 
You can copy the contents of the data folder to a new data folder, say sqn\*.* to sqndev\*.*, and then setup the new database in PCC.
 
ettienne-
I try that, but when I try to view the property of any table I'm getting the following errors:
error retrieving stat information on the table.
warning index definitions for table xxx do not match the physicial file.
On the general tab there is no info (blank).

When I double click on any table I'm getting the following error: The ri definitions is out of sync and btrieve error 73.

Thanks
Tony
 
Looks like SQN has referential integrity and constraints enabled on the database. Unfortunately, unless SQN offers a way of making a test database you may be out of luck. ONce you have RI, you either need to create a database with the same name as the original one (on a different machine) or disable RI, copy the database, then re-enable RI on the new database.

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
Since I'm new to this, do you know to disable RI?

Thanks
Tony
 
Your best option is to actually go to SQN and tell them you want to create a test database.
They may have SQL statements that will create the database and add the RI properly.

If you are set on doing it yourself, you'll need to use the DROP CONSTRAINT option on the ALTER TABLE statement. You'll need to do it for every table and every constraint.

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

Part and Inventory Search

Sponsor

Back
Top