Knowledge Base

Search the Knowledge Base: |
Search the Knowledge Base: |
Troubleshooting transaction logs on a Microsoft SQL database server
Symptoms
-
The transaction log (.ldf ) of the VirtualCenter database may grow to an excessive size
-
VirtualCenter vpxd.log may show an error similar to the following when connected to a Microsoft SQL database: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 .
Purpose
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 the default and has the potential to consume all available disk space if appropriate database maintenance is not performed. It is 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 because of a lack of transaction log space. In these cases if a full backup cannot be performed and there is a need to free up space to be able to get VirtualCenter to start, it is possible to 'commit' and then shrink the transaction logs. To commit and shrink the transaction logs, follow the appropriate procedure below.
Microsoft SQL 2000
-
Log in to to the Microsoft SQL 2000 Server as an administrator.
-
Open SQL Enterprise Manager.
-
Right-click the database that VirtualCenter is using.
-
Click Properties.
-
Click the Options Tab.
-
Set the Recovery Model to Simple as follows:
-
Click OK.
-
Right-click on the database again.
-
Click All Tasks>Shrink Database.
-
On the Shrink Database window, click Files.
-
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. -
Ensure that the Compress pages and then truncate free space from end of file radio button is selected.
-
Click OK to shrink the log.
-
Click OK, to perform a shrink the database, and close the wizard.
Note: If there is more than one transaction log for the database, perform the above steps for each of the logs.
Microsoft SQL 2005
On a Microsoft SQL 2005 server:
-
Log in to to the Microsoft SQL 2005 Server as an administrator.
-
Open up SQL Management Studio.
-
Right-click the database that VirtualCenter is using.
-
Click Properties.
-
Click the Options link.
-
Set the Recovery Model to Simple as follows:
-
Click OK.
-
Once this is complete, right click on the database again.
-
Click Tasks>Shrink>Files.
-
On the Shrink Database window select the file type as 'Log' . The file name appears in the filename drop down as databasename_log as follows:
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. -
Ensure that the Release unused space radio button is selected.
-
Click OK on this window to shrink the transaction log.
Note: If there is more than one transaction log for the database, perform the above steps for each of the logs.
Additional Information
- KB Article: 1003980
- Updated: Nov 17, 2009
- Tags
Troubleshooting - Products:
VMware VirtualCenter - Product Versions:
VMware VirtualCenter 2.0.x
VMware VirtualCenter 2.5.x

