{"id":247,"date":"2016-12-12T21:46:11","date_gmt":"2016-12-12T19:46:11","guid":{"rendered":"http:\/\/itsimple.info\/?p=247"},"modified":"2016-12-12T21:46:11","modified_gmt":"2016-12-12T19:46:11","slug":"vmware-vcenter-database-over-10-giga","status":"publish","type":"post","link":"https:\/\/itsimple.info\/?p=247","title":{"rendered":"vmware vcenter database over 10 giga"},"content":{"rendered":"<div>Vcenter running SQL Express. \u00a0&#8220;VIM_VCDB&#8221; reached 10GB and so crashes Vcenter !!<\/div>\n<div>To purge the data in the <code><span style=\"font-family: Courier New; font-size: small;\">VPX_EVENT<\/span><\/code> table:<\/div>\n<ol>\n<li>Connect to <code><span style=\"font-family: Courier New; font-size: small;\"><em>Servername<\/em>\\SQL Database<\/span><\/code> and log in with the appropriate credentials.<\/li>\n<li>Click <b>databases<\/b> to expand and select\u00a0<strong>VIM_VCDB<\/strong> &gt; <strong>Tables<\/strong>.<strong>Note<\/strong>: By default, the vCenter Server database is named\u00a0<code><span style=\"font-family: Courier New; font-size: small;\">VIM_VCDB<\/span><\/code>, unless it was renamed during initial creation.<\/li>\n<li>Right-click the dbo.VPX_PARAMETER table and click <strong>Open<\/strong>.<strong>Note<\/strong>: If you are using SQL Server 2008, right-click the dbo.VPX_PARAMETER table and click <strong>Edit Top 200 Rows<\/strong>.<\/li>\n<li>Modify <span style=\"font-family: Courier New;\">event.maxAge<\/span> to <span style=\"font-family: Courier New; font-size: small;\">30<\/span> and the <span style=\"font-family: Courier New;\">event.maxAgeEnabled<\/span> value to <span style=\"font-family: Courier New; font-size: small;\">true<\/span>.<\/li>\n<li>Modify <span style=\"font-family: Courier New;\">task.maxAge<\/span> to <span style=\"font-family: Courier New; font-size: small;\">30<\/span> and the <span style=\"font-family: Courier New;\">task.maxAgeEnabled<\/span> value to <span style=\"font-family: Courier New; font-size: small;\">true<\/span>.<strong>Note<\/strong>:\u00a0To improve the time of the data cleanup, run the preceding steps in several intervals:\n<ol type=\"a\">\n<li>Ensure to keep the\u00a0default value of <span style=\"font-family: Courier New; font-size: small;\">event.maxAge<\/span>\u00a0and\u00a0<span style=\"font-family: Courier New; font-size: small;\">task.maxAge.<\/span><\/li>\n<li>Perform step 6 to run the cleanup.<\/li>\n<li>Reduce the\u00a0<span style=\"font-family: Courier New; font-size: small;\">event.maxAge<\/span>\u00a0and <span style=\"font-family: Courier New; font-size: small;\">task.maxAge<\/span>\u00a0value by 60 and run the cleanup.<\/li>\n<li>Repeat the steps a-c\u00a0until\u00a0the value is\u00a0reached to\u00a030 for the final cleanup process.<\/li>\n<\/ol>\n<\/li>\n<li>Run the built-in stored procedure:\n<ol type=\"a\">\n<li>Go to <strong>VIM_VCDB<\/strong> &gt; <strong>Programmability<\/strong> &gt; <strong>Stored Procedures<\/strong>.<\/li>\n<li>Right-click <strong>dbo.cleanup_events_tasks_proc<\/strong> and select <strong>Execute Stored Procedure<\/strong>.This purges the data from the <span style=\"font-family: Courier New; font-size: small;\">vpx_event, vpx_event_arg<\/span>, and <span style=\"font-family: Courier New; font-size: small;\">vpx_task<\/span>\u00a0tables based on the date specified for <strong>maxAge<\/strong>.<\/li>\n<li>When\u00a0purging\u00a0is\u00a0successfully completed, close the\u00a0SQL Management Studio and start the VMware Virtual Center Server service.<\/li>\n<\/ol>\n<\/li>\n<li>Ensure that the default Statistics Level is set to 1:\n<ol type=\"a\">\n<li>Using the vSphere Client, log in to vCenter Server as an administrator.<\/li>\n<li>Go to <strong>Administration<\/strong> &gt; <strong>vCenter Server Settings<\/strong> &gt; <strong>Statistics<\/strong>.<\/li>\n<li>Under Statistics Intervals<em>,<\/em> ensure the Statistics Level column is set to <span style=\"font-family: Courier New;\">1<\/span>.<\/li>\n<li>To change the value, select the <strong>Interval Duration<\/strong>, click <strong>Edit<\/strong> and select <strong>Level 1<\/strong> from the list.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<div><strong>Notes<\/strong>:<\/div>\n<ul>\n<li>The execution of\u00a0<code><span style=\"font-family: Courier New; font-size: small;\">dbo.cleanup_events_tasks_proc<\/span><\/code>\u00a0may take a long period of time depending on the database size.<\/li>\n<li>The operation may fail due to the transaction logs being filled up at multiple intervals based on the data to be purged. You must shrink the Transaction logs when required and run\u00a0<code><span style=\"font-family: Courier New; font-size: small;\">dbo.cleanup_events_tasks_proc<\/span><\/code>\u00a0again.<\/li>\n<\/ul>\n<h3>Truncate the event and tasks table<\/h3>\n<div>\n<p>To Truncate the\u00a0event and tasks table, run this script:<\/p>\n<p><span style=\"font-family: Courier New; font-size: small;\">alter table VPX_EVENT_ARG drop constraint FK_VPX_EVENT_ARG_REF_EVENT, FK_VPX_EVENT_ARG_REF_ENTITY<br \/>\nalter table VPX_ENTITY_LAST_EVENT drop constraint FK_VPX_LAST_EVENT_EVENT<br \/>\ntruncate table VPX_TASK<br \/>\ntruncate table VPX_ENTITY_LAST_EVENT<br \/>\ntruncate table VPX_EVENT<br \/>\ntruncate table VPX_EVENT_ARG<br \/>\nalter table VPX_EVENT_ARG add constraint FK_VPX_EVENT_ARG_REF_EVENT foreign key(EVENT_ID) references VPX_EVENT (EVENT_ID) on delete cascade,<br \/>\nconstraint FK_VPX_EVENT_ARG_REF_ENTITY foreign key (OBJ_TYPE) references VPX_OBJECT_TYPE (ID)<br \/>\nalter table VPX_ENTITY_LAST_EVENT add constraint FK_VPX_LAST_EVENT_EVENT foreign key(LAST_EVENT_ID)<br \/>\nreferences VPX_EVENT (EVENT_ID) on delete cascade<\/span><\/p>\n<\/div>\n<p>More inforamtion :<\/p>\n<p><strong><a href=\"http:\/\/bohemiangrove.co.uk\/vmware-vcenter-server-5-5-database-is-full\/\">http:\/\/bohemiangrove.co.uk\/vmware-vcenter-server-5-5-database-is-full\/<\/a><\/strong><\/p>\n<p><strong><a href=\"https:\/\/kb.vmware.com\/selfservice\/microsites\/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1025914\">https:\/\/kb.vmware.com\/selfservice\/microsites\/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1025914<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Vcenter running SQL Express. \u00a0&#8220;VIM_VCDB&#8221; reached 10GB and so crashes Vcenter !! To purge the data in the VPX_EVENT table: Connect to Servername\\SQL Database and log in with the appropriate credentials. Click databases to expand and select\u00a0VIM_VCDB &gt; Tables.Note: By default, the vCenter Server database is named\u00a0VIM_VCDB, unless it was renamed during initial creation. Right-click [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,19],"tags":[],"class_list":["post-247","post","type-post","status-publish","format-standard","hentry","category-virtualization","category-vmware"],"_links":{"self":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=247"}],"version-history":[{"count":0,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/247\/revisions"}],"wp:attachment":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}