which is best replication or log shipping

Last post 11-30-2008 1:06 PM by Mahmoud_H. 6 replies.
Page 1 of 1 (7 items)
Active Topics My Discussions Unanswered Sort Posts: Previous Next
  • 11-18-2008 1:35 PM

    which is best replication or log shipping

    I have OLTP central database sql standard 2005 that is currently working within LAN.

    It is required that new  three remote branch sites will connect to the SQL server and do update/insert/delete and reporting.

    The  four sites are connected with frame relay WAN.

    The main site is 512 kbps  and has the database Server , and the other new remote sites are 256 kbps.

    The size of database is 250 MB , and  the reporting in branch sites (huge reports) may cause high traffic over WAN and performance may suffer.


     I  need   to implement one of two solutions for reporting:

    solution 1) using replication

    the main site will be publisher and the other thre remote sites will be subscribers

    OR solution 2) using log shipping

     

    I have couple of questions:

    what is the best stable solution?

    what is the side effect in case of WAN  is down, which is better to re-synchronize the database?

    In case of replication , what is the best replication to be used.?

    please advice

    View Mahmoud Hassan's profile on LinkedIn
  • 11-18-2008 11:17 PM In reply to

    Re: which is best replication or log shipping

    Log shipping can't be used because whenever you restore the log, all users should be out of the db...it is not recommended...

    Replication is the only solution if i am not mistaken...what type of replication depends on subscribers...

    You can use transactional replication...or check peer to peer replication you the subscribers also modifying the data...

     

    MohammedU.
    Microsoft SQL Server MVP
    Moderator
    SQL-Server-Performance.com

    All postings are provided “AS IS” with no warranties for accuracy.
  • 11-25-2008 7:51 AM In reply to

    Re: which is best replication or log shipping

    Mahmoud_H:

    It is required that new  three remote branch sites will connect to the SQL server and do update/insert/delete and reporting.

    IMO Snapshot replication and logshipping both are ruled out as you would required your subscribers to update/insert/delete records. The options that are viable according to me are:

    1. Transaction Replication with updatable subscriber http://msdn.microsoft.com/en-us/library/ms151718(SQL.90).aspx

    2. Merge Replication http://msdn.microsoft.com/en-us/library/ms172367(SQL.90).aspx

    3. Peer-to-Peer Replication http://msdn.microsoft.com/en-us/library/ms151196.aspx

    This is what my opinion is, lets wait for others reply.

    Hemantgiri S. Goswami
    -------------------------
    "Humans don't have Caliber to PASS TIME , Time it self Pass or Fail Humans" - by Hemantgiri S. Goswami

    http://hemantgirisgoswami.blogspot.com
    http://forums.surat-user-group.org/

    View Hemantgiri S. Goswami's profile on LinkedIn

    Disclaimer: This post is provided as is, for the sake of knowledge sharing only.
  • 11-26-2008 10:37 AM In reply to

    Re: which is best replication or log shipping

     thank all for reply

    The remote sites use 256 Kbps , so which replication is less overhead for WAN.

    Is ther a reasonable speed for link  between  main and  remote sites

     

     

     

     

    View Mahmoud Hassan's profile on LinkedIn
  • 11-26-2008 1:03 PM In reply to

    Re: which is best replication or log shipping

    Hi Mahmoud,

    Your only option is replication - nothing else (from the techniques delivered out of the box) will allow you to update at the remote branch sites.

    Even if your branch offices were local I would recommend you to replicate to other servers for reporting - simply because OLTP and reporting activities don't mix well performance wise.

    You have to choose between Transactional and Merge Replication (peer to peer is only available in Enterprise Edition):

    - Both of them allow you to have bi-directional replication, i.e. data can be updated and replicated between Publisher and Subscribers.
    - Both of them can "queue" replicated data in case your WAN is down

    So which one to choose? Generally, Transactional replication is used in server to server replication and Merge Replication in "loosely coupled" scenarios (the typical example is Sales people with laptops).

    General rules for choosing Transactional Replication:
    - You want incremental changes to be propagated to Subscribers as they occur.

    - You need transactions to adhere to ACID properties (merge replication does not replicate transactions; it replicates commands)

    - Subscribers are reliably and/or frequently connected to the Publisher.

    Merge Replication:

    - Multiple Subscribers need to update data at various times and propagate those changes to the Publisher and to other Subscribers.
    - Subscribers need to receive data, make changes offline, and later synchronize changes with the Publisher and other Subscribers.
    - You do not expect many conflicts when data is updated at multiple sites (because the data is filtered into partitions and then published to different Subscribers or because of the uses of your application). However, if conflicts do occur, violations of ACID properties are acceptable.

    Another important thing is that with Transactional replication, you can only solve conflicts in 2 ways; either the Publisher always wins or the Subscriber always wins (there is a 3rd, reinitialization but that is usually not feasible). In Merge Replication you have a range of different Conflict resolvers you can choose from.

    Depending on what your transactions look like, you might get less traffic with Merge Replication because you can choose column-level tracking. With column-level tracking, only the updated columns are replicated not the entire row. This is not going to help you if you have mainly deletes and inserts or typically update several or most columns.

    HTH

     /Elisabeth

    elisabeth@sqlserverland.com
    SQL Server Consultant and Architect
    MCITP, MCT
    http://www.linkedin.com/in/elisabethredei
  • 11-26-2008 1:20 PM In reply to

    • satya
    • Top 10 Contributor
    • Joined on 11-05-2002
    • United Kingdom
    • Posts 22,747
    • Microsoft MVP
      Moderator

    Re: which is best replication or log shipping

    Say whether it is log shipping or replication the network bandwidth is most important factor for such environment on WAN especially. So you need to be careful in order to perform baseline of number of transactions that are happening within the databases that needs to be involved in this standby operations.

    So in your case such operations by testing is very much helpful to perform between the sites and also the firewall tests as it is another overhead that might hurt the performance . 

    -Satya S K J

    SQL Server MVP



    Knowledge is Power, you will gain by sharing it. SSQA.net - Invisible contributions to the users & visible success in SQL Community.
  • 11-30-2008 1:06 PM In reply to

    Re: which is best replication or log shipping

    Thank you  Elisabeth for your greet advice and details

    Elisabeth Redei:

    Depending on what your transactions look like, you might get less traffic with Merge Replication because you can choose column-level tracking. With column-level tracking, only the updated columns are replicated not the entire row. This is not going to help you if you have mainly deletes and inserts or typically update several or most columns.

    I think i should use Merge replication bez it match my case.
     
    Thank you satya for your advice 

    satya:

    the network bandwidth is most important factor for such environment on WAN especially. So you need to be careful in order to perform baseline of number of transactions that are happening within the databases that needs to be involved in this standby operations.

     

    I agree with you  for bandwidth and firewall overhead

     
    Again,

    Thank you all  who shared their knowledge and experience

     

    View Mahmoud Hassan's profile on LinkedIn
Page 1 of 1 (7 items)
Active Topics   My Discussions    Unanswered Posts


© 2000 - 2007 vDerivatives Limited All Rights Reserved.