You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/relational-databases/accelerated-database-recovery-concepts.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
description: "Accelerated database recovery"
3
3
title: "Accelerated database recovery"
4
-
ms.date: "05/24/2022"
4
+
ms.date: 07/14/2022
5
5
ms.prod: sql
6
6
ms.prod_service: backup-restore
7
7
ms.technology: backup-restore
@@ -83,8 +83,8 @@ The ADR recovery process has the same three phases as the current recovery proce
83
83
84
84
-**Redo** phase
85
85
86
-
Broken into two sub-phases
87
-
-Sub-phase 1
86
+
Broken into two subphases
87
+
-Subphase 1
88
88
89
89
Redo from SLOG (oldest uncommitted transaction up to last checkpoint). Redo is a fast operation as it only needs to process a few records from the SLOG.
90
90
@@ -156,10 +156,11 @@ There are several improvements to address persistent version store (PVS) storage
156
156
157
157
-**Multi-threaded version cleanup**
158
158
159
-
In [!INCLUDE[sssql19-md](../includes/sssql19-md.md)], the cleanup process is single threaded within a SQL Server instance. In SQL Server 2022 (16.x) Preview, the cleanup process has multiple threads, with one thread per SQL Server database.
159
+
In [!INCLUDE[sssql19-md](../includes/sssql19-md.md)], the cleanup process is single threaded within a SQL Server instance.
160
160
161
-
In [!INCLUDE[sssql22-md](../includes/sssql22-md.md)], CTP 2.0, you can also enable multi-threaded version cleanup at the database level with trace flag 3515. This allows multiple threads for cleanup per database. This improvement is valuable when you have a fewer number of large databases.
162
-
To enable trace flag 3515 for the instance, run the following command:
161
+
In [!INCLUDE[sssql22-md](../includes/sssql22-md.md)], CTP 2.0, you can also enable multi-threaded version cleanup at the database level with trace flag 3515. This allows multiple threads for cleanup per database. This improvement is valuable when you have multiple large databases.
162
+
163
+
To enable trace flag 3515 for the instance, run the following command:
163
164
164
165
```sql
165
166
DBCC TRACEON(3515, -1)
@@ -175,6 +176,10 @@ To enable trace flag 3515 for the instance, run the following command:
175
176
RECONFIGURE WITH OVERRIDE;
176
177
```
177
178
179
+
-**New extended event**
180
+
181
+
A new extended event, `tx_mtvc2_sweep_stats`, has been added for telemetry on the ADR PVS multi-threaded version cleaner.
182
+
178
183
## Best practices and guidance
179
184
180
185
For guidance on workloads that are and are not recommended for ADR, see [Manage accelerated database recovery](accelerated-database-recovery-management.md).
@@ -23,7 +23,9 @@ This article helps administrators diagnose issues with accelerated database reco
23
23
24
24
## Examine the persistent version store (PVS)
25
25
26
-
Leverage the `sys.dm_tran_persistent_version_store_stats` DMV to identify if the size of the accelerated database recovery (ADR) PVS is growing larger than expected, and then to determine which factor is preventing persistent version store (PVS) cleanup.
26
+
Leverage the [sys.dm_tran_persistent_version_store_stats](system-dynamic-management-views/sys-dm-tran-persistent-version-store-stats.md) DMV to identify if the size of the accelerated database recovery (ADR) PVS is growing larger than expected, and then to determine which factor is preventing persistent version store (PVS) cleanup.
27
+
28
+
Included in the following sample script is the column `sys.dm_tran_persistent_version_store_stats.pvs_off_row_page_skipped_oldest_aborted_xdesid`, which was added in [!INCLUDE[sssql22-md](../includes/sssql22-md.md)] and contains the number of pages skipped for reclaim due to oldest aborted transactions. If the version cleaner is slow or invalidated, this will reflect how many pages must be kept for aborted transactions.
27
29
28
30
The sample query shows all information about the cleanup processes and shows the current PVS size, oldest aborted transaction, and other details:
*Applies to [!INCLUDE[sql-server-2022](../includes/sssql22-md.md)] and later*
157
+
158
+
Trace flag 4025 can be enabled to record ADR PVS cleanup behavior in the SQL Server error log. Typically this would result in a new log event recorded every 10 minutes. For more information, see [DBCC TRACEON (Transact-SQL)](../t-sql/database-console-commands/dbcc-traceon-transact-sql.md).
0 commit comments