Skip to content

Commit 240bd3b

Browse files
author
Simonx Xu
authored
Merge pull request #8778 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to main to sync with https://github.com/MicrosoftDocs/SupportArticles-docs (branch main)
2 parents c218bf2 + af79892 commit 240bd3b

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

support/sql/database-engine/replication/sql-transaction-log-grows.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: SQL Transaction log grows continuously
33
description: This article helps you resolve the problem where you notice continuous transaction log growth for a CDC enabled database.
4-
ms.date: 03/16/2020
4+
ms.date: 04/23/2025
55
ms.custom: sap:Replication, Change Tracking, Change Data Capture, Synapse Link
66
---
77
# SQL Transaction log grows when you use Change Data Capture for Oracle by Attunity
@@ -37,10 +37,10 @@ DBCC execution completed. If DBCC printed error messages, contact your system ad
3737

3838
You may have a non-distributed LSN because CDC for Oracle uses CDC for SQL stored procedures, and that, in turn, uses the replication log reader. This non-distributed LSN corresponds to the log entries to add the mirrored table in the Attunity CDC database.
3939

40-
If you run this query, the `log_reuse_wait_desc` option returns a value of `REPLICATION`, indicating the cause. Select the `log_reuse_wait_desc` name from `sys.databases`, where the name is \<your_cdc_database\>:
40+
If you run this query, the `log_reuse_wait_desc` option returns a value of `REPLICATION`, indicating the cause.
4141

4242
```sql
43-
REPLICATION <your_cdc_database>
43+
SELECT log_reuse_wait_desc FROM sys.databases WHERE name = '<your_cdc_database>'
4444
```
4545

4646
## Resolution
@@ -78,23 +78,23 @@ REPLICATION <your_cdc_database>
7878
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
7979
```
8080

81-
4. To make sure that the transaction log can be reused, confirm that there is no other reuse reason indicated on the database:
81+
4. To make sure that the transaction log can be reused, confirm that there's no other reuse reason indicated on the database:
8282
8383
```sql
84-
SELECT log_reuse_wait_desc, NAME FROM sys.databases WHERE NAME = 'your_cdc_database'
84+
SELECT log_reuse_wait_desc, NAME FROM sys.databases WHERE NAME = '<your_cdc_database>'
8585
```
8686
8787
This returns output that resembles the following:
8888
8989
```output
9090
log_reuse_wait_desc name
91-
NOTHING your_cdc_database
91+
NOTHING <your_cdc_database>
9292
```
9393
9494
5. Now you should be able to truncate the Transaction log by using log backups. You should also be able to shrink the transaction log file to reduce the disk space that's consumed. For example, run the following:
9595

9696
```sql
97-
BACKUP LOG your_cdc_database TO DISK='c:\folder\logbackup.trn'
97+
BACKUP LOG <your_cdc_database> TO DISK='c:\folder\logbackup.trn'
9898
DBCC SHRINKFILE (yourcdcdatabase_log, 1024)
9999
```
100100

0 commit comments

Comments
 (0)