none
SQL 镜像 是实时的么 RRS feed

  • 问题

  • 好像记得SQL 镜像是根据日志来对数据库进行镜像操作的,但数据库日志不是实时的,比说说现在是15:00 但日志上显示的最后修改时间还是9点多,这样是否说明镜像不是实时的?

    reakyu
    2011年4月6日 7:27

答案

  • A database mirroring session runs with either synchronous or asynchronous operation. Under asynchronous operation, the transactions commit without waiting for the mirror server to write the log to disk, which maximizes performance. Under synchronous operation, a transaction is committed on both partners, but at the cost of increased transaction latency.

    There are two mirroring operating modes. One of them, high-safety mode supports synchronous operation. Under high-safety mode, when a session starts, the mirror server synchronizes the mirror database together with the principal database as quickly as possible. As soon as the databases are synchronized, a transaction is committed on both partners, at the cost of increased transaction latency.

    The second operating mode, high-performance mode, runs asynchronously. The mirror server tries to keep up with the log records sent by the principal server. The mirror database might lag somewhat behind the principal database. However, typically, the gap between the databases is small. However, the gap can become significant if the principal server is under a heavy work load or the system of the mirror server is overloaded.

    In high-performance mode, as soon as the principal server sends a log record to the mirror server, the principal server sends a confirmation to the client. It does not wait for an acknowledgement from the mirror server. This means that transactions commit without waiting for the mirror server to write the log to disk. Such asynchronous operation enables the principal server to run with minimum transaction latency, at the potential risk of some data loss.

    All database mirroring sessions support only one principal server and one mirror server.

    Details: http://msdn.microsoft.com/en-us/library/ms189852.aspx


    Mark as Answer if it helps. This posting is provided "AS IS" with no warranties, confers no rights.
    • 已标记为答案 Ai-hua Qiu 2011年4月13日 7:48
    2011年4月6日 8:27

全部回复

  • A database mirroring session runs with either synchronous or asynchronous operation. Under asynchronous operation, the transactions commit without waiting for the mirror server to write the log to disk, which maximizes performance. Under synchronous operation, a transaction is committed on both partners, but at the cost of increased transaction latency.

    There are two mirroring operating modes. One of them, high-safety mode supports synchronous operation. Under high-safety mode, when a session starts, the mirror server synchronizes the mirror database together with the principal database as quickly as possible. As soon as the databases are synchronized, a transaction is committed on both partners, at the cost of increased transaction latency.

    The second operating mode, high-performance mode, runs asynchronously. The mirror server tries to keep up with the log records sent by the principal server. The mirror database might lag somewhat behind the principal database. However, typically, the gap between the databases is small. However, the gap can become significant if the principal server is under a heavy work load or the system of the mirror server is overloaded.

    In high-performance mode, as soon as the principal server sends a log record to the mirror server, the principal server sends a confirmation to the client. It does not wait for an acknowledgement from the mirror server. This means that transactions commit without waiting for the mirror server to write the log to disk. Such asynchronous operation enables the principal server to run with minimum transaction latency, at the potential risk of some data loss.

    All database mirroring sessions support only one principal server and one mirror server.

    Details: http://msdn.microsoft.com/en-us/library/ms189852.aspx


    Mark as Answer if it helps. This posting is provided "AS IS" with no warranties, confers no rights.
    • 已标记为答案 Ai-hua Qiu 2011年4月13日 7:48
    2011年4月6日 8:27
  • 请问您使用的是什么版本的SQL Server? 关于您的配置,可以通过查询sys.database_mirroring,具体含义详见http://msdn.microsoft.com/en-us/library/ms178655(SQL.100).aspx
    Mark as Answer if it helps. This posting is provided "AS IS" with no warranties, confers no rights.
    2011年4月6日 8:40
  • 好像记得SQL 镜像是根据日志来对数据库进行镜像操作的,但数据库日志不是实时的,比说说现在是15:00 但日志上显示的最后修改时间还是9点多,这样是否说明镜像不是实时的?

    reakyu
    How did you get time in transaction log?
    2011年4月6日 14:06
  • 镜像方式为同步时就是时时的

    异步是就可能不是


    有dba的职位吗(北京的),请联系我 stswordman#hotmail.com
    2011年4月7日 7:03
    版主
  • Transactions will not stay in the queue for hours even in asynchronous mode.
    2011年4月7日 13:44