Skip to content

Commit f5e4ace

Browse files
authored
Pencil edits
1 parent 6c3fbbb commit f5e4ace

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

docs/relational-databases/logs/troubleshoot-a-full-transaction-log-sql-server-error-9002.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ A very common solution to this problem is to ensure transaction log backups are
6363

6464
### Log truncation explained
6565

66-
There is a difference between truncating a transaction log and shrinking a transaction log. [Log Truncation](the-transaction-log-sql-server.md#Truncation) occurs normally during a transaction log backup, and is a logical operation which removes committed records inside the log, whereas [log shrinking](../../t-sql/database-console-commands/dbcc-shrinkfile-transact-sql.md#shrinking-a-log-file) reclaims physical space on the file system by reducing the file size. Log truncation occurs on a [virtual-log-file (VLF)](../sql-server-transaction-log-architecture-and-management-guide.md#physical_arch) boundary, and a log file may contain many VLFs. A log file can be shrunk only if there is empty space inside the log file to reclaim. Shrinking a log file alone cannot solve the problem of a full log file, instead, you must discover why the log file is full and cannot be truncated.
66+
There's a difference between truncating a transaction log and shrinking a transaction log. [Log Truncation](the-transaction-log-sql-server.md#Truncation) occurs normally during a transaction log backup, and is a logical operation which removes committed records inside the log, whereas [log shrinking](../../t-sql/database-console-commands/dbcc-shrinkfile-transact-sql.md#shrinking-a-log-file) reclaims physical space on the file system by reducing the file size. Log truncation occurs on a [virtual-log-file (VLF)](../sql-server-transaction-log-architecture-and-management-guide.md#physical_arch) boundary, and a log file may contain many VLFs. A log file can be shrunk only if there's empty space inside the log file to reclaim. Shrinking a log file alone can't solve the problem of a full log file, instead, you must discover why the log file is full and can't be truncated.
6767

6868
> [!WARNING]
6969
> Data that is moved to shrink a file can be scattered to any available location in the file. This causes index fragmentation and might slow the performance of queries that search a range of the index. To eliminate the fragmentation, consider rebuilding the indexes on the file after shrinking. For more information, see [Shrink a database](../databases/shrink-a-database.md).
@@ -72,7 +72,7 @@ There is a difference between truncating a transaction log and shrinking a trans
7272

7373
To discover what is preventing log truncation in a given case, use the `log_reuse_wait` and `log_reuse_wait_desc` columns of the `sys.databases` catalog view. For more information, see [sys.databases (Transact-SQL)](../../relational-databases/system-catalog-views/sys-databases-transact-sql.md). For descriptions of factors that can delay log truncation, see [The Transaction Log (SQL Server)](../../relational-databases/logs/the-transaction-log-sql-server.md).
7474

75-
The following set of T-SQL commands will help you identify if a database transaction log is not truncated and the reason for it. The following script will also recommend steps to resolve the issue:
75+
The following set of T-SQL commands will help you identify if a database transaction log isn't truncated and the reason for it. The following script will also recommend steps to resolve the issue:
7676

7777

7878
```tsql
@@ -339,7 +339,7 @@ Sometimes you just have to end the transaction; you may have to use the [KILL](.
339339

340340
### AVAILABILITY_REPLICA log_reuse_wait
341341

342-
When transaction changes at primary Availability replica are not yet hardened on the secondary replica, the transaction log on the primary replica cannot be truncated. This can cause the log to grow , and can occur whether the secondary replica is set for synchronous or asynchronous commit mode. For information on how to troubleshoot this type of issue see [Error 9002. The transaction log for database is full due to AVAILABILITY_REPLICA error](/troubleshoot/sql/availability-groups/error-9002-transaction-log-large)
342+
When transaction changes at primary Availability replica are not yet hardened on the secondary replica, the transaction log on the primary replica cannot be truncated. This can cause the log to grow, and can occur whether the secondary replica is set for synchronous or asynchronous commit mode. For information on how to troubleshoot this type of issue see [Error 9002. The transaction log for database is full due to AVAILABILITY_REPLICA error](/troubleshoot/sql/availability-groups/error-9002-transaction-log-large)
343343

344344
### CHECKPOINT log_reuse_wait
345345

@@ -354,7 +354,7 @@ select * from sys.dm_db_log_info(db_id('dbname'))
354354

355355
### For more information on log_reuse_wait factors
356356

357-
For a more details see [Factors that can delay log truncation](../../relational-databases/logs/the-transaction-log-sql-server.md#FactorsThatDelayTruncation)
357+
For more details see [Factors that can delay log truncation](../../relational-databases/logs/the-transaction-log-sql-server.md#FactorsThatDelayTruncation)
358358

359359
## 2. Resolve full disk volume
360360

@@ -384,7 +384,7 @@ For more information see [Add Data or Log Files to a Database](../../relational-
384384
### Utility script for recommended actions
385385

386386

387-
These steps can be partly-automated by running this T-SQL script which will identify logs files that using a large percentage of disk space and suggest actions:
387+
These steps can be partly automated by running this T-SQL script which will identify logs files that using a large percentage of disk space and suggest actions:
388388

389389

390390
```tsql

0 commit comments

Comments
 (0)