Skip to content

Commit 4a707db

Browse files
Terminology, fit and finish
1 parent e362447 commit 4a707db

3 files changed

Lines changed: 28 additions & 26 deletions

File tree

docs/relational-databases/databases/add-persisted-log-buffer.md

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: "Add persisted log buffer to a database"
3-
description: "Explains how to add a persisted log buffer to a database in SQL Server 2019 and later. Provides Transact SQL examples."
2+
title: "Add persistent log buffer to a database"
3+
description: "Explains how to add a persistent log buffer to a database in SQL Server 2016 and later. Provides Transact SQL examples."
44
author: "briancarrig"
55
ms.author: "brcarrig"
66
ms.reviewer: mikeray
@@ -12,17 +12,18 @@ ms.topic: conceptual
1212
helpviewer_keywords:
1313
- "PMEM"
1414
- "persistent memory"
15+
- "persistent log buffer"
1516
- "persisted log buffer"
1617
- "add log file"
1718
- "create log buffer"
1819
- "remove log buffer"
1920
---
2021

21-
# Add persisted log buffer to a database
22+
# Add persistent log buffer to a database
2223

2324
[!INCLUDE [SQL Server](../../includes/applies-to-version/sqlserver.md)]
2425

25-
This topic describes how to add a persisted log buffer to a database in [!INCLUDE[sqlv16](../../includes/sssql16-md.md)] and above using [!INCLUDE[tsql](../../includes/tsql-md.md)].
26+
This topic describes how to add and remove a persistent log buffer to a database in [!INCLUDE[sqlv16](../../includes/sssql16-md.md)] and above using [!INCLUDE[tsql](../../includes/tsql-md.md)].
2627

2728
## Permissions
2829

