Skip to content
You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
You are viewing the article in preview mode. It is not live at the moment.
IMPORTANT: Upcoming Changes in CAREWare > Learn More

Transaction log fails to shrink

 

Purpose

Safely troubleshoot a SQL Server transaction log that does not shrink for a CAREWare database.

Who should do this

Database administrators or qualified IT staff with SQL Server backup and recovery experience.

Use this guide when

A CAREWare SQL Server transaction log remains large after normal maintenance.

Main warning

Changing recovery models interrupts the transaction-log backup chain. Confirm recovery requirements and obtain approval before proceeding.

Quick path

SQL Server Management Studio (SSMS) > Databases > select database > Properties > Options / Tasks > Shrink > Files

Before you begin

• Confirm the affected database, current recovery model, available disk space, and backup schedule.

• Check for active transactions, log reuse wait reasons, and outstanding log backups before changing recovery settings.

• Verify that a recoverable full backup exists and that the backup location is separate from the production database server.

Important
The original procedure switches from FULL to SIMPLE recovery, shrinks the log, switches back to FULL, and performs a new full backup. Use it only when approved by the database administrator; it can remove point-in-time recovery continuity.

Troubleshoot the log before shrinking

Step 1. Open SSMS and identify the affected CAREWare database and its transaction-log file.

Step 2. Check the database recovery model, log reuse wait, active transactions, and recent backup history.

Step 3. If the database uses FULL recovery, first determine whether a normal transaction-log backup and resolution of the reuse wait will allow safe truncation.

Recovery-model reset (only when approved)

Step 1.Make a full backup

Step 2. Switch recovery mode to simple

Step 3. Shrink the transaction log with truncate

Step 4. Switch recovery mode to full

Step 4. Perform another full backup

 

Important
Do not use obsolete BACKUP LOG ... WITH TRUNCATE_ONLY syntax. Shrinking cannot remove active log records, and switching to SIMPLE does not guarantee the log will shrink.

Confirm the maintenance worked

• Verify that the log file is an appropriate size and that SQL Server reports sufficient free space.

• Confirm the database is in the intended recovery model and the new full backup is usable.

• Confirm CAREWare connectivity and monitor log growth after routine transactions and log backups.

Helpful maintenance tips

Tip
Avoid repeated shrinking or enabling Auto Shrink. If the log grows again, correct the cause (backup cadence, long-running transactions, or workload) and size the log for normal activity.

Troubleshooting and common questions

Why is the log still large?

Active transactions, a log reuse wait, or insufficient truncatable space can prevent a shrink.

Why did the log grow again?

The workload may require that space; review log backup frequency, growth settings, and the underlying transaction pattern.

Should I switch to SIMPLE every time?

No. Preserve FULL recovery when point-in-time recovery is required; investigate log reuse and take log backups first.

Related CAREWare guides and resources

Resource

How it helps

Managing CAREWare Data

CAREWare backup and restore workflow.

Considerations When Upgrading CAREWare

SQL Server backup and restore guidance when CAREWare is unavailable.

CW Admin Utility

SQL Server settings; recommendation to leave Auto Shrink off.

Minimum Requirements

Storage capacity and backup space planning.

Recovery Models (SQL Server)

Microsoft explanation, guidance, and instructions for SQL recovery models.

DBCC Shrink File (Transact-SQL)

Microsoft explanation, guidance, and instructions for SQL shrink file transaction

 

Feedback

0 out of 0 found this helpful

Attachments

Transaction_Log_Fails_to_Shrink.pdf
jProg is a registered trademark of Jeff Murray's Programming Shop, Inc. All other products mentioned are registered trademarks or trademarks of their respective companies. Questions or problems regarding this web site should be directed to [email protected]. Copyright (c) 1998-2023 Jeff Murray's Programming Shop, Inc. (jProg), all rights reserved. jProg provides no warranty on accuracy, quality, reliability, or fitness of purpose for advice or other content provided on this website or for content provided by others on sites linked here.