Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Getting Started with SQL Server 2014 Administration

You're reading from  Getting Started with SQL Server 2014 Administration

Product type Book
Published in Apr 2014
Publisher Packt
ISBN-13 9781782172413
Pages 106 pages
Edition 1st Edition
Languages
Author (1):
Gethyn Ellis Gethyn Ellis
Profile icon Gethyn Ellis
Toc

Delayed Durability and potential data loss


In this section, you will discover how it is possible for you to lose data contained in a committed transaction using Delayed Durability.

The following script will create a database called DB1 on a SQL Server 2014 instance:

--Create database DB1
CREATE DATABASE [DB1]
GO

Then you will create a table in the DB1 database called t1. It will be a simple table with two columns called ID and Name:

USE DB1
GO
CREATE TABLE t1 (
  ID int,
  Name Varchar(20))

The following script inserts two rows into the table t1:

USE [DB1]
GO

INSERT INTO [dbo].[t1]
           ([ID]
           ,[Name])
     VALUES
           (1,'Seth'),
           (2,'Jake')
GO

The following script will change the database level Delayed Durability option to Forced. Therefore, all transactions will use Delayed Durability:

USE [master]
GO
ALTER DATABASE [DB1] SET DELAYED_DURABILITY = FORCED WITH NO_WAIT
GO

We will then set up a performance monitor and configure it to monitor log flushes. I am going...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}