I need to combine 20 databases that have the same structure into 1 database. I saw this post:
Consolidating data from different databases into one with minimal delay
I did not understand all this, so let me ask like this: there is a table that has primary keys but no source identifiers, for example:
Database 1
AgencyID Name
1 Apple
2 Microsoft
Database 2
AgencyID Name
1 HP
2 Microsoft
Obviously, these two tables cannot be combined as follows: this requires an additional column:
Database 1
Source AgencyID Name
DB1 1 Apple
DB1 2 Microsoft
Database 2
Source AgencyID Name
DB2 1 HP
DB2 2 Microsoft
If this is the right way to do this, these two tables can be combined into one database as follows:
Source AgencyID Name
DB1 1 Apple
DB1 2 Microsoft
DB2 1 HP
DB2 2 Microsoft
... and can this be done using transactional replication?
Thanks in advance for the answer, it would be very helpful if I got the right answer for this.
Ilija