I've got two databases with the same tables and schema on two different
servers.
I want to have only one database.
So i would like to insert in the first database the data of the second
database.
I don't know how to do this because almost of the tables contains serial.
It's for production databases, i can't make mistakes.
Maybe you could just import the second database into another schema of
the first database if it's urgent...
Otherwise the nature of conflicts will have to be thought through, like
- Are there some data that exist in both databases - i.e. which become
duplicates if both tables are merged?
- Are the serials used as foreign keys in other tables or as the basis of
any other fields?
- Can the serials be changed to different numbers - e.g., is it ok or even
needed to convert "11" on database B to "10011" on database A and so on,
to avoid conflict two ID 11 records having different data?
- Does the order of records matter?
Once the problem is familiar, many gurus will be able to help. I just
wanted to provide a starter.
Regards,
Ben K.
Developer
http://benix.tamu.edu