0XC0190056

STATUS_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION Fix

This error means you're trying to compress a file while a transaction is open on it. The fix is to close the transaction or compress outside it.

I know this error is infuriating — you're just trying to compress a file or folder to save space, and Windows throws 0XC0190056 at you. Happened to me on a SQL Server backup drive once, and it took me an afternoon to track down the real culprit.

The Quick Fix

The error literally means a transaction has the file locked. The fastest way to break it is to reboot the machine. That kills any dangling transactions from SQL Server, Volume Shadow Copy (VSS), or even a stuck file copy.

  1. Save your work and close all applications.
  2. Restart Windows (not just a log-off; a full reboot).
  3. After the restart, right-click the problematic file or folder, go to Properties > General > Advanced, and check Compress contents to save disk space.
  4. Click OK, then Apply. Choose Apply changes to this folder, subfolders and files if it's a folder.

Nine times out of ten, that's it. The compression completes without error.

Why This Works

NTFS transactions are kernel-level operations that lock file system metadata. SQL Server, for example, wraps backup operations in transactions to ensure consistency. If you try to compress the backup file while that transaction is still open, Windows slaps you with 0XC0190056. A reboot forces all transactions to either commit or roll back, releasing the lock.

The error code itself — STATUS_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION — is a dead giveaway. The NTFS file system doesn't allow compression changes under an active transaction because it could mess up the transaction log's ability to roll back changes.

When the Reboot Doesn't Work

If the error persists after a restart, something is keeping a transaction alive. Here are the usual suspects:

SQL Server Backups

If the file is a SQL Server backup (.bak) or a database file (.mdf, .ldf), run this query to check for active transactions:

SELECT * FROM sys.dm_tran_active_transactions;

Then kill the session causing it with KILL <session_id>. After that, retry the compression.

Volume Shadow Copy (VSS)

VSS snapshots hold transactions open on the entire volume. If you see this error on a system drive or a drive with frequent backups, disable VSS temporarily:

  1. Open an Administrator Command Prompt.
  2. Type vssadmin delete shadows /all to remove all shadow copies.
  3. Retry compression.

If that works, consider excluding the compressed folder from future VSS snapshots.

File Explorer or Antivirus

File Explorer can keep a transaction open when previewing files. Close all Explorer windows and try compressing from a Command Prompt:

compact /C "C:\path\to\file"

Antivirus software (looking at you, McAfee) sometimes opens files with transactional semantics. Pause real-time scanning for five minutes and test.

Preventing This Error

Honestly, the best prevention is to compress files before they get involved in any transaction. Apply compression to folders that don't host active database backups or VSS snapshots.

If you're using SQL Server, never compress a backup file while the backup is running. Wait until the backup completes. Same for Hyper-V VHDX files — compress them when the VM is shut down.

Set a reminder to reboot your server periodically. Even the best-behaved apps leave tiny transactions hanging around, and a weekly reboot clears them out.

Pro tip from years in the trenches: I once spent three hours chasing this error on a file server, only to find the culprit was a user who had the file open in a network share with a dead session. A quick net session /delete fixed it. Check that before you reboot.

If none of this works, the file might be corrupt. Run chkdsk /f on the volume to repair any file system issues, then retry the compression.

Related Errors in Database Errors
ERROR_QUORUM_LOSS (Event ID 4110, 4111) SQL Server Failover Quorum Loss: Fix in 5 Minutes 0X00001A33 Fixing ERROR_RESOURCEMANAGER_READ_ONLY (0x1A33) on Windows 0X000008B4 Fix NERR_ACFNoRoom (0X000008B4) Too Many Names 0XC00D135D Fix NS_E_TRACK_PURCHASE_MAXIMUM_EXCEEDED (0XC00D135D) Quickly

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.