ESXi

 View Only
  • 1.  VMware vSphere vCenter database log file growing rapidly

    Posted Jul 09, 2010 02:57 PM

    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.



  • 2.  RE: VMware vSphere vCenter database log file growing rapidly

    Posted Jul 09, 2010 03:01 PM

    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.



  • 3.  RE: VMware vSphere vCenter database log file growing rapidly

    Posted Jul 09, 2010 03:02 PM

    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_Transaction_Log



  • 4.  RE: VMware vSphere vCenter database log file growing rapidly

    Posted Aug 06, 2010 10:09 AM

    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)



  • 5.  RE: VMware vSphere vCenter database log file growing rapidly

    Posted Aug 09, 2010 02:03 PM

    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



  • 6.  RE: VMware vSphere vCenter database log file growing rapidly

    Posted Aug 09, 2010 03:09 PM

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



  • 7.  RE: VMware vSphere vCenter database log file growing rapidly

    Posted Aug 10, 2010 07:48 AM

    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:



  • 8.  RE: VMware vSphere vCenter database log file growing rapidly

    Posted Jul 09, 2010 04:35 PM

    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.



  • 9.  RE: VMware vSphere vCenter database log file growing rapidly

    Posted Jul 09, 2010 06:28 PM

    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.



  • 10.  RE: VMware vSphere vCenter database log file growing rapidly

    Posted Jul 09, 2010 06:33 PM

    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