Re: Joining two databases into one...
Posted in 1998
That's quite a question. Can you refine it a bit? Do you intend to join
tables as well (i.e. you have a customer table on one database and a
customer table on the second database...) or is it a mere matter of
importing the tables from one database into the other?
If the latter the easiest would be (this assumes that you have connectivity
between the two databases - if not that is a separate question and you'll
be charged accordingly ;-) ):
dbschema -d obsolete_db addtabs.sql
You would then edit addtabs.sql and put in any fragmentation you want to
do, although you could leave it as is.
isql consolidated_db addtabs.sql
which will create all the tables in the new all-in-one db, then in isql:
select 'insert into consolidated_db:' || tabname || ' select * from
obsolete_db:' || tabname from systables where tabid > 99
output the results of this into a script, clean up the script a touch and
run it.
This is not the fastest way to move data from one database to the other,
but certainly the simplest.
If you are dealing with large volumes of data, then you might want to
consider using HPL instead.
cheers
j.
Mark.Wise@ps.net on 05/18/98 05:05:00 PM
To: informix-list@iiug.org
cc: (bcc: Jack Parker/Boston50/Epsilon)
Subject: Joining two databases into one...
Hi everyone!
I'm an Informix newbie that does not have too many people to lean
on for answers.
I am running Informix Online 7.23 on HPUX10.2.
I have been requested to take two databases that exist on the same
instance and combine them into one ("abc" + "xyz" = "abc" ).
Can anyone offer any guidance or insights in performing this task?
Thanks,
Mark Wise
mark.wise@ps.net