Sunday, October 20, 2013

Shrink failed for vCenter Database VIM_VCDB



Purging old data from the database used by VMware vCenter Server

------------------------------

Shrink failed for Database ' VIM_VCDB '.  (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.2861.0+((KJ_SP1_QFE-CU).120820-1919+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Shrink+Database&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

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 (Microsoft SQL Server, Error: 9002)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.2861&EvtSrc=MSSQLServer&EvtID=9002&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

SOLUTION

Open MS SQL Server Management Studio

Run Query to check VPX History stat, generally it appears in VPX_HIST_STAT1, but there are more with VPX_HIST_STAT2, VPX_HIST_STAT3…

 it can be checked with query  "exec sp_spaceused VPX_HIST_STAT1" click execute

IF the table value is huge “truncate it” with the following command "truncate table VPX_HIST_STAT1" click execute



Navigate to VIM_VCDB > Programmability > Stored Procedures.



Right-click dbo.cleanup_events_tasks_proc and click Execute Stored Procedure.

This purges the data from the vpx_event, vpx_event_arg, and vpx_task tables based on the date specified for maxAge.



When this has successfully completed, close SQL Management Studio and start the VMware Virtual Center Server service.


No comments:

Post a Comment