Quantcast
Channel: VMware Communities: Message List - vCenter™ Server
Viewing all articles
Browse latest Browse all 15787

Re: Solution to full transaction log for database VIM_VCDB

$
0
0

Hi,

 

In addition to the first post, and to prevent massive LOG file growth, you should tune the SQL query for VPX_EVENT table.

I had over 8M rows, and it take bunch of GB to delete them all in one shot (actually more than 30GB) ...

 

Just select them 500K per 500K, and the LOG file should not exceed 10Go.

 

Instead of 'delete from vex_event;' as suggested on Dealing with VCenter 4.1 Database Tables Growth | VMware Support Insider - VMware Blogs , just select less rows at once.


1. get to top 1000, in order to know how old is the oldest row.

SELECT TOP 1000 [EVENT_ID]

      ,[CHAIN_ID]

      ,[CREATE_TIME]

  FROM [VCDB].[dbo].[VPX_EVENT]

 

2. query one month and see how much rows would be impacted

SELECT [EVENT_ID]

      ,[CHAIN_ID]

      ,[CREATE_TIME]

  FROM [VCDB].[dbo].[VPX_EVENT] WHERE [CREATE_TIME] <='2013-03-30';   

 

3. Delete theses rows and repeat until clearing the table

deletefrom vpx_event WHERE [CREATE_TIME] <='2013-03-30';

 

You can check the actual size remaining on your table

- properties on table dbo.VPX_EVENT

- storage tab:

     - index space list remaining size,

     - row count remaining rows in this table.


Viewing all articles
Browse latest Browse all 15787

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>