Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2011
    Posts
    6

    Unanswered: Consolidate databases into 1

    Hello everyone, this is my first question here...


    I need to consolidate 20 databases that have the same structure into 1 database. I've read some articles which mention that this could be possible using transactional replication but I haven't found anything detail.

    Let's say there are some table who have primary keys but don't have sourceID, example:

    DataBase 1
    AgencyID Name
    1 Apple
    2 Microsoft

    Database 2
    AgencyID Name
    1 HP
    2 Microsoft

    It's obvious that these two tables cannot be merged like this, it needs aditional 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 of doing this, can these two tables be merged in one database like this:

    Source AgencyID Name
    DB1 1 Apple
    DB1 2 Microsoft
    DB2 1 HP
    DB2 2 Microsoft

    ...and is it possible to do it with Transactional replication? Thanks in advance for the answer, it would be really helpful if I would get the right answer for this.

    PS I tried this following regular steps for transactional replication but in the end only 1 database is being replicated, other one is ignored.

    Ilija

  2. #2
    Join Date
    Jul 2011
    Posts
    6
    I think I found the problem. I had to set "Action if name is in use" flag to "Keep existing object unchanged". Default is "Drop existing object and create a new one".

    Regards,
    Ilija

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •