Transactional Log full Error while upgrading


While working on one of the upgrade cases, Me and Premal recently came across a very strange problem. The upgrade got stuck in between with TFS error “DB was full, contact your administrator”

On further investigation, I found an erroneous entry in SQL Error Log: “The transaction log for database 'Tfs_DefaultCollection' is full”.

This was extremely strange as we had backed up the database from production server and restored it to test server and there was ample space in the disk drive.

In this scenario restore the backups again and perform repeat the upgrade steps after following these steps.

  1. Execute this SQL query. select log_reuse_wait_desc,* from sys.databases
  2. Check the first column value for TFS databases :

      

 

3.If the output value of “log_reuse_wait_desc” for any TFS database is Nothing  Then move to step 5 Else, perform the action as suggested in this column (i.e. take a Checkpoint or transactional backup) Right click on database->Backup

4.We will have to make sure output is nothing, so re-run the query after taking backup. We need to perform these steps because the end of the backup file has been marked with TLog backup and unless we take a backup we may not be able to shrink it.

5. Once this is done shrink the database ( http://msdn.microsoft.com/en-IN/library/ms189035.aspx )and make sure Auto Growth option of the database is set to “unlimited”. This is an option steps, if first 4 steps don’t help, this step becomes mandatory

6.Next, we will check the recovery model of the database. We can change this to “simple” (this is automatically done by TFS while upgrading) to avoid any errors.

     

We hope this information proves useful!

Written by: Premal and Nitish

Reviewed by: Nitish Nagpal, Support Escalation Engineer

 


Comments (0)

Skip to main content