Re: Is there a DBIMPORT like util to append to
Posted in 1994
In article 22023@gauss.rutgers.edu, manmetha@gauss.rutgers.edu (Rajesh Malhotra) writes:
>
> Fellow Indormix'ers,
>
> I have a relatively small database, which I want to grow quickly to
> do some benchmarking. Is there a DBEXPORT/DBIMPORT like utility that I
> could use to export this DB to tape, and then import it multiple times
> to increase its size? When I import it, I want the records to be appended
> to the existing tables, not overwrite them. I cannot use DBIMPORT, since
> it recreates the database.
>
> I am running the Online 5.0 engine, and have approx. 30 tables in
> the DB.
>
> Any and all responses on this matter appreciated.
>
> Thanx,
>
> Raj.
> ===============================================================================
> __ __ .
> / __/ / Raj Malhotra.
> / ( /_ / voice :
> __/
===============================================================================
You can use unload statement to unload table data to ASCII file and load statement
to load tables from ASCII files. I hope you don't have unique indexes on the tables
which you want to load multiple times. If you have unique index this method won't work
you need to write a small program to do that.
unload statement syntax:
unload to <filename> select * from <table name >
load statement syntax:
load from <filename> insert into <table name> .
If you have unique indexes write a small program fetches the data
modifies the unique index key values and insert back to the table.
I hope load and unload works for you.
shyam