Availability Enhancements (Database Engine)

Note

For SQL Server 2008 R2, there have been no changes to the content that is listed in this topic.

The availability of SQL Server 2008 databases is improved by enhancements to database mirroring. Database mirroring enables the creation of hot standby servers that provide rapid failover support with no loss of data from committed transactions. 

Database Mirroring

Performance Enhancements

Performance enhancements include the following:

  • Write-ahead on the incoming log stream on the mirror server.

    In SQL Server 2008, when receiving incoming log records, the mirror server writes them to disk asynchronously. At the same time, the mirror server processes log records that have already been written to disk.

  • Improved use of log send buffers.

    In SQL Server 2005, every log-flush operation on the principal server reserves a whole database mirroring log send buffer for its log records. In SQL Server 2008, if the most recently used log cache contains sufficient free space for the log records of the next log-flush operation, they are appended to that log cache. Otherwise, a new log cache is allocated.

  • Compression of the stream of transaction log records.

    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.

  • Compression of stream data for which at least a 12.5 percent compression ratio can be achieved.

  • Page read-ahead during the undo phase.

    After a failover, the new mirror server must undo every change for which a page was written to disk locally but for which the log record might not have reached the former mirror server (the new principal server). To undo such changed pages, the mirror server must first request and receive the corresponding pages from the new principal server. Performance of this part of the undo phase is enhanced in SQL Server 2008. Early in the undo phase, the mirror server sends read-ahead hints to the principal server to indicate which pages will be requested later. After receiving a read-ahead hint for a page, the principal server puts that page in its send buffer. On receiving the corresponding page request, the principal server can respond immediately.

Automatic Recovery from Corrupted Pages

A database mirroring partner running on SQL Server 2008 or later versions automatically tries to resolve certain types of errors that prevent reading a data page. The partner that is unable to read a page requests a fresh copy from the other partner. If this request succeeds, the unreadable page is replaced by the copy, which usually resolves the error. For more information, see Automatic Page Repair During a Database Mirroring Session.

See Also

Concepts