Book Image

Getting Started with SQL Server 2014 Administration

By : Gethyn Ellis
Book Image

Getting Started with SQL Server 2014 Administration

By: Gethyn Ellis

Overview of this book

Table of Contents (13 chapters)
Getting Started with SQL Server 2014 Administration
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Delayed Durability and transaction log flush


Delayed Durability means that it is possible that there will be transactions that have been reported as committed, and yet aren't written or hardened to the database transaction log. You know this and should be prepared to accept the potential data loss should the system crash or failover. But what if you need to take the system down for some reason? You wouldn't want to lose data as a result of planned outage. So, if your database is using Delayed Durability, you need some way of manually flushing the log to the disk. With SQL Server 2014, there are two ways to do this:

  • You can execute the system-stored procedure called sp_flush_log. This will flush all committed transactions that are using the Delayed Durability option to the disk. To force a full flush of the in-memory log to the disk, execute the command exec sp_flush_log.

You can also execute a fully durable transaction that makes changes to the same database. This will also force a flush of...