SQL Server Performance

mirroring questions

Discussion in 'Getting Started' started by lara99, Oct 5, 2009.

  1. lara99 New Member

    does mirroring depends on transaction log backup,i mean to say what if we truncate th transaction log does it going to affect the mirroringor mirroring is more like replicatoin where the transactions go throug with agents and truncate the commited transaction would not effect anything.i know for logshipping if you take an external txn backup then the logshipping is going to break.please share some idealara
  2. FrankKalis Moderator

    Have you found a solution / workaround in the meantime?
  3. satya Moderator

    Yes, see what is defined in BOL: Database mirroring involves redoing every insert, update, and delete operation that occurs on the principal database onto the mirror database as quickly as possible. Redoing is accomplished by sending a stream of active transaction log records to the mirror server, which applies log records to the mirror database, in sequence, as quickly as possible. Unlike replication, which works at the logical level, database mirroring works at the level of the physical log record. Beginning in SQL Server 2008, the principal server compresses the stream of transaction log records before sending it to the mirror server. This log compression occurs in all mirroring sessions.
    If you perform any truncation of log then DB mirroring is affected a lot, again BOL is at help to explain log shipping:
    A given database can be mirrored or log shipped; it can also be simultaneously mirrored and log shipped. To choose what approach to use, consider the following:
    • How many destination servers do you require?

      If you require only a single destination database, database mirroring is the recommended solution.

      If you require more than one destination database, you need to use log shipping, either alone or with database mirroring. Combining these approaches gives you the benefits of database mirroring along with the support for multiple destinations provided by log shipping.

      • If you need to delay restoring log on the destination database (typically, to protect against logical errors), use log shipping, alone or with database mirroring.

Share This Page