In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how to remove the old data from the database used by vCenter Server. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
If your vCenter Server fails to start, verify that the VPX_EVENT and VPX_ task tables are full and manually empty the database as needed.
When the vCenter Server database is full:
Unable to log in to vCenter Server.
The VMware VirtualCenter Server service may stop immediately after starting.
The Microsoft SQL event log reports the following error:
Cannot allocate space for the database 'objects in VCDB'' dbo.VPX_EVENT'.'VPXI_EVENT_USERNAME' because the 'PRIMARY' filegroup is full. Delete unwanted files, delete objects in the filegroup, add other files to the filegroup, or enable automatic growth for existing files in the filegroup to increase available disk space. (Could not allocate space for object 'dbo.VPX_EVENT'.'VPXI_EVENT_USERNAME' in database' VCDB' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.)
To resolve this issue, manually clear or truncate the vCenter Server database.
Note: VMware recommends that you stop the VMware VirtualCenter Server service and create a complete and reliable backup of your database before attempting to perform this process.
Note:
If you are using SQL 2005 Express, you may need to download and install Microsoft SQL Server Management Studio Express.
SQL Express 2005 Universe 2008 (vCenter Server 5.x packaged with SQL Express 2008) supports up to 5 hosts and 50 virtual machines. If your environment exceeds these thresholds, you must upgrade the database to the SQL Standard version.
If there is not enough free disk space, the database transaction log may be filled up in the process. For SQL Server, if the required disk space is not available, one option is to use the "simple" recovery model for the database during this operation.
Clear the task and event table
Note: if it takes a long time to clean up the database, truncate the events and task tables to clean up the database.
To clear the data in the VPX_EVENT table:
Connect to Servername\ SQL Database and log in with the appropriate credentials.
Click the database to expand, and then select VIM_VCDB > Table.
Note: by default, the name of the vCenter Server database is VIM_VCDB, unless it is renamed at the beginning of creation.
Right-click the dbo.VPX_PARAMETER table, and then click Open.
Note: if you are using SQL Server 2008, right-click the dbo.VPX_PARAMETER table and click to edit the first 200 rows.
Change the event.maxAge to 30 and the event.maxAgeEnabled value to true.
Change the task.maxAge to 30 and the task.maxAgeEnabled value to true.
Note: to reduce the data cleanup time, run the above steps in multiple intervals:
Be sure to leave the default value of event.maxAge, task.maxAge.
Perform step 6 to run the cleanup task.
Reduce the event.maxAge and task.maxAge values by 60, and then run the cleanup task.
Repeat steps a through c until the value reaches 30 and the final cleanup process is performed.
Run the built-in stored procedure:
Navigate to VIM_VCDB > programmability > stored procedure.
Right-click dbo.cleanup_events_tasks_proc and select execute stored procedure.
This clears data from the vpx_event, vpx_event_arg, and vpx_task tables based on the date specified for maxAge.
After the cleanup operation completes successfully, close SQL Management Studio and start the VMware Virtual Center Server service.
Ensure that the default statistics level is set to 1:
Log in to vCenter Server as an administrator using vSphere Client.
Go to Administration > vCenter Server Settings > Statistics.
Under Statistics interval, make sure the Statistics level column is set to 1.
To change this value, select the interval, click Edit, and then select level 1 from the list.
Note:
It may take a long time to execute dbo.cleanup_events_tasks_proc, depending on the size of the database.
Because the transaction log will be populated at multiple intervals based on the data to be purged, the operation may fail. You must shrink the Transaction log when needed, and then rerun dbo.cleanup_events_tasks_proc.
Truncate events and task tables
To truncate events and task tables, run the following script:
Alter table VPX_EVENT_ARG drop constraint FK_VPX_EVENT_ARG_REF_EVENT, FK_VPX_EVENT_ARG_REF_ENTITY
Alter table VPX_ENTITY_LAST_EVENT drop constraint FK_VPX_LAST_EVENT_EVENT
Truncate table VPX_TASK
Truncate table VPX_ENTITY_LAST_EVENT
Truncate table VPX_EVENT
Truncate table VPX_EVENT_ARG
Alter table VPX_EVENT_ARG add constraint FK_VPX_EVENT_ARG_REF_EVENT foreign key (EVENT_ID) references VPX_EVENT (EVENT_ID) on delete cascade
Constraint FK_VPX_EVENT_ARG_REF_ENTITY foreign key (OBJ_TYPE) references VPX_OBJECT_TYPE (ID)
Alter table VPX_ENTITY_LAST_EVENT add constraint FK_VPX_LAST_EVENT_EVENT foreign key (LAST_EVENT_ID)
References VPX_EVENT (EVENT_ID) on delete cascade
Using the following Microsoft SQL Studio options does not help clear the VPX_EVENT and VPX_TASK tables:
Clear old data
Truncation table
Shrink logs and databases
Recreate the summary job
On how to remove old data from the database used by vCenter Server to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.