Re: How to dump data to flat file?
Posted in 2004
The easiest way to get the data is to use dbaccess to unload the data.
# dbaccess <database> <sql file>
sql file: test.sql
unload to xxx.txt delimiter ',' select xxx, yyy from zzz
database: abc
Thus, you would run:
# dbaccess abc test.sql
-------------------------------
Dorn B.
----- Original Message -----
From: "John Doe" <workingstiff19@hotmail.com>
To: <informix-list@iiug.org>
Sent: Wednesday, February 25, 2004 11:34 AM
Subject: How to dump data to flat file?
> I am an Oracle DBA but a tyro at Informix. [1]
>
> Need to get some data out of tables with names like:
> informix.sometable
> root.another_table
> ...etcetera. Evidently it's <owner>.<tablename> as in Oracle, and
> I've determined that these are all in the same "dbspace" (there's only
> one).
>
> WHAT I'VE TRIED: Figured out how to get into the menu-driven
> "onmonitor," but when I choose to display Dbspaces -> Info it just
> gives me the name of the dbspace, and Status-> Databases just gives me
> the names of three databases. "esql" just prints out the help page
> for esql. (I was going to try a DESCRIBE on these tables to get
> column descriptions, and then SELECT * FROM ...). I am timorous about
> trying any of the options for fear of doing something to this
> production system.
>
> THE QUESTION: How to get to the table information so I can do a
> SELECT * FROM <tablename> and dump it into a flat file?>
> Everything in your FAQ is already over my head. I downloaded the
> manuals in *.pdf format and have been pouring over the "Informix Guide
> to SQL: Reference" and "Administrator's Guide" to no avail. ("Getting
> Started" was about installation.)
>
> As a reward for help, you all can hit me up by e-mail with any Oracle
> questions you may have now or in the future.
>
> -----------------------------
> [1] Tyro is the "real" word for "newbie." Look: http://www.m-w.com
sending to informix-list