VMware Cloud Community
itagsurya
Contributor
Contributor

VMware vSphere vCenter database log file growing rapidly

Hi Friends,

we have Problem in VMware vCenter 4.0 U1 server. the problem is with our VMware vCenter database log file.Unexpectedly it is growing rapidly.We shrink the log file,again the log file growing rapidly.the database was MS SQL Server 2005 Standard Edition.we havent done any modification in VMware infrastrutre.We are facing this issue from last two days.the database log so a big growing in the last days.

anybody facing this issue ?.Please provide us solution.

Regards

Surya.

if you found this or other information useful, please consider awarding points for "Correct" or "Helpful"
Reply
0 Kudos
9 Replies
RParker
Immortal
Immortal

We shrink the log file,again the log file growing rapidly.the database was MS SQL Server 2005 Standard Edition

Let me spare you some trouble, the LOG keeps track of EVERYTHING that happens in vSphere. EVERYTHING. Migrations, delete, add, moves to resource pools, create of VM's, adding hosts, chaning NIC.... everything.

So it's not crazy to assume the log file will grow.

Currently we have 26 ESX server and about 650 VM's. The database is almost 40GB, and the LOG file is 300GB.

You can't really restrict it. That's what SQL does, LOGS every transaction, change, history, archive, and event.. anything that happens on that Database is tracked.

Reply
0 Kudos
Troy_Clavell
Immortal
Immortal

here's a good whitepaper. Also, you may consider running your DB in simple mode, which may help

http://www.vmware.com/files/pdf/vc_microsoft_sql_server.pdf

Finally, this may help in getting your transaction log under control

http://www.poorperformance.com/wiki/index.php?title=How_to_Reduce_the_Size_of_the_SQL_Server_Transac...

Reply
0 Kudos
toha
Enthusiast
Enthusiast

First, check that your SQL Server Agent is running on SQL Server host, sounds like it has stopped and scheduled VCDB maintenance runs are not running.

Second, I agree with Troy that run VCDB database logging in simple mode, also make sure that you have regular backup schedule set for your VCDB.

Reply
0 Kudos
RParker
Immortal
Immortal

Second, I agree with Troy that run VCDB database logging in simple mode, also make sure that you have regular backup schedule set for your VCDB.

Well simple mode is in the configuration for how you setup vCenter database in the first place. So if you digress from that, that's your mistake.

Also OUR 300GB log file is the result of "simple mode", so that means FULL mode would be 400 or 500GB database in our case. So that doesn't make a difference, it's still a HUGE file.

Reply
0 Kudos
Troy_Clavell
Immortal
Immortal

Well simple mode is in the configuration for how you setup vCenter database in the first place. So if you digress from that, that's your mistake.

full recovery, unless I am mistaken, is still the default, you most switch to simple

http://kb.vmware.com/kb/1003980

Reply
0 Kudos
Atmos4
Enthusiast
Enthusiast

Thanks for the hint with simple mode.

I had the same problem after migrating to vCenter 4.1, probably because automatic db migration didn't work and I had to manually import the db with corrected paths.

DB was in mass protocol mode instead of simple.

This is what I did to fix it and reclaim the transaction log space:

  • Full Backup of vCenter DB

  • Backup transaction log twice

  • Stop vCenter Service

  • Shrink transaction log (should now be 99% free)

  • Backup transaction log again

  • Now transaction log size should be 1 MB

  • Switch DB logging to simple mode

  • Do a full backup of vCenter DB (because of new backup type)

  • Start vCenter Web Services (will also start vCenter Service)

Reply
0 Kudos
itagsurya
Contributor
Contributor

HI all,

here i got the solution useing this command.

  • Full Backup of vCenter DB

  • Backup transaction log twice

  • Stop vCenter Service

  • then u have to run below command.

  • use SQLEXP_VIM
    DBCC SHRINKFILE(SQLEXP_VIM_log,2048)

regards

surya

if you found this or other information useful, please consider awarding points for "Correct" or "Helpful"
Reply
0 Kudos
athlon_crazy
Virtuoso
Virtuoso

Thanks for sharing dude! but just want to ask, what is the significant to have backup transaction twice? Is this compulsary or what?

http://www.no-x.org
Reply
0 Kudos
Atmos4
Enthusiast
Enthusiast

You need to backup transaction log twice in order to flush it.

Am 09.08.2010 um 17:09 schrieb athlon_crazy <communities-emailer@vmware.com>:

Felix Buenemann,

A new message was posted in the thread "VMware vSphere vCenter database log file growing rapidly":

http://communities.vmware.com/message/1587152#1587152

Author : athlon_crazy

Profile : http://communities.vmware.com/people/athlon_crazy

Message:

Reply
0 Kudos