@@ -36,13 +37,13 @@ To configure a persistent memory device in [Linux](../../linux/sql-server-linux-
3637

3738
To configure a persistent memory device in [Windows](../../database-engine/configure-windows/configure-persistent-memory.md).
3839

39-
## Add a persisted log buffer to a database
40-
41-
Use the following syntax to add a persisted log buffer to an existing database. The syntax differs depending on the version of [!INCLUDE[ssnoversion-md](../../includes/ssnoversion-md.md)].
40+
## Add a persistent log buffer to a database
4241

4342
The volume or the mount point for the new log file must be formatted with DAX enabled (NTFS) or mounted with the DAX option (XFS/EXT4).
4443

45-
### Add persisted log file in [!INCLUDE[sssql17-md](../../includes/sssql17-md.md)] and later
44+
Use the following syntax to add a persistent log buffer to an existing database. The syntax differs depending on the version of [!INCLUDE[ssnoversion-md](../../includes/ssnoversion-md.md)].
45+
46+
### Add persistent log buffer in [!INCLUDE[sssql17-md](../../includes/sssql17-md.md)] and later
4647

4748
```sql
4849
ALTER DATABASE [DB] SET PERSISTENT_LOG_BUFFER = ON (DIRECTORY_NAME = 'path-to-directory');
@@ -54,9 +55,9 @@ For example:
5455
ALTER DATABASE WideWorldImporters SET PERSISTENT_LOG_BUFFER = ON (DIRECTORY_NAME = 'F:\SQLTLog');
5556
```
5657

57-
The name of the persisted log file buffer is generated automatically. The size of the file is always 20 megabytes.
58+
The name of the persistent log file buffer is generated automatically. The size of the file is always 20 megabytes.
5859

59-
### Add persisted log file in [!INCLUDE[sqlv16](../../includes/sssql16-md.md)]
60+
### Add persistent log buffer in [!INCLUDE[sqlv16](../../includes/sssql16-md.md)]
6061

6162
```sql
6263
ALTER DATABASE [DB] ADD LOG FILE
@@ -78,17 +79,17 @@ SIZE = 20 MB
7879
);
7980
```
8081

81-
The log file on the DAX volume will be sized at 20 megabytes regardless of the size specified with the `ALTER DATABASE ADD LOG FILE` command.
82+
The log buffer file on the DAX volume will be sized at 20 megabytes regardless of the size specified with the `ALTER DATABASE ADD LOG FILE` command.
8283

83-
## Remove a persisted log buffer from a database
84+
## Remove a persistent log buffer from a database
8485

85-
The syntax differs depending on the version of [!INCLUDE[ssnoversion-md](../../includes/ssnoversion-md.md)].
86+
To safely remove a persistent log buffer, the database must be placed in single user mode in order to drain the persistent log buffer.
8687

87-
To safely remove a persisted log buffer, the database must be placed in single user mode in order to drain the persisted log buffer.
88+
When you remove a persistent log buffer, the log buffer file on disk is deleted.
8889

89-
When you remove a persisted log buffer, the log file on disk is deleted.
90+
The syntax differs depending on the version of [!INCLUDE[ssnoversion-md](../../includes/ssnoversion-md.md)].
9091

91-
### Remove persisted log file in [!INCLUDE[sssql17-md](../../includes/sssql17-md.md)] and later
92+
### Remove persistent log buffer in [!INCLUDE[sssql17-md](../../includes/sssql17-md.md)] and later
9293

9394
```sql
9495
ALTER DATABASE [DB] SET PERSISTENT_LOG_BUFFER = OFF;
@@ -100,7 +101,7 @@ For example:
100101
ALTER DATABASE WideWorldImporters SET PERSISTENT_LOG_BUFFER = OFF;
101102
```
102103

103-
### Remove persisted log file in [!INCLUDE[sqlv16](../../includes/sssql16-md.md)]
104+
### Remove persistent log buffer in [!INCLUDE[sqlv16](../../includes/sssql16-md.md)]
104105

105106
```sql
106107
ALTER DATABASE [DB] SET SINGLE_USER;
@@ -118,19 +119,20 @@ ALTER DATABASE WideWorldImporters SET MULTI_USER;
118119

119120
## Limitations
120121

121-
[Transparent Data Encryption (TDE)](../security/encryption/transparent-data-encryption.md) is not compatible with persisted log buffer.
122+
[Transparent Data Encryption (TDE)](../security/encryption/transparent-data-encryption.md) is not compatible with persistent log buffer.
122123

123-
[Availability Groups](../../t-sql/statements/create-availability-group-transact-sql.md) can only use this feature on secondary replicas due to the requirement by the log reader agent for standard log writing semantics on the primary. However, a small log file must be created on all nodes (ideally on DAX volumes or mounts). In the event of a failover, the persisted log buffer path must exist, in order for the failover to be successful.
124+
[Availability Groups](../../t-sql/statements/create-availability-group-transact-sql.md) can only use this feature on secondary replicas due to the requirement by the log reader agent for standard log writing semantics on the primary. However, a small log file must be created on all nodes (ideally on DAX volumes or mounts). In the event of a failover, the persistent log buffer path must exist, in order for the failover to be successful.
124125

125-
In cases where the path or file isn't present during an Availability Group failover event, or database startup, the database enters a `RECOVERY PENDING` state until the issue is resolved.
126+
> [!CAUTION]
127+
> If the persistent log buffer path or file isn't present during an Availability Group failover event, or database startup, the database enters a `RECOVERY PENDING` state until the issue is resolved.
126128
127129
## Interoperability with other PMEM features
128130

129-
When both persisted log buffer and [Hybrid Buffer Pool](../../database-engine/configure-windows/hybrid-buffer-pool.md) are enabled, along with the start up [trace flag 809](../../t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql.md), Hybrid Buffer Pool will operate in what is known as _Direct Write_ mode.
131+
When both persistent log buffer and [Hybrid Buffer Pool](../../database-engine/configure-windows/hybrid-buffer-pool.md) are enabled, along with the start up [trace flag 809](../../t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql.md), Hybrid Buffer Pool will operate in what is known as _Direct Write_ mode.
130132

131133
## Back up and restore operations
132134

133-
Normal restore conditions apply. If persisted log buffer is restored to a DAX volume or mount, it continues to function. If the log is restored to a regular disk volume, it can be safely removed.
135+
Normal restore conditions apply. If persistent log buffer is restored to a DAX volume or mount, it continues to function. If the log is restored to a non-DAX disk volume, it can be safely removed using the `ALTER DATABASE REMOVE FILE` command.
134136

135137
## Next steps
136138

docs/t-sql/statements/alter-database-transact-sql-set-options.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ SET
268268
PERSISTENT_LOG_BUFFER 
269269
{
270270
= OFF
271-
| = ON (DIRECTORY_NAME= '<Filepath to folder on DAX formatted volume>')
271+
| = ON (DIRECTORY_NAME= 'directory-name-on-a-DAX-formatted-volume')
272272
}
273273
}
274274
@@ -1170,7 +1170,7 @@ Enables or disables Stretch Database for the database. For more info, see [Stret
11701170

11711171
**Applies to**: [!INCLUDE[ssSQL17](../../includes/sssql17-md.md)] and later.
11721172

1173-
When this option is specified, the transaction log buffer is created on a volume that is located on a disk device backed by Storage Class Memory (NVDIMM-N nonvolatile storage), also known as a persistent log buffer. For more information, see [Transaction Commit latency acceleration using Storage Class Memory](/archive/blogs/sqlserverstorageengine/transaction-commit-latency-acceleration-using-storage-class-memory-in-windows-server-2016sql-server-2016-sp1) and [Add persisted log buffer to a database](../../relational-databases/databases/add-persisted-log-buffer.md).
1173+
When this option is specified, the transaction log buffer is created on a volume that is located on a disk device backed by Storage Class Memory (NVDIMM-N nonvolatile storage), also known as a persistent log buffer. For more information, see [Transaction Commit latency acceleration using Storage Class Memory](/archive/blogs/sqlserverstorageengine/transaction-commit-latency-acceleration-using-storage-class-memory-in-windows-server-2016sql-server-2016-sp1) and [Add persistent log buffer to a database](../../relational-databases/databases/add-persisted-log-buffer.md).
11741174

11751175
#### \<service_broker_option> ::=
11761176

docs/t-sql/statements/create-database-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ CREATE DATABASE database_name
101101
| TWO_DIGIT_YEAR_CUTOFF = <two_digit_year_cutoff>
102102
| DB_CHAINING { OFF | ON }
103103
| TRUSTWORTHY { OFF | ON }
104-
| PERSISTENT_LOG_BUFFER=ON ( DIRECTORY_NAME='<Filepath to folder on DAX formatted volume>' )
104+
| PERSISTENT_LOG_BUFFER=ON ( DIRECTORY_NAME='directory-name-on-a-DAX-formatted-volume' )
105105
| LEDGER = {ON | OFF }
106106
}
107107
@@ -288,7 +288,7 @@ The following options are allowable only when CONTAINMENT has been set to PARTIA
288288

289289
**Applies to**: [!INCLUDE[ssSQL17](../../includes/sssql17-md.md)] and later.
290290

291-
When this option is specified, the transaction log buffer is created on a volume that is located on a disk device backed by Storage Class Memory (NVDIMM-N nonvolatile storage), also known as a persistent log buffer. For more information, see [Transaction Commit latency acceleration using Storage Class Memory](/archive/blogs/sqlserverstorageengine/transaction-commit-latency-acceleration-using-storage-class-memory-in-windows-server-2016sql-server-2016-sp1) and [Add persisted log buffer to a database](../../relational-databases/databases/add-persisted-log-buffer.md).
291+
When this option is specified, the transaction log buffer is created on a volume that is located on a disk device backed by Storage Class Memory (NVDIMM-N nonvolatile storage), also known as a persistent log buffer. For more information, see [Transaction Commit latency acceleration using Storage Class Memory](/archive/blogs/sqlserverstorageengine/transaction-commit-latency-acceleration-using-storage-class-memory-in-windows-server-2016sql-server-2016-sp1) and [Add persistent log buffer to a database](../../relational-databases/databases/add-persisted-log-buffer.md).
292292

293293
#### LEDGER = {ON | OFF }
294294

0 commit comments

Comments
 (0)