Monday, September 9, 2013

What to do when SQL Express VIM database has exceeded the 4GB limit



What to do when SQL Express VIM database has exceeded the 4GB limit

Problem -Event ID: 1827, MSSQL$SQLEXP_VIM

CREATE DATABASE or ALTER DATABASE failed because the resulting cumulative database size would exceed your licensed limit of 4096 MB per database.
You also may see Event ID 1105 in the Event Logs

Solution- Truncate the VCenter Tables to create free disk space

VPX_EVENT Table
·         Open Microsoft Server Management Studio Express
·         Connect to Servername\SQL Database
·         Expand databases- VIM_VCDB, Tables
·         Locate and Right-click on dbo.VPX_PARAMETER table and click Open
·         Modify the event.maxAge to 30, and modify the event.maxAgeEnabled value to true
·         Modify task.maxAge to 30, and modify the task.maxAgeEnabled value to true
·         Run the SQL built-in stored procedure:
·         Go  to the VIM_VCDB, Programability, Stored Procedures
·         Right-click on dbo.cleanup_events_tasks_proc and click Execute Stored Procedure and Select OK. - Note: This process may take a while. This process purges the data from the vpx_event, vpx_event_arg, and vpx_task tables based on the date specified for maxAge.

Solution- Shrink the VCenter VIM_VCDB database and files

To shrink the size of the vCenter Server SQL database and transaction logs:
·         Connect to the vCenter Server database using the SQL Management Studio Express.
·         Stop the VMware VirtualCenter Server service.
·         To Shrink the Database- Right-click the vCenter Server database
·         Select Tasks, Select Shrink Files
·         Select Tasks, Select Shrink Database. Note: This process can take a while based on how much space to shrink on the database
When these processes have completed successfully completed, close the SQL Management Studio Express and start the VMware Virtual VCenter Server service

Also make sure that the default Statistics Level is set to 1 in VCenter
·         Using the vSphere Client, log into vCenter Server as an administrator
·         Go to Administrator, VCenter Server Settings, Statistics
·         Under Statistics Intervals, ensure the Statistics Level column is set to 1
·         To change the value, select the Interval Duration, click Edit and select Level 1 from the dropdown
Note:  VCenter Server may also require a restart. Issues with VCenter and database size may also affect your backups.

No comments:

Post a Comment