Cannot shrink log file because all logical log files are in use
If you are getting the following error message in Microsoft SQL Server when you try to run
DBCC SHRINKFILE (DBNAME_Log):
Cannot shrink log file 2 (DBNAME_Log) because all logical log files are in use.
Make sure that there are no running transactions, by running the command on the database in question:
It is possible to shrink the transaction log file while the SQL Server database is online, however if transactions are taking place while the operation is running you may experience this error.
Try running it in off hours the
DBCC SHRINKFILE command in off hours, or shut down access to the database from other apps.
Like this? Follow me ↯Tweet Follow @pfreitag
Cannot shrink log file because all logical log files are in use was first published on August 31, 2007.