DBCC SHRINKFILE Fails to Shrink Log File in SQL Server 2005!
SQL Server is one of the popular and extensively used database management systems. It can safely store and manage huge amount of data. But due to continuous storage of data size of database increases and in due course of time it affects the performance of database. Oversized database results in corruption and causes system crash. Sometimes it also gives rise to serious data loss problems. So, to prevent data loss and other issues of SQl database it is advised to shrink log file in order to delete unwanted pages of database.
Most of the time SQL users try to truncate the file manually by using SQL server tools like DBCC SHRINKFILE or SQL Server Enterprise Manager under full recovery model in SQL server 2005. Shrinking through this tool is quite easy and faster in 2005 than earlier versions so people prefer it. It is possible that due to some adverse reasons the tool fails to perform the shrink operation and you are unable to truncate the file. Most probably the issue arises due to corruption in database. Under such circumstances you need third party software to repair the corruption.
You might have experienced below error message when you try to shrink log file using DBCC SHRINKFILE.
"Server: Msg 8908, Level 22, State 6, Line 1 Table error: Database ID 7, object ID 8, index ID 0. Chain linkage mismatch. (1:679928)->next = (1:679929), but (1:679929)->prev = (1:679930)."
Once the error appears you are unable to reduce the file size as the process gets interrupted and your database becomes inaccessible. So, to sort out the problem and gain access over the data you have to find the root cause of the error. The major reasons responsible for the interruption of truncation process and the occurrence of error are mentioned below:
- DBCC SHRINKFILE unable to delete any page from master database file or sysfile1 system table
- Database becomes corrupted
To shrink log file safely you can use latest service pack of SQL server or you have to restore your database using any third party SQL recovery solutions. You can use MS SQL Database Repair software to safely repair and restore the corrupt database. It safely restores all SQl objects and works with all versions of SQL database.




