Technical FAQs

Ask a Question

Video: How to shrink the ION_Data .ldf file

Customer has .ldf file that is significantly larger than the .mdf file and taking up unnecessary space on the hard drive.

Power Monitoring Expert (PME) 7.2, 8.0, 8.1
Struxureware Power Monitoring (SPM) 7.0, 7.0.1
ION Enterprise 5.6, 6.0
SQL 2008 R2, 2012, 2012 R2, 2014 

SQL Server Management Studio

When the Database recovery mode is set to Full but the transaction logs are not backed up, the .LDF file can grow much larger than the .mdf file.

*Warning: Irreparable database damage can occur. This procedure should only be performed by users familiar with SQL Server Management Studio. Databases should be backed up prior to performing this procedure.* 

Before proceeding with this resolution, confirm the following:
- Be sure to have a recent backup on the ION_Data database
- The database recovery mode is set to simple or schedule transaction log backups
- Have a clear understanding why the .ldf file is growing. 
- Understand the impact of shrinking the .ldf file. Only unused space can be returned to the hard drive. Shrinking the log file too much will cause delays in the system when SQL needs to grow the file again.

This video has instructions on how to shrink the .ldf file in SQL Server Management Studio, a copy of the scripts used in the video are included below

DBCC SQLPERF (logspace)

EXEC sp_helpfile


Was this helpful?
What can we do to improve the information ?