Log Shipping vs. Replication

  • Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/pibison


    Paul Ibison
    Paul.Ibison@replicationanswers.com

  • Good article, 1 remark/disagreement though:

    It is stated that logschipping can be done every minute. Maybe this uis theoratically so, but most articles describing logshipping do not suggest an interval of a minute; 15 to 30 minutes is more likely, which means a greater dataloss in case of a disaster.

    Even so, some servers have such a workload, having a log shipped every minute will increase this workload and in some cases a minute would not be enough to get the shipping done.

    Greetz,
    Hans Brouwer

  • Thanks Hans,

    I agree that 1 minute is more of a theoretical than practical minimum for log shipping, but it is the MS recommendation in one specific case I know of. If you are doing transactional replication and are backing up the publisher and distributor, you can select a 'sync with backup' option which ensures data is sent to the distributor only once it has been backed up on the publisher. To ensure this backup is as frequent as possible, log-shipping at a frequency of once a minute is recommended. However I agree that this wouldn't be a preferred setup for a typical production server.

    Regards,

    Paul


    Paul Ibison
    Paul.Ibison@replicationanswers.com

  • Good Article!

    Reduced 60+ pages to 1.   Yes log shipping at a 1 minute interval is tight and may not be practicle.

    But it's a good summary and to get much detail beyond this you nearly need to implement the solutions and learn.

    Best

    David Branscome

  • Good article.  Thanks Paul.

    I have one question regarding this.  Will either of these techniques work over the internet?  If so, what are the pros and cons for each in that scenario?

    Thanks - Joe

  • Joe,

    neither method can use HTTP. Actually, replication can for CE devices but this is not especially useful for failover . I'm hoping 2005 will have this functionality.

    For VPN access, once set up, the're are no major differences to the list in my article.

    Some 'minor' differences:

    In both cases the setup alters (if you're interested in this I can recommend this article: http://support.microsoft.com/?id=321822.).

    Depending on the bandwidth/quantity of information, timeouts may need to be reconfigured. The actual quantity of information can vary enormously between replication and log-shipping which may be a factor. EG imagine if you edited a row 1000 times. This is a 1000 transactions in the log. In merge replication this is simply one row - the last one.

    HTH,

    Paul Ibison

     


    Paul Ibison
    Paul.Ibison@replicationanswers.com

  • Good article. 

    One thing that should also be taken into account when considering replication is that comes with a greater management overhead than log shipping.

    Log shipping is far easier to set up and once it's running it generally requires very little intervetion whereas replication needs a closer eye.  Problems are also easier to troubleshoot with log shipping.

    In addition, with replication you need to worry about performance because replication will place more overhead on your publisher and you might need to consider using a seperate server for your distributor (depends on transaction throughput and various other factors).

    With log shipping, you're going to be backing up your logs anyway so there's isn't a big performance hit - network will be a little more saturated but hopefully you're copying logs through a local network that won't affect the network on which clients come in.

    These reasons, along with the reasons you already mentioned, mean that I would consider log shipping first for failover.

  • One of the considerations with regards to log shipping is the file size of the logs and the pipe with which you are going to be using.  Failover doesn't always mean locally to a server sitting in the same room due to a problem with the primary server.  DR requirements could be a failover due to bigger issues, ie Hurricanes if you happen to be doing buisness in the southeast.  DOH!

    Keep that in mind when deciding on which way to go and how you are going to be implementing the log shipping solution.  I know there are products out there that can compress the log prior to shipping and uncompress on the receiving side (this is not a plug for those products, just pointing it out).

    Just my 2cents.

    Mark

  • I'm assuming that this comparison was done based on MS SQL 2000.  I'd like to know what your opinion is regarding SQL 2005 and any changes that you might make to these statements. 

    Better yet, I'd like to see an additional column added that breaks down the same discussion points if you were to use DB mirroring + snapshots.  My understanding is that this would be the best approach for satisfying both High Availability AND reporting server needs.

    What do you think?

  • Correct - the article was written 2 years ago and has been reposted.

    I'll work on an update which brings database mirroring / database snapshots into the equation, and also snapshot committed isolation level for the reporting capability of the transactional replication system.

    Rgds,

    Paul Ibison


    Paul Ibison
    Paul.Ibison@replicationanswers.com

  • A few random extra points: there are some issues with snapshots for reporting purposes - you can't back them up and you can't use FTI for your reporting. Conversely, FTI is supported out of the box for replication in SQL 2005. Also, concurrency issues are no longer a problem with the new isolation levels in SQL 2005.

    Paul Ibison


    Paul Ibison
    Paul.Ibison@replicationanswers.com

  • Excellent!  I look forward to seeing that.

  • Great article.  We are currently using a home grown Log Shipping process to copy logs from one location to 4 other locations with compression/decompression.  We also use the standby databases for user reporting and for programmers to research data problems.   The problem with reporting, as the article points out, is it kicks users out during log restoration; thus, we increase the restoration interval to every 2 hours.  What we are looking for is a combination of Log Shipping for warm standby and Replication for reporting.  So far, all I read is this is possible but tricky to setup.  I would love to see a detailed step by step instruction for this solution.  I am sure other people have similar needs.

     

  • The biggest problem I had with replication was changing my db schema. Adding a new column became a pain in the ass, as you had to use the replication manager GUI. This was my main reason for choosing log shipping.

  • Ryan,

    If you're refering to SQL 2000, have you ever tried using sp_repladdcolumn?

    Mark

Viewing 15 posts - 1 through 15 (of 28 total)

You must be logged in to reply to this topic. Login to reply