Search the VMware Knowledge Base (KB)
View by Article ID

"The transaction log for database 'VIM_VCDB' is full" error on a Microsoft SQL DB server (1003980)

  • 140 Ratings
Language Editions

Symptoms

  • The transaction log (.ldf) of the VirtualCenter database may grow to an excessive size.
  • The Windows event error states:

    Faulty Application: vpxd.exe

  • Cannot start the VMware VirtualCenter Server service.
  • In the Virtual Center vpxd.log file when connected to Microsoft SQL database, you see the error similar to:

    ODBC error: (42000) - [Microsoft][ODBC SQL Server Driver][SQL Server]The log file for database '<database>' is full. Back up the transaction log for the database to free up some log space.

  • Verbose logging in the VirtualCenter vpxd.log file shows an error similar to:

    [VpxdVdb] Failed to get next sequence number: "ODBC error: (42000) - [Microsoft][SQL Native Client][SQL Server]The transaction log for database 'VIM_VCDB' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases" is returned when executing SQL statement "update vpx_sequence WITH (ROWLOCK) set id = ? where name = ?"

Purpose

This article provides the resolution for the The transaction log for database 'vim_vcdb' is full error on a Microsoft SQL database server.

Resolution

Many customers choose to deploy VirtualCenter Server with a Microsoft SQL Server database. SQL Server offers administrators a choice of recovery models, which is the primary factor that determines transaction log disk space requirements. The full recovery model is default and has the potential to consume all available disk space, if appropriate database maintenance is not performed. It is a best practice to schedule regular backups of the database and transaction log to avoid unnecessary growth.
 
In some instances, VirtualCenter may crash because all disk space is consumed by the transaction logs or not start due to lack of transaction log space. In these cases where full backup cannot be performed and free space is required to get VirtualCenter to start, it is possible to 'commit' and then shrink the transaction logs.
 
To commit and shrink the transaction logs:
 
Note: If this is a production database, backup the database after following these steps. When the transaction log is committed replay is not available for any transactions in a disaster recovery scenario after the last full backup that was performed.  

Microsoft SQL 2000

On a Microsoft SQL 2000 server:
  1. Log in to the Microsoft SQL 2000 Server as an administrator.
  2. Open SQL Enterprise Manager.
  3. Right-click the database that VirtualCenter is using.
  4. Click Properties.
  5. Click the Options Tab.
  6. Set the Recovery Model to Simple as follows:



  7. Click OK.
  8. Right-click on the database again.
  9. Click All Tasks > Shrink Database.
  10. On the Shrink Database window, click Files.
  11. Select the transaction log from the database file list. This appears in the list as databasename_Log as follows:




    The space used versus the space allocated displays. In general after you set the recovery model to Simple you see the majority of the space in the transaction log released.

  12. Check the radio button Compress pages and then truncate free space from end of file.
  13. Click OK to shrink the log.
  14. Click OK to perform a shrink the database and close the wizard.
Free space is now available on the server. If the VMware VirtualCenter Server service was not starting due to lack of space in the transaction log attempt to start the service again at this point.

Note: If there is more than one transaction log for the database, perform the above steps for each of the logs.

Microsoft SQL 2005/2008

On a Microsoft SQL 2005/2008 server:  
 
Note: Microsoft SQL Server Management Studio Express can be used for SQL server 2005 Express Edition. If it is not installed on the server, you cant download and install it from the Microsoft Download Center. For Microsoft SQL 2008 Express edition, see Download Center.

Note: The preceding link was correct as of March 11, 2015. If you find the link is broken, provide feedback and a VMware employee will update the link.

  1. Log in to the Microsoft SQL 2005/2008 Server as an administrator.
  2. Open up SQL Management Studio.

    Note: If you are using MS SQL 2005, ensure that you use MS SQL Management Studio 2005. Alternatively, if you are using MS SQL 2008, ensure that you use MS SQL Management Studio 2008.

  3. Right-click the database that VirtualCenter is using.
  4. Click Properties.
  5. Click the Options link.
  6. Set the Recovery Model to Simple:



  7. Click OK.
  8. Right-click on the database again.
  9. Click Tasks > Shrink > Files.
  10. On the Shrink Database window select the file type as Log . The file name appears in the filename drop down as databasename_log:



    The space used versus the space allocated displays. After you set the recovery model to Simple, the majority of the space in the transaction log released.

  11. Ensure that the Release unused space radio button is selected.
  12. Click OK on this window to shrink the transaction log.
Free space is now available on the server. If the VMware VirtualCenter Server service was not starting due to lack of space in the transaction log attempt to start the service again at this point.
 
Note: If there is more than one transaction log for the database, perform the preceding steps for each of the logs. Also see, Investigating the health of a vCenter Server database (1003979) and Determining where growth is occurring in the vCenter Server database (1028356)

Additional Information

When the database is in simple recovery mode, regular backups of the transaction logs are not required as they do not grow substantially in size. The downside of this model is that it does not keep a record of the transaction logs, and therefore if there is a database failure all changes made after the last full backup are lost. If recovery from a failure is a high priority than the full recovery model must be used. Ensure that regular maintenance is performed by backing up the database and transaction logs. This allows for recovery of all data up until the point of failure. For more information, see the Microsoft article Recovery Models (SQL Server).

Alternatively, you can also configure the autogrow option to manage the growth of transaction logs is to configure the autogrow option. To use this option, engage your DBA. For more information see Microsoft Knowledge Base article 315512.
 
Note: The preceding link was correct as of May 18, 2012. If you find that the link is broken, please provide feedback and a VMware employee will update the link.

Note: SQL Express instance for 2008 R2 has a default restriction of 500 MB on the transaction log. The size can be increased or set to unrestricted (max file size possible).

Tags

vcenter-database-size-growth, vcenter-server-service-fails, vcenter-sql-database-fills-disk, database-transaction-logs, shrinking-a-database, transaction log for database 'vim_vcdb' is full, Excessive SQL logging for VIM_VCDB

See Also

This Article Replaces

The transaction log (.ldf) for my VirtualCenter database on my MSSQL Server is growing very large (1002008)
vCenter service stops when trying to start it (2004511)
vcenter service stops randomly / The transaction log for database 'VCDB' is full (2004816)

Update History

10/11/2011 - Added symptoms of Windows event error. 09/11/2012 - Added link to download SQL express 2008 edition. 02/08/2013 - Added link to articles 1003979 and 1028356 10/08/2015 - Added VMware vCenter Server 6.0.x

Language Editions

ja,1038150;

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 140 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)




Please enter the Captcha code before clicking Submit.
  • 140 Ratings
Actions
KB: