Knowledge Base

|
Troubleshooting transaction logs on a Microsoft SQL database server (1003980)
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
-
The Virtual Center 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 .
- Verbose logging in the VirtualCenter vpxd.log may show an error similar to the following:
[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
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 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/2008
-
Log in to the Microsoft SQL 2005/2008 Server as an administrator.
-
Open up SQL Management Studio.
Note: If you are using MS SQL 2005, ensure to use MS SQL Management Studio 2005. Alternatively, if you are using MS SQL 2008, ensure to use MS SQL Management Studio 2008. -
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.
Additional Information
Note: Another method which can be used to manage the growth of transaction logs is to configure the autogrow option. Please engage your DBA in regards to the use of this option. For more information see Microsoft KB: http://support.microsoft.com/kb/315512
Tags
See Also
- Investigating the health of a vCenter Server database
- Determining where growth is occurring in the vCenter Server database
- Solucionando problemas del archivo de transacciones (Log) de una Base de Datos Microsoft SQL Server
- Microsoft SQL データベース サーバのトランザクション ログのトラブルシューティング
- Solucionar problemas de registros de transacciones en un servidor de base de datos de Microsoft SQL
This Article Replaces
vCenter service stops when trying to start it (2004511)
vcenter service stops randomly / The transaction log for database 'VCDB' is full (2004816)
Update History
Request a Product Feature
- Updated:
- Categories:
- Languages:
- Product Family:
- Product(s):
- Product Version(s):

