Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2003
    Posts
    4

    Unanswered: Merge Replication.

    Hello,
    I have two DBs that are the same, the two of them are on two separated networks, update happens in the both of them and i need to keep them both the same, (replicated) how can i copy changes from one to other and other to one
    anybody has an idea?

    thanks,

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Refer to SQL server books online for information on Merge Replication which is suitable for your task, if not you can use Transactional replication.

    Make sure both the servers can see each other in order to function the replication.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  3. #3
    Join Date
    Oct 2003
    Posts
    4

    They can't see each other

    This is the main problem,

    they can't see each other, they are on separated networks.
    I can only transfer files between them.

    thanks,

  4. #4
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621

    Re: They can't see each other

    Originally posted by hushpappy
    This is the main problem,

    they can't see each other, they are on separated networks.
    I can only transfer files between them.

    thanks,
    Build custom (handmade) replication with DTS.

  5. #5
    Join Date
    Oct 2003
    Posts
    4

    Sample?

    Do you have any sample for this kind of thing?
    thanks,

  6. #6
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621

    Re: Sample?

    Originally posted by hushpappy
    Do you have any sample for this kind of thing?
    thanks,
    I have no sample for your case (I implemented custom replications for different schemas). Just couple suggestions about how it is possible to do.

    1. Use GUI (globally unique identifiers) as primary or unique key for your tables.
    2. Because of type replication (something like merge) it needs to have conflict resolver (who is main updater).
    3. Create "distribution" database on every server (includes replicated tables twice IN and OUT - empty for first time).
    4. Setup triggers on replicated tables (with flag - not fire if update was done by "merge" agent).
    5. Add (if not exists) field like last update time to replicated tables.
    6. Create "merge" agent for applying changes.

    By using DTS you could export data (OUT) from source server to disk (move it to another server ) and import data (IN) to target server.
    Update data on target with using conflict resolver. Repeat the same in another direction.

    Of course it is just draft for custom replication - real model may be more complicated.

  7. #7
    Join Date
    Oct 2003
    Posts
    1

    Re: They can't see each other

    Originally posted by hushpappy
    This is the main problem,

    they can't see each other, they are on separated networks.
    I can only transfer files between them.

    thanks,
    You can use merge replication when the two sql servers are on non-trusted networks.

    First, the SQL Server Agents must be running under the same user name. This may require you create identical local accounts on both machines to use as the SQL Service agent service Log On account.
    Next, on the publisher, add a TCP/IP alias to the subscriber using the Client Network Utility. The server alias needs to be the machine name of the subscriber, and the server name needs to be the IP address of the subscriber.
    Finally, create the merge publication and push subscription.

Posting Permissions

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