-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDemo - ADR.sql
More file actions
48 lines (29 loc) · 746 Bytes
/
Copy pathDemo - ADR.sql
File metadata and controls
48 lines (29 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
--ADR rollback scenario
USE master
GO
CREATE DATABASE [TestADR]
ALTER DATABASE [TestADR] SET COMPATIBILITY_LEVEL = 150
GO
USE [TestADR]
GO
ALTER DATABASE TestADR SET ACCELERATED_DATABASE_RECOVERY = ON;
SELECT name,is_accelerated_database_recovery_on FROM sys.databases WHERE name='TestADR';
SET STATISTICS IO,TIME ON;
BEGIN TRAN;
UPDATE Votes SET BountyAmount=10;
GO
ROLLBACK;
--Without ADR rollback scenario
USE master
GO
CREATE DATABASE [TestWithoutADR]
ALTER DATABASE [TestWithoutADR] SET COMPATIBILITY_LEVEL = 150
GO
USE [TestWithoutADR]
GO
SELECT name,is_accelerated_database_recovery_on FROM sys.databases WHERE name='TestWithoutADR';
SET STATISTICS IO,TIME ON;
BEGIN TRAN;
UPDATE Votes SET BountyAmount=10;
GO
ROLLBACK;