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).