Is it okay to shrink SQL log DB files?

Hey SharePoint Fam,

I have 2 SQL ldf log files that are huge and killing my disk space. I am wanting to know is it okay to shrink them anytime in production environment by using the DBCC SHRINKFILE sql command.  I have metalogix backup tool in place which does the full backups so the DB's are getting backed up for sure but I am losing a lot of disk space from these log files. 

File 1 - Content DB
Actual DB File is 20GB
LDF file is 51GB

File 2 - Config DB
Actual DB File is 220MB
LDF Log file is 17GB

Thanks n advance

May 29th, 2015 10:04am

It's OK to shrink them.
Free Windows Admin Tool Kit Click here and download it now
May 29th, 2015 10:35am

Thanks for response jamie, does it affect environment at all or cause any slowness for users on frontend?

Thanks again

May 29th, 2015 10:37am

I would always tend to do such changes out of hours if at all possible. I've had to do a DBCC Shrinkfile during office hours in the past to ensure that service continued. Didn't notice an impact.

On the subject of log files and performance in general you should read this; http://dba.stackexchange.com/questions/3794/how-does-shrinking-a-sql-server-log-file-affect-performance

Regular log file backups could avoid the issue in future.

Free Windows Admin Tool Kit Click here and download it now
May 29th, 2015 11:33am

Thanks so much jamie!
May 29th, 2015 11:47am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics