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!

Unloading Multiple Table

Status
Not open for further replies.

Flight5497

Programmer
Jun 9, 2004
1
GB
Hi There,

I have Informix IDS 9.4 and basically what I am doing is creating a new database but it will contain the same tables and information as the first database as the second database will be used as my test/development database because the first database is the live database and we have obviously found development very tricky with the live database ;)

Now I have created the new database but I was wondering to save me time whether there was a way to unload all the tables at once from 1st database and then load them to the 2nd database.

If there is if you could let me know the correct syntax to go about doing this it would be gratefully received.

Many Thanks
 
Flight:

Have you considered using the informix dbexport/dbimport utility?

dbexport dbname

creates a directory in the current directory dbname.exp.

You then can recreate the database with the dbimport command. You can change the database name by doing these 3 hacks assuming you want to use dbname2 as the new database name:

1) mv dbname.exp dbname2.exp

2) change to the dbname2.exp directory

3) mv dbname.sql dbname2.sql

4) edit the dbname2.sql and change 'DATABASE dbname' to 'DATABASE dbname2'.

5) execute the dbimport program, but database dbname2 can't exist.

Regards,

Ed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top