Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Error message when you shrink the transaction log file of a database in SQL Server: "Cannot shrink log file ..."


View products that this article applies to.

Symptoms

When you run a DBCC SHRINKFILE command in SQL Query Analyzer to shrink the specified transaction log file of a database, the transaction log file does not shrink, and you may receive the following error message:

Cannot shrink log file <transaction log file ID> (<transaction log file name>) because total number of virtual log files cannot be fewer than 2.

↑ Back to the top


More information

When a transaction log file has two virtual log files, you cannot shrink the transaction log file by using the DBCC SHRINKFILE command.

↑ Back to the top


References

For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
272318 Shrinking the transaction log in SQL Server 2000 with DBCC SHRINKFILE

324432 DBCC SHRINKFILE and SHRINKDATABASE commands may not work because of sparsely populated text, ntext, or image columns

80629 Transaction log partially truncated

317375 Transaction log grows unexpectedly or becomes full on SQL Server


For more information, visit the following Microsoft Web sites:
Shrinking the Transaction Log

DBCC SHRINKFILE

Attaching and Detaching a Database

↑ Back to the top


Keywords: kbsysadmin, kbprb, KB814574

↑ Back to the top

Article Info
Article ID : 814574
Revision : 11
Created on : 5/31/2007
Published on : 5/31/2007
Exists online : False
Views : 293