cancel
Showing results for 
Search instead for 
Did you mean: 
Isagel
Level 7
Report Inappropriate Content
Message 1 of 9

Need to reduce log file (.ldf) size

Jump to solution

Hello,

Using ePO 4.5, the size of the log file is 18G and I need to reduce it, hard drive is almost out of space.  I've purged events from ePO and shrank the database which reduced the .mdf  size but is there any way to reduce .ldf file size? 

1 Solution

Accepted Solutions
Highlighted
McAfee Employee JoeBidgood
McAfee Employee
Report Inappropriate Content
Message 7 of 9

Re: Need to reduce log file (.ldf) size

Jump to solution
Recovery Model is full, could that be the cause? 

Definitely   

If the recovery model is Full or Bulk-Logged, it means that the transaction log will just keep growing: you are responsible for maintaining it. This is one of the reasons that we recommend using the Simple model - it means that SQL manages the transaction log for you.

Stop the ePO services, change the recovery model to Simple, and shrink the database again - the transaction log should almost vanish

HTH -

joe

8 Replies
Reliable Contributor SCtbe
Reliable Contributor
Report Inappropriate Content
Message 2 of 9

Re: Need to reduce log file (.ldf) size

Jump to solution

Simply shrink transaction log file (ldf file) as youe have done with mdf file.

Isagel
Level 7
Report Inappropriate Content
Message 3 of 9

Re: Need to reduce log file (.ldf) size

Jump to solution

I've tried.  Gone to shrink -> files and databases, reduces the size by a few hundred Meg which isn't enough.  I don't think I can select only the ldf file to shrink.  

Isagel
Level 7
Report Inappropriate Content
Message 4 of 9

Re: Need to reduce log file (.ldf) size

Jump to solution

Is the .ldf file just events from ePO?  If so would it be possible to create a new .ldf file?...detach current DB -> rename or move .ldf file -> attach DB that was just detached ?

McAfee Employee JoeBidgood
McAfee Employee
Report Inappropriate Content
Message 5 of 9

Re: Need to reduce log file (.ldf) size

Jump to solution

No - the .ldf file is the SQL transaction log for the database, and as such is an integral part of it. Which version of SQL are you using, and what recovery model have you set for the ePO DB?

Thanks -

Joe

Isagel
Level 7
Report Inappropriate Content
Message 6 of 9

Re: Need to reduce log file (.ldf) size

Jump to solution

Hi Joe,

I'm using SQL server 2005 express (SQL Server 9.0.5000).  Recovery Model is full, could that be the cause? 

After shrinking the DB yesterday the size of the .ldf file was about 16G, I just checked this morning and its at almost 19G now. 

Highlighted
McAfee Employee JoeBidgood
McAfee Employee
Report Inappropriate Content
Message 7 of 9

Re: Need to reduce log file (.ldf) size

Jump to solution
Recovery Model is full, could that be the cause? 

Definitely   

If the recovery model is Full or Bulk-Logged, it means that the transaction log will just keep growing: you are responsible for maintaining it. This is one of the reasons that we recommend using the Simple model - it means that SQL manages the transaction log for you.

Stop the ePO services, change the recovery model to Simple, and shrink the database again - the transaction log should almost vanish

HTH -

joe

Isagel
Level 7
Report Inappropriate Content
Message 8 of 9

Re: Need to reduce log file (.ldf) size

Jump to solution

Thank you Joe!  Issue resolved.  Transaction log is down to 504KB now. 

Re: Need to reduce log file (.ldf) size

Jump to solution

I think if you do a full backup (SQL Server's backup tool, not just copy the files somewhere), then shrink the log file, it will get much smaller.  Also, if you switch to the simple recovery model, the log file won't get so big.  I don't remember exactly what the difference between the recovery models is, but you should be able to find info on it in the SQL Server help and determine which model is best for you.  Also check how the log file is set to grow.  If it is set to grow by percentage, the larger it gets the more it will grow each time it fills up.

More McAfee Tools to Help You
  • Subscription Service Notification (SNS)
  • How-to: Endpoint Removal Tool
  • Support: Endpoint Security
  • eSupport: Policy Orchestrator