Or, vcenter_log.ldf consuming huge disk space on
vCenter server.
Or, How to shrink vcenter_log.ldf database in vCenter
server?
Or, How to release log file or .ldf file occupied
space in SQL database?
Descriptions: Friends, this is a very common task for across all SQL Databases but in
this article we will be exploring it in respect of vCenter server which is
running on SQL database. You can shrink logs for any other databases as well by
following the same steps but there may be some pros and cons for doing it
according to applications for which it is being used and you should understand
the risk of doing it.
In scenario of vCenter server,
I don’t see any impact of shrinking of ldf database in my case.
Scenario: Your
vCenter server is using SQL database and somehow the vcenter_log.ldf database file has occupied more than 90% of disk space on your server. Now
you want to release the space occupied by the log files.
Prerequisites:
Admin rights on SQL database
on which you are going to perform this action.
Please take backup of your
database before performing shrink task
Reference Screenshot (too large log file before shrink):
Steps: shrinking .ldf database log files
Login to your vCenter server with Administrative privilege > Login to SQL Server using SQL Management Studio to access Databases > Navigate to your vCenter Server Database > Right Click
on vCenter Database > Go to Properties
Go to Options >
Choose Simple under Recovery Model drop-down list >
Click OK
Once more right
click on your vCenter Database > Go to Tasks
> Select Shrink > Select Files
In the General option, Choose Log under File Type drop-down
list > Make sure filename_log is
automatically populated under File Name
drop-down option > Under Shrink
Action, Select Release Unused Space >
Click OK > Wait for Shrink action
to be completed
You are done. You can check your log file size, it should be
appearing small in size. Also your disk space should be healthy now.
Reference screenshot
(small log file after Shrink):
Cheers, please write me back if you have any query of
feedback on this.