Re: Include Tables from Files into Database
Posted in 2003
Christian Robert wrote:
> Hi,
>
> I've got the follwing problem: From a customer Informix installation
> I got the follwing database files, which represent the table 'wsart'
> (at least I think they do).
>
> -rw-rw---- 1 informix informix 299748 May 27 10:14 wsart00310.dat
> -rw-rw---- 1 informix informix 92500 May 27 10:14 wsart00310.idx
> -rw-rw---- 1 informix informix 0 May 27 10:14 wsart00668.dat
> -rw-rw---- 1 informix informix 3072 May 27 10:14 wsart00668.idx
> -rw-rw---- 1 informix informix 1173544 May 27 10:14 wsart00725.dat
> -rw-rw---- 1 informix informix 54547 May 27 10:14 wsart00725.idx
>
> No I need to integrate these files into my test database. With databases
> like MySQL I can simply copy the files into the database directory and
> the tables are available but obviously it's not that easy with Informix
> :-)
>
> So anyone got an idea how I can access these tables?
With a lot of difficulty and effort.
The best solution is to get your customer to use the dbexport command
(depending on which version of SE they have) and export the entire
database. You can then use the dbimport command at your end to import
the entire database.
If you only require specific tables, then use the dbschema command to
generate the script necessary to create the commands in your database.
Then use the UNLOAD command to unload each table's data to ASCII files.
You can then use the LOAD command to load the data after creating the
tables in your database.
Cheers,
--
Mark.
+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@MydasSolutions.com |//////// /|
| Mydas Solutions Ltd http://MydasSolutions.com |///// / //|
| +-----------------------------------+//// / ///|
| |We value your comments, which have |/// / ////|
| |been recorded and automatically |// / /////|
| |emailed back to us for our records.|/ ////////|
+----------------------+-----------------------------------+-----------+