Re: dbexport
Posted in 1996
Topics: Connectivity: ODBC / JDBC / .NET, Server Administration, Migration, Import/Export & Data Conversion
This is the way I have done it in 2.10 and now 5.01. There is a DBDELIMITER
environment variable which can be set to change the field separator.
BTW I use a comma so I can ftp the UNLOAD to a PC for use in Excel. However when
I get my ODBC stuff to go It will all be seamless, but more of that later!
> 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.
>
--
Martin How
Buonacorsi Consulting Limited