Re: dbexport
Posted in 1996
Minh Pham wrote:
>
> Is dbexport a standard to all SQL system?
>
> I tried to export a test db, but the command doesnt' exist
I found out that Minh Pham was running 2.10 Informix SQL. Boy, had to
go back to the drawing boards on that one...
Since Minh reports that he is not of Informix DBA knowledge, I will
explain the steps below:
According to the 2.10 Reference Manual, 'dbexport' wasn't available as
of yet.
You should unload your data to ascii (especially since you are importing
into a different engine [Oracle]).
Unload (as describe on Page 2-21) states:
Unloads the contents of a database table into an ASCII file.
Another option would to use OUTPUT which directs the output of a SELECT
statement to a file or a printer.
Example: UNLOAD TO <pathname/filename> SELECT * from customer
(Remember, this will use the default DELIMITER of "|")
OUTPUT to <filename> [WITHOUT HEADINGS]
SELECT <statement>
After scanning the manual, it looks as though you might have to
first run the DBSCHEMA command (dbschema -d <database_name>) to
get a list of all of your tables, then run individual UNLOAD commands
for each of those tables. I recommend writing a script to do that.
If anyone else has another idea, feel free to jump in.
Jerry Bullock
Enterprise Support Manager
Informix Software Inc.