AllExperts > Ingres 
Search      
Ingres
Volunteer
Answers to thousands of questions
 Home · More Ingres Questions · Answer Library  · Encyclopedia ·
More Ingres Answers
Question Library

Ask a question about Ingres
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Jean-Pierre Zuate
Expertise
Any questions about database Ingres (owned by Computer Associates then Ingres Corp) : - Ingres 6.4 - OpenINGRES from 1.0 to 2.0 - IngresII from 2.0 to 2.6 - Ingres R3, Ingres 2006 (Open Source version) - All tool around Ingres : ABF, Report Writer, Replicator, OpenROAD (3.5 to 2006), Ingres/NET Ingres/STAR, ...

Experience
16 years of computing experience as :
- AS400 programmer
- AIX / Ingres administrator and developer (OpenROAD and korn shell)
- Ingres DataBase Administrator
- Ingres expert - Data modelisation - ETL - Reporting - Many of Computer Associates sofwares - ITIL / CMDB / Change Management

Organizations
http://lafageconseil.fr

 
   

You are here:  Experts > Computing/Technology > Databases > Ingres > Ingres 6.4 db export to flat file

Ingres - Ingres 6.4 db export to flat file


Expert: Jean-Pierre Zuate - 5/7/2007

Question
How can I export ingrs 6.4 db to flat file with any delimiter

Answer
Hello,

You can use the SQL instruction "copy table ..." and/or use one of the following Ingres utility : copydb or unloaddb.

Both copydb and unloaddb working on the same way :
1/ generate SQL scripts to copy data on flat file (copy.out) and to recreate tables and then load datas (copy.in)
2/ it's up to you to run the SQL files (.in or .out) to unload the datas

The difference between the both commands reside on the scope :
- copydb work only with the table of the user specified (with or without -u flag)
- unloaddb drain the entire database (with some applications stuffs like : abf (screen and code), open road, report writer, etc)
- unloaddb provide 2 more scripts : unload.ing and reload.ing

Run one time at least an unloaddb to see how unload.ing and reload.ing are constructed because they use some interstings flags for float values (the precision you use for export/import data).

If you need to reload your 6.4 data in an other Ingres environment (it is possible directly in Ingres2006 for example), take care of the following variables :
- II_MONEY_PREC
- II_MONEY_FORMAT
- II_DATE_FORMAT
- II_DECIMAL
- ... (etc)

See your environment (ingprenv and env) to see if those variables are set on your environment.

If you want more information about unloaddb and copydb you can download Ingres2006 documentation thoses commands are documented here (Command Reference Guide). The commands works nearly in the same way since Ingres 6.4 (take care of copydb options they are more developped since Ingres 2.6).

Hope this help,
Jean-Pierre

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